X-Git-Url: https://git.deb.at/w?a=blobdiff_plain;f=debian%2Frules;h=d446ec70f13d2df36a0603d440108f7d080589bf;hb=80a88daf1e26c847ad709bd892ef66e5a785629f;hp=c7eef3037a4915b3c1d9a46123b7facc8632a2a4;hpb=04c907b27265cf95ac543240cc6322044a3c5bbf;p=pkg%2Fabook.git diff --git a/debian/rules b/debian/rules index c7eef30..d446ec7 100755 --- a/debian/rules +++ b/debian/rules @@ -1,100 +1,15 @@ #!/usr/bin/make -f -# debian/rules for abook -PKG = abook -TMP = $(CURDIR)/debian/$(PKG) +#DH_VERBOSE = 1 +export DEB_BUILD_MAINT_OPTIONS = hardening=+all +export DEB_CFLAGS_MAINT_APPEND = -g -Wall -pedantic -std=gnu89 +export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed -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))) - CFLAGS += -O0 -else - CFLAGS += -O2 -endif -ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) - INSTALL_PROGRAM += -s -endif +%: + dh $@ --with autoreconf +override_dh_auto_install: + dh_auto_install --destdir=debian/abook -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - - -clean: - $(checkdir) - $(checkroot) - rm -rf build-stamp $(TMP) debian/files debian/substvars - [ ! -f Makefile ] || $(MAKE) distclean - - -build: build-stamp -build-stamp: - $(checkdir) - ./configure --prefix=/usr --mandir=\$${prefix}/share/man \ - --infodir=\$${prefix}/share/info - $(MAKE) CFLAGS="$(CFLAGS)" - touch build-stamp - - -install: build - $(checkdir) - $(checkroot) - -rm -rf $(TMP) - $(INSTALL_DIR) $(TMP) - cd $(TMP) && $(INSTALL_DIR) usr/share/doc/$(PKG)/examples \ - usr/share/doc/$(PKG)/contrib - $(MAKE) prefix=$(TMP)/usr install INSTALL_PROGRAM="$(INSTALL_PROGRAM)" - $(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 - 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 - - -# Build architecture-independent files here. -binary-indep: build install -# We have nothing to do by default. - - -# Build architecture-dependent files here. -binary-arch: build install - $(checkdir) - $(checkroot) - $(INSTALL_DIR) $(TMP)/DEBIAN $(TMP)/usr/share/menu - $(INSTALL_FILE) debian/menu $(TMP)/usr/share/menu/$(PKG) - $(INSTALL_FILE) debian/copyright $(TMP)/usr/share/doc/$(PKG) - $(INSTALL_FILE) debian/changelog \ - $(TMP)/usr/share/doc/$(PKG)/changelog.Debian - gzip -9 $(TMP)/usr/share/doc/$(PKG)/changelog.Debian - $(INSTALL_SCRIPT) debian/config debian/postinst debian/postrm \ - $(TMP)/DEBIAN - po2debconf debian/templates > $(TMP)/DEBIAN/templates - dpkg-shlibdeps -Tdebian/substvars -dDepends $(TMP)/usr/bin/abook - dpkg-gencontrol -ldebian/changelog -isp -Tdebian/substvars \ - -p$(PKG) -P$(TMP) - cd $(TMP) && find * -type f ! -regex '^DEBIAN/.*' -print0 | \ - xargs -r0 md5sum > DEBIAN/md5sums - dpkg --build $(TMP) .. - - -binary: binary-indep binary-arch - - -define checkdir - test -f debian/rules -endef - -define checkroot - test root = "`whoami`" -endef - -.PHONY: clean build install binary-indep binary-arch binary +override_dh_installdocs: + dh_installdocs --link-doc=abook