#!/usr/bin/make -f export DEB_BUILD_MAINT_OPTIONS=hardening=+all SHELL := sh -e CFLAGS := $(shell dpkg-buildflags --get CPPFLAGS) \ $(shell dpkg-buildflags --get CFLAGS) \ $(shell getconf LFS_CFLAGS) \ -Wall LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS) DH_AUTO_OPTIONS := -v -Smakefile GEN_DH_FILES := debian/packages.d/gen_debhelper_files.pl export DESTDIR := $(CURDIR)/debian/tmp ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE)) CC := $(DEB_HOST_GNU_TYPE)-gcc else CC := gcc endif MAKE_OPTIONS := CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" %: dh ${@} override_dh_auto_clean: rm -f debian/*.stamp debian/*.config debian/*.templates *.mwl* for dir in . languages/*; do \ [ ! -d $$dir ] || $(MAKE) -C $$dir clean dictclean; \ done [ ! -f Makefile ] || $(MAKE) realclean -find . -name "*~" -delete rm -f local.h defhash.h $(GEN_DH_FILES) clean override_dh_installdocs-arch: dh_installdocs -a override_dh_installdocs-indep: dh_installdocs -i --link-doc=ienglish-common debian/packages.stamp: $(wildcard debian/packages.d/*.in) $(GEN_DH_FILES) debian/rules debian/control perl $(GEN_DH_FILES) generate touch "$@" debian/build-common.stamp: debian/packages.stamp @echo "*** Building common files" ln -sf local.h.linux local.h dh_auto_build $(DH_AUTO_OPTIONS) --no-parallel -- $(MAKE_OPTIONS) \ config.sh dh_auto_build $(DH_AUTO_OPTIONS) --parallel -- $(MAKE_OPTIONS) \ programs defmt-programs showversion ispell.1 ispell.5 touch "$@" override_dh_auto_build-arch: debian/build-common.stamp override_dh_auto_build-indep: debian/build-common.stamp @echo "*** Building arch:all files" dh_auto_build $(DH_AUTO_OPTIONS) --no-parallel -- $(MAKE_OPTIONS) all-languages $(MAKE) -f debian/rules american.xxl+.mwl british.xxl+.mwl override_dh_prep: debian/packages.stamp dh_prep override_dh_auto_install-arch: @echo "*** Installing data into arch:any packages" # Note: do not call dh_auto_install, as it automatically pulls `install' target $(MAKE) $(MAKE_OPTIONS) DESTDIR="$(DESTDIR)" \ install-basic install-deformatters install-dictbuild override_dh_auto_install-indep: @echo "*** Installing data into arch:all packages" $(MAKE) $(MAKE_OPTIONS) DESTDIR="$(DESTDIR)" \ install-languages mv $(DESTDIR)/usr/lib/ispell/english.aff $(DESTDIR)/usr/share/ispell/english.aff set -e; \ for lang in american british ; do \ cp -a $$lang.xxl+.mwl $(DESTDIR)/usr/share/ispell/$$lang.xxl+.mwl; \ gzip -9nf $(DESTDIR)/usr/share/ispell/$$lang.xxl+.mwl; \ done set -e; \ for infofile in debian/*.info-ispell; do \ installdeb-ispell --package=`basename $$infofile .info-ispell`; \ done override_dh_install: dh_install --fail-missing american.xxl+.mwl british.xxl+.mwl : languages/english/english.aff american.xxl+.mwl : languages/american/american.xlg+ /usr/share/dict/american-english-insane british.xxl+.mwl : languages/british/british.xlg+ /usr/share/dict/british-english-insane %.mwl: # Note: assumes that affix file is the first prerequisite ./munchlist -v -T utf8 -l $^ > $@.tmp mv -f $@.tmp $@ .PHONY: override_dh_auto_build-arch override_dh_auto_build-indep \ override_dh_auto_install-arch override_dh_auto_install-indep \ override_dh_installdocs-arch override_dh_installdocs-indep \ override_dh_prep override_dh_auto_clean override_dh_install