[SCM] liblivemedia/master: Support parallel build.

bdrung at users.alioth.debian.org bdrung at users.alioth.debian.org
Sun Dec 23 16:01:06 UTC 2012


The following commit has been merged in the master branch:
commit c1e598ae4a20499af1182fcb6ff893739ee12a89
Author: Benjamin Drung <bdrung at debian.org>
Date:   Sun Dec 23 16:51:45 2012 +0100

    Support parallel build.

diff --git a/debian/rules b/debian/rules
index c3007d5..eda1854 100755
--- a/debian/rules
+++ b/debian/rules
@@ -18,6 +18,12 @@ ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
 	INSTALL_PROGRAM += -s
 endif
 
+ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+	NUMJOBS := $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+else
+	NUMJOBS := 1
+endif
+
 %:
 	dh $@ --parallel
 
@@ -32,11 +38,11 @@ override_dh_auto_build:
 	for f in BasicUsageEnvironment \
 	            UsageEnvironment liveMedia groupsock; do \
 	  LDFLAGS="$(LDFLAGS)" \
-	  CFLAGS="$(CFLAGS) -fPIC -DPIC" $(MAKE) -C $${f} || exit 1; \
+	  CFLAGS="$(CFLAGS) -fPIC -DPIC" $(MAKE) -j $(NUMJOBS) -C $${f} || exit 1; \
 	  mv "$${f}/lib$${f}.a" "$${f}/lib$${f}_pic.a"; \
 	done
 	$(MAKE) clean
-	CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" $(MAKE)
+	CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" $(MAKE) -j $(NUMJOBS)
 
 override_dh_auto_install:
 	dh_auto_install -- PREFIX=/usr LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH)

-- 
liblivemedia packaging



More information about the pkg-multimedia-commits mailing list