diff --git a/gsm.spec b/gsm.spec index 7a36810..e5b0570 100644 --- a/gsm.spec +++ b/gsm.spec @@ -66,36 +66,36 @@ export RPM_OPT_FLAGS="$RPM_OPT_FLAGS -fPIC"; make %{?_smp_mflags} all %install -rm -rf $RPM_BUILD_ROOT +rm -rf %{buildroot} -mkdir -p $RPM_BUILD_ROOT%{_bindir} -mkdir -p $RPM_BUILD_ROOT%{_includedir}/gsm -mkdir -p $RPM_BUILD_ROOT%{_libdir} -mkdir -p $RPM_BUILD_ROOT%{_mandir}/{man1,man3} +mkdir -p %{buildroot}%{_bindir} +mkdir -p %{buildroot}%{_includedir}/gsm +mkdir -p %{buildroot}%{_libdir} +mkdir -p %{buildroot}%{_mandir}/{man1,man3} make install \ - INSTALL_ROOT=$RPM_BUILD_ROOT%{_prefix} \ - GSM_INSTALL_INC=$RPM_BUILD_ROOT%{_includedir}/gsm \ - GSM_INSTALL_LIB=$RPM_BUILD_ROOT%{_libdir} + INSTALL_ROOT=%{buildroot}%{_prefix} \ + GSM_INSTALL_INC=%{buildroot}%{_includedir}/gsm \ + GSM_INSTALL_LIB=%{buildroot}%{_libdir} -cp -p $RPM_BUILD_DIR/gsm-%{srcver}/lib/libgsm.so.%{soname} $RPM_BUILD_ROOT%{_libdir} -ln -s libgsm.so.%{soname} $RPM_BUILD_ROOT%{_libdir}/libgsm.so.1 -ln -s libgsm.so.%{soname} $RPM_BUILD_ROOT%{_libdir}/libgsm.so +cp -p $RPM_BUILD_DIR/gsm-%{srcver}/lib/libgsm.so.%{soname} %{buildroot}%{_libdir} +ln -s libgsm.so.%{soname} %{buildroot}%{_libdir}/libgsm.so.1 +ln -s libgsm.so.%{soname} %{buildroot}%{_libdir}/libgsm.so # some apps look for this in /usr/include -ln -s gsm/gsm.h $RPM_BUILD_ROOT%{_includedir} +ln -s gsm/gsm.h %{buildroot}%{_includedir} -rm -f $RPM_BUILD_ROOT%{_libdir}/lib*.a +rm -f %{buildroot}%{_libdir}/lib*.a %check # This is to ensure that the patch creates the proper library version. -[ -f $RPM_BUILD_ROOT%{_libdir}/libgsm.so.%{soname} ] +[ -f %{buildroot}%{_libdir}/libgsm.so.%{soname} ] make addtst %clean -rm -rf $RPM_BUILD_ROOT +rm -rf %{buildroot} %post -p /sbin/ldconfig