X-Git-Url: https://git.deb.at/?a=blobdiff_plain;f=debian%2Frules;h=739fd87d4c9b358bfa0a811f45d7571d35e85a9d;hb=164f01980d95716813f82df6c32135fddbe2cce4;hp=21ac1efde4ae04606e3de84a33783d3516994a06;hpb=e79a445f83989ef1f8ae564dd7c3be7e5d134d00;p=pkg%2Fabook.git diff --git a/debian/rules b/debian/rules index 21ac1ef..739fd87 100755 --- a/debian/rules +++ b/debian/rules @@ -1,25 +1,39 @@ #!/usr/bin/make -f # debian/rules for abook +# 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) 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. @@ -29,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)" @@ -47,19 +65,18 @@ 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 \ + $(TMP)/usr/bin/abook $(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.