[packages/alsa-lib] - use out-of-tree builds instead of install/clean hack in %build

qboosh qboosh at pld-linux.org
Wed Jun 18 20:10:38 CEST 2014


commit b4098a333f2ce613ca99e9ec8f5af2870ddf2892
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Wed Jun 18 20:14:36 2014 +0200

    - use out-of-tree builds instead of install/clean hack in %build

 alsa-lib.spec | 26 +++++++++++++++-----------
 1 file changed, 15 insertions(+), 11 deletions(-)
---
diff --git a/alsa-lib.spec b/alsa-lib.spec
index 4909161..1530353 100644
--- a/alsa-lib.spec
+++ b/alsa-lib.spec
@@ -199,32 +199,36 @@ configure_opts="\
 "
 
 %if %{with static_libs}
-%configure $configure_opts \
+install -d build-static
+cd build-static
+../%configure $configure_opts \
 	--disable-shared \
 	--enable-static
 %{__make}
-install -d static
-%{__make} install \
-	DESTDIR=$(pwd)/static
-%{__make} clean
+cd ..
 %endif
 
-%configure $configure_opts \
+install -d build-shared
+cd build-shared
+../%configure $configure_opts \
 	--enable-shared \
 	--disable-static
 
 %{__make}
-
 %{?with_apidocs:%{__make} doc}
+cd ..
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{/%{_lib},%{_sysconfdir}/alsa,/etc/modprobe.d}
 
-%{__make} install \
+%if %{with static_libs}
+%{__make} -C build-static/src install-libLTLIBRARIES \
 	DESTDIR=$RPM_BUILD_ROOT
+%endif
 
-install static/%{_libdir}/libasound.a $RPM_BUILD_ROOT%{_libdir}
+%{__make} -C build-shared install \
+	DESTDIR=$RPM_BUILD_ROOT
 
 mv -f $RPM_BUILD_ROOT%{_libdir}/libasound.so.* $RPM_BUILD_ROOT/%{_lib}
 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libasound.so
@@ -235,7 +239,7 @@ install -D utils/alsa.m4 $RPM_BUILD_ROOT%{_aclocaldir}/alsa.m4
 install %{SOURCE1} $RPM_BUILD_ROOT/etc/modprobe.d/alsa-base.conf
 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/asound.conf
 
-%{__rm} -f $RPM_BUILD_ROOT%{_libdir}/alsa-lib/smixer/*.{a,la}
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/alsa-lib/smixer/*.la
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -277,7 +281,7 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with apidocs}
 %files apidocs
 %defattr(644,root,root,755)
-%doc doc/doxygen/html/*
+%doc build-shared/doc/doxygen/html/*
 %endif
 
 %if %{with python}
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/alsa-lib.git/commitdiff/b4098a333f2ce613ca99e9ec8f5af2870ddf2892



More information about the pld-cvs-commit mailing list