1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106
|
#!/usr/bin/make -f
SHELL := sh -e
DH_AUTO_OPTIONS := -v -Smakefile
GEN_DH_FILES := debian/packages.d/gen_debhelper_files.pl
export DESTDIR := $(CURDIR)/debian/tmp
DEB_BUILD_MAINT_OPTIONS := hardening=+all
DEB_CFLAGS_MAINT_APPEND := $(shell getconf LFS_CFLAGS) -Wall
DPKG_EXPORT_BUILDFLAGS := 1
include /usr/share/dpkg/buildflags.mk
include /usr/share/dpkg/architecture.mk
ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
CC := $(DEB_HOST_GNU_TYPE)-gcc
else
CC := gcc
endif
MAKE_OPTIONS := CC="$(CC)" CFLAGS="$(CPPFLAGS) $(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
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
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 $@
|