X-Git-Url: https://git.deb.at/?a=blobdiff_plain;f=debian%2Frules;h=440446042e8e859a7d674b1ecc9868de568876d7;hb=dcfc7866c222f0b027d9e077ded7e0f9cfbf69a1;hp=d4e572c87aa7b61d76b6d95ff8b16561c238af2f;hpb=535ad70b710dd0f45f044856a69b8256e39051b3;p=pkg%2Fabook.git diff --git a/debian/rules b/debian/rules index d4e572c..4404460 100755 --- a/debian/rules +++ b/debian/rules @@ -1,7 +1,7 @@ #!/usr/bin/make -f # debian/rules for abook -# copyright 2003-2008 by Gerfried Fuchs -# Licenced the same way as abook itself +# copyright 2003-2012 by Gerfried Fuchs +# Licenced under WTFPLv2 PKG = abook TMP = $(CURDIR)/debian/$(PKG) @@ -9,21 +9,26 @@ TMP = $(CURDIR)/debian/$(PKG) QUILT_STAMPFN = patch-stamp include /usr/share/quilt/quilt.make -CFLAGS = -g -Wall +CFLAGS = -g -Wall -std=gnu89 INSTALL = install 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,17 @@ 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: build-arch +build-arch: build-stamp +build-indep: 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)"