Package: src:irssi
Severity: wishlist
Tags: patch

Building irssi takes somehow a long time on slow architectures (takes
~25 minutes on arm*). It can support parallel building to get the
benefit of multi-core/cpu systems.

Attached is a patch doing so. It will deal with DEB_BUILD_OPTIONS and
to find if there is something like "parallel=N". This is a standard
environment variable, and if the value isn't set it will default to 1.

Thanks,
Aron Xu
--- rules.orig	2013-10-27 22:27:12.907158840 +0800
+++ rules	2013-10-27 22:27:15.291158902 +0800
@@ -16,6 +16,9 @@
 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
+ifneq (,$(filter parallel=%,$(subst $(COMMA), ,$(DEB_BUILD_OPTIONS))))
+	NJOBS := -j $(subst parallel=,,$(filter parallel=%,$(subst $(COMMA), ,$(DEB_BUILD_OPTIONS))))
+endif
 
 CFLAGS = -Wall -g
 
@@ -42,7 +45,7 @@
 	dh_testdir
 
 	# Add here commands to compile the package.
-	$(MAKE)
+	$(MAKE) $(NJOBS)
 	#docbook-to-man debian/irssi.sgml > irssi.1
 
 	touch build-stamp

Reply via email to