X-Git-Url: https://git.deb.at/w?a=blobdiff_plain;f=debian%2Frules;h=96f875af9131f666f515530d5ee3e2eeb217bebd;hb=cb2e07351834ad17b2bb0b8668e13466e1058ca1;hp=21ac1efde4ae04606e3de84a33783d3516994a06;hpb=e79a445f83989ef1f8ae564dd7c3be7e5d134d00;p=pkg%2Fabook.git diff --git a/debian/rules b/debian/rules index 21ac1ef..96f875a 100755 --- a/debian/rules +++ b/debian/rules @@ -1,5 +1,8 @@ #!/usr/bin/make -f # debian/rules for abook +# copyright 2003-2009 by Gerfried Fuchs +# Licenced under BSD style + PKG = abook TMP = $(CURDIR)/debian/$(PKG) @@ -12,16 +15,22 @@ 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. #export DH_VERBOSE=1 @@ -29,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)" @@ -50,6 +61,9 @@ install: build cd $(TMP) && $(INSTALL_DIR) usr/share/doc/$(PKG)/examples \ usr/share/doc/$(PKG)/contrib $(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)