X-Git-Url: https://git.deb.at/w?a=blobdiff_plain;f=debian%2Frules;h=739fd87d4c9b358bfa0a811f45d7571d35e85a9d;hb=164f01980d95716813f82df6c32135fddbe2cce4;hp=ab966e2f12f4ca788f934beb6d9cf160ab3f1e00;hpb=03f9ed0d7defd9030b896b4761849432650d1959;p=pkg%2Fabook.git diff --git a/debian/rules b/debian/rules index ab966e2..739fd87 100755 --- a/debian/rules +++ b/debian/rules @@ -1,7 +1,11 @@ #!/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 + +#use dpkg-buildflags +DPKG_EXPORT_BUILDFLAGS = 1 +include /usr/share/dpkg/buildflags.mk PKG = abook TMP = $(CURDIR)/debian/$(PKG) @@ -9,21 +13,27 @@ TMP = $(CURDIR)/debian/$(PKG) QUILT_STAMPFN = patch-stamp include /usr/share/quilt/quilt.make +#CFLAGS = -g -Wall -std=gnu89 CFLAGS = -g -Wall 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 +43,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)" @@ -51,8 +65,7 @@ install: build $(checkroot) -rm -rf $(TMP) $(INSTALL_DIR) $(TMP) - cd $(TMP) && $(INSTALL_DIR) usr/share/doc/$(PKG)/examples \ - usr/share/doc/$(PKG)/contrib + cd $(TMP) && $(INSTALL_DIR) usr/share/doc/$(PKG)/examples $(MAKE) prefix=$(TMP)/usr install INSTALL_PROGRAM="$(INSTALL_PROGRAM)" test "$(STRIP)" != true || strip \ --remove-section=.comment --remove-section=.note \ @@ -60,13 +73,10 @@ install: build $(INSTALL_FILE) ChangeLog $(TMP)/usr/share/doc/$(PKG)/changelog $(INSTALL_FILE) ANNOUNCE AUTHORS BUGS FAQ README THANKS TODO \ $(TMP)/usr/share/doc/$(PKG) - $(INSTALL_FILE) sample.abookrc contrib/mail2abook.py \ - contrib/vcard2abook.pl $(TMP)/usr/share/doc/$(PKG)/examples - $(INSTALL_FILE) contrib/abook+vim/README contrib/abook+vim/mail.vim \ - $(TMP)/usr/share/doc/$(PKG)/contrib + $(INSTALL_FILE) sample.abookrc \ + $(TMP)/usr/share/doc/$(PKG)/examples cd $(TMP)/usr/share && gzip -9 man/man1/abook.1 man/man5/abookrc.5 \ - doc/$(PKG)/examples/mail2abook.py doc/$(PKG)/changelog \ - doc/$(PKG)/contrib/mail.vim + doc/$(PKG)/changelog # Build architecture-independent files here.