#!/usr/bin/make -f # Sample debian/rules that uses debhelper. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 # This is the debhelper compatability version to use. # export DH_COMPAT=5 debian_patches = automakehash autodicooption IFRENCH_GUT=$(shell pwd)/debian/ifrench-gut MYSPELL_FR_GUT=$(shell pwd)/debian/myspell-fr-gut configure: configure-stamp configure-stamp: patched-stamp dh_testdir # Add here commands to configure the package. touch configure-stamp build: build-stamp build-stamp: configure-stamp dh_testdir # Add here commands to compile the package. ./makehash ispellaff2myspell \ --charset=latin0 \ --myheader=debian/fr_FR@GUT.header \ francais.aff > fr.aff wc -l < francais.dico > francais.dico.cnt cat francais.dico.cnt francais.dico > fr.dic touch build-stamp build-arch: build build-indep: build clean: reverse-patches dh_testdir dh_testroot rm -f build-stamp configure-stamp # Add here commands to clean up after the build process. rm -f francais.hash francais-TeX8b.hash rm -f francais.dico* francais.stat rm -f fr-pre.aff fr.aff fr.dic dh_clean #install-indep for myspell dict install-indep: build dh_testdir dh_testroot dh_prep dh_installdirs # Add here commands to install the package into debian/ifrench-gut. install -m 0644 fr.aff $(MYSPELL_FR_GUT)/usr/share/hunspell install -m 0644 fr.dic $(MYSPELL_FR_GUT)/usr/share/hunspell # links for myspell dicts ln -s /usr/share/hunspell/fr.aff $(MYSPELL_FR_GUT)/usr/share/myspell/dicts/fr.aff ln -s /usr/share/hunspell/fr.dic $(MYSPELL_FR_GUT)/usr/share/myspell/dicts/fr.dic for CC in FR BE LU CH; do for SUF in aff dic; do\ ln -s fr.$${SUF} $(MYSPELL_FR_GUT)/usr/share/hunspell/fr_$${CC}.$${SUF}; \ ln -s /usr/share/hunspell/fr.$${SUF} $(MYSPELL_FR_GUT)/usr/share/myspell/dicts/fr_$${CC}.$${SUF}; \ done; done #install-arch for ispell dict install-arch: build dh_testdir dh_testroot dh_prep dh_installdirs # Add here commands to install the package into debian/ifrench-gut. install -m 0644 francais.aff $(IFRENCH_GUT)/usr/lib/ispell/french.aff install -m 0644 francais.hash $(IFRENCH_GUT)/usr/lib/ispell/french.hash install -m 0644 francais-TeX8b.aff $(IFRENCH_GUT)/usr/lib/ispell/french-TeX8b.aff install -m 0644 francais-TeX8b.hash $(IFRENCH_GUT)/usr/lib/ispell/french-TeX8b.hash # links for ispell dicts dh_link usr/lib/ispell/french.aff usr/lib/ispell/francais.aff dh_link usr/lib/ispell/french.hash usr/lib/ispell/francais.hash dh_link usr/lib/ispell/french.aff usr/lib/ispell/frenchb.aff dh_link usr/lib/ispell/french.hash usr/lib/ispell/frenchb.hash dh_link usr/lib/ispell/french-TeX8b.aff usr/lib/ispell/francais-TeX8b.aff dh_link usr/lib/ispell/french-TeX8b.hash usr/lib/ispell/francais-TeX8b.hash # Build architecture-independent files here. # For myspell dict. binary-indep: build install-indep dh_testdir dh_testroot dh_installdocs -i dh_installchangelogs -i dh_link -i installdeb-myspell -p myspell-fr-gut dh_compress -i dh_fixperms -i dh_installdeb -i dh_gencontrol -i dh_md5sums -i dh_builddeb -i # Build architecture-dependent files here. # For ispell dict. binary-arch: build install-arch dh_testdir dh_testroot # dh_installdebconf -a installdeb-ispell -p ifrench-gut # new policy (see dict-common) - calls dh_installdebconf dh_installdocs -a # dh_installexamples -a # dh_installmenu -a # dh_installlogrotate -a # dh_installemacsen -a # dh_installpam -a # dh_installmime -a # dh_installinit -a # dh_installcron -a # dh_installman -a # dh_installinfo-a dh_installchangelogs -a dh_strip -a dh_compress -a dh_fixperms -a # dh_makeshlibs dh_installdeb -a # dh_perl -a dh_shlibdeps -a dh_gencontrol -a dh_md5sums -a dh_builddeb -a binary: binary-indep binary-arch .PHONY: build build-arch build-indep clean binary-indep binary-arch binary install configure # --------------------------------------------------------------------------- # various rules to unpack addons and (un)apply patches. # borrowed from egcs package patch_dir = debian/patches apply-patches: patched-stamp reverse-patches: @for stamp in none patched-*; do \ case "$$stamp" in none|patched-stamp|patched-\*) continue; esac; \ patch=`echo $$stamp | sed -e 's/patched-//'`; \ echo "trying to revert patch $$patch ..."; \ if [ -x $(patch_dir)/$$patch.dpatch ]; then true; else \ chmod +x $(patch_dir)/$$patch.dpatch; fi; \ if $(patch_dir)/$$patch.dpatch -unpatch; then \ echo "reverted $$patch patch."; \ rm -f $$stamp; \ else \ echo "error in reverting $$patch patch."; \ exit 1; \ fi; \ done @echo "Removing patched-stamp" @rm -f patched-stamp patched-%: $(patch_dir)/%.dpatch @if [ -x $< ]; then true; else chmod +x $<; fi @if [ -f $@ ]; then \ echo "$* patches already applied."; exit 1; \ fi $< -patch @echo "$* patches applied." > $@ patched-stamp: $(foreach p,$(debian_patches),patched-$(p)) @printf "\nPatches applied:\n" >> pxxx @for i in none $(debian_patches); do \ if [ -r debian/patches/$$i.dpatch ]; then \ printf "\n$$i:\n" >> pxxx; \ sed -n 's/^# *DP: */ /p' debian/patches/$$i.dpatch >> pxxx; \ fi \ done @echo "Writing patched-stamp" @mv -f pxxx patched-stamp