]> git.deb.at Git - pkg/abook.git/blobdiff - debian/rules
merge changes from 0.5.6-7
[pkg/abook.git] / debian / rules
index d4e572c87aa7b61d76b6d95ff8b16561c238af2f..3cb12039ccceaa7a4962ac2752ad73a153a54a20 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/make -f
 # debian/rules for abook
-# copyright 2003-2008 by Gerfried Fuchs <rhonda@debian.at>
-# Licenced the same way as abook itself
+# copyright 2003-2009 by Gerfried Fuchs <rhonda@debian.at>
+# Licenced under BSD style
 
 PKG = abook
 TMP = $(CURDIR)/debian/$(PKG)
@@ -15,15 +15,20 @@ INSTALL_FILE    = $(INSTALL) -p    -oroot -groot -m644
 INSTALL_PROGRAM = $(INSTALL) -p    -oroot -groot -m755
 INSTALL_SCRIPT  = $(INSTALL) -p    -oroot -groot -m755
 INSTALL_DIR     = $(INSTALL) -p -d -oroot -groot -m755
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
        CFLAGS += -O0
 else
        CFLAGS += -O2
 endif
-ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS)))
        INSTALL_PROGRAM += -s
        STRIP = true
 endif
+ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+           NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+               MAKEFLAGS += -j$(NUMJOBS)
+endif
+
 
 
 # Uncomment this to turn on verbose mode.
@@ -33,13 +38,15 @@ endif
 clean: unpatch
        $(checkdir)
        $(checkroot)
-       rm -rf build-stamp $(TMP) debian/files debian/substvars
+       rm -rf build-stamp $(TMP) debian/files debian/substvars \
+               config.guess config.sub
        [ ! -f Makefile ] || $(MAKE) distclean
 
 
 build: build-stamp
 build-stamp: patch-stamp
        $(checkdir)
+       cp /usr/share/misc/config.guess /usr/share/misc/config.sub .
        ./configure --prefix=/usr --mandir=\$${prefix}/share/man \
                 --infodir=\$${prefix}/share/info
        $(MAKE) CFLAGS="$(CFLAGS)"