[Python-apps-commits] r6910 - in packages/pyrit/trunk/debian (3 files)

chrisk-guest at users.alioth.debian.org chrisk-guest at users.alioth.debian.org
Fri Apr 8 19:06:38 UTC 2011


    Date: Friday, April 8, 2011 @ 19:06:32
  Author: chrisk-guest
Revision: 6910

Generate pyrit config at build time, taking into account a possible
DEB_BUILD_OPTIONS=parallel=N

Added:
  packages/pyrit/trunk/debian/config.build.in
Modified:
  packages/pyrit/trunk/debian/rules
Deleted:
  packages/pyrit/trunk/debian/config.build

Deleted: packages/pyrit/trunk/debian/config.build
===================================================================
--- packages/pyrit/trunk/debian/config.build	2011-04-08 18:58:07 UTC (rev 6909)
+++ packages/pyrit/trunk/debian/config.build	2011-04-08 19:06:32 UTC (rev 6910)
@@ -1,7 +0,0 @@
-default_storage = file://
-rpc_announce = true
-rpc_announce_broadcast = false
-rpc_knownclients = 
-rpc_server = true
-workunit_size = 75000
-limit_ncpus = 1

Added: packages/pyrit/trunk/debian/config.build.in
===================================================================
--- packages/pyrit/trunk/debian/config.build.in	                        (rev 0)
+++ packages/pyrit/trunk/debian/config.build.in	2011-04-08 19:06:32 UTC (rev 6910)
@@ -0,0 +1,7 @@
+default_storage = file://
+rpc_announce = true
+rpc_announce_broadcast = false
+rpc_knownclients = 
+rpc_server = true
+workunit_size = 75000
+limit_ncpus = <CORES>

Modified: packages/pyrit/trunk/debian/rules
===================================================================
--- packages/pyrit/trunk/debian/rules	2011-04-08 18:58:07 UTC (rev 6909)
+++ packages/pyrit/trunk/debian/rules	2011-04-08 19:06:32 UTC (rev 6910)
@@ -6,9 +6,23 @@
 
 PYVERS = $(shell pyversions -r -v)
 
+# If DEB_BUILD_OPTIONS contains parallel=N, use N number of cores for the
+# unit tests as well. Whatever N is, pyrit won't use more than the number
+# of cores available.
+ifneq (,$(findstring parallel=,$(DEB_BUILD_OPTIONS)))
+    NUMCORES = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+else
+    NUMCORES = 1
+endif
+
+
 %:
 	dh $@
 
+override_dh_auto_configure:
+	dh_auto_configure
+	sed -e 's,<CORES>,$(NUMCORES),' debian/config.build.in > debian/config.build
+
 override_dh_auto_test:
 ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
 	set -e ;\
@@ -20,3 +34,7 @@
 		cd .. ;\
 	done
 endif
+
+override_dh_auto_clean:
+	dh_auto_clean
+	rm -f debian/config.build




More information about the Python-apps-commits mailing list