use rpm macro instead of RPM_BUILD_ROOT

This commit is contained in:
Michael Jerris 2010-08-05 20:30:28 -04:00
parent b85fd0f4be
commit 2519493aab
1 changed files with 10 additions and 10 deletions

View File

@ -425,7 +425,7 @@ test ! -f modules.conf || rm -f modules.conf
touch modules.conf touch modules.conf
for i in $MODULES; do echo $i >> modules.conf; done for i in $MODULES; do echo $i >> modules.conf; done
export VERBOSE=yes export VERBOSE=yes
export DESTDIR=$RPM_BUILD_ROOT/ export DESTDIR=%{buildroot}/
export PKG_CONFIG_PATH=/usr/bin/pkg-config:$PKG_CONFIG_PATH export PKG_CONFIG_PATH=/usr/bin/pkg-config:$PKG_CONFIG_PATH
export ACLOCAL_FLAGS="-I /usr/share/aclocal" export ACLOCAL_FLAGS="-I /usr/share/aclocal"
@ -472,29 +472,29 @@ touch .noversion
############################################################################################################################### ###############################################################################################################################
%install %install
%{__make} DESTDIR=$RPM_BUILD_ROOT install %{__make} DESTDIR=%{buildroot} install
# Create a log dir # Create a log dir
%{__mkdir} -p $RPM_BUILD_ROOT%{prefix}/log %{__mkdir} -p %{buildroot}%{prefix}/log
%ifos linux %ifos linux
# Install init files # Install init files
# On SuSE: # On SuSE:
%if 0%{?suse_version} > 100 %if 0%{?suse_version} > 100
%{__install} -D -m 744 build/freeswitch.init.suse $RPM_BUILD_ROOT/etc/rc.d/init.d/freeswitch %{__install} -D -m 744 build/freeswitch.init.suse %{buildroot}/etc/rc.d/init.d/freeswitch
%else %else
# On RedHat like # On RedHat like
%{__install} -D -m 0755 build/freeswitch.init.redhat $RPM_BUILD_ROOT/etc/rc.d/init.d/freeswitch %{__install} -D -m 0755 build/freeswitch.init.redhat %{buildroot}/etc/rc.d/init.d/freeswitch
%endif %endif
# On SuSE make /usr/sbin/rcfreeswitch a link to /etc/rc.d/init.d/freeswitch # On SuSE make /usr/sbin/rcfreeswitch a link to /etc/rc.d/init.d/freeswitch
%if 0%{?suse_version} > 100 %if 0%{?suse_version} > 100
%{__mkdir} -p $RPM_BUILD_ROOT/usr/sbin %{__mkdir} -p %{buildroot}/usr/sbin
%{__ln_s} -f /etc/rc.d/init.d/freeswitch $RPM_BUILD_ROOT/usr/sbin/rcfreeswitch %{__ln_s} -f /etc/rc.d/init.d/freeswitch %{buildroot}/usr/sbin/rcfreeswitch
%endif %endif
# Add the sysconfiguration file # Add the sysconfiguration file
%{__install} -D -m 744 build/freeswitch.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/freeswitch %{__install} -D -m 744 build/freeswitch.sysconfig %{buildroot}/etc/sysconfig/freeswitch
# Add monit file # Add monit file
%{__install} -D -m 644 build/freeswitch.monitrc $RPM_BUILD_ROOT/etc/monit.d/freeswitch.monitrc %{__install} -D -m 644 build/freeswitch.monitrc %{buildroot}/etc/monit.d/freeswitch.monitrc
%endif %endif
@ -533,7 +533,7 @@ if [ $1 -eq 0 ]; then
fi fi
%clean %clean
%{__rm} -rf $RPM_BUILD_ROOT %{__rm} -rf %{buildroot}
%files %files
############################################################################################################################### ###############################################################################################################################