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 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134
|
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 by Joey Hess.
#
# This version is for a hypothetical package that builds an
# architecture-dependant package, as well as an architecture-independent
# package.
# Modified for the Debian GNU/Linux system packages 'ibrazilian' and
# 'brazilian-conjugate' by Carlos Laviola, with aid of rules file
# made by the previous maintainer, Rafael Laboissiere.
# Uncomment this to turn on verbose mode.
# export DH_VERBOSE=1
include /usr/share/dpatch/dpatch.make
debdir := $(CURDIR)/debian
tmpdir := $(debdir)/tmp
usrdir := $(tmpdir)/usr
bindir := $(usrdir)/bin
libdir := $(usrdir)/lib
# The following rules avoid the inclusion of changed conjugue and conjugue.1
# files in the diff.gz file, making dpkg-buildpackage reentrant
savefiles = conjugue conjugue.1
save-conjugue:
for f in $(savefiles) ; do \
test -f $$f-orig || cp $$f $$f-orig ; \
done
restore-conjugue:
for f in $(savefiles) ; do \
test ! -f $$f-orig || mv $$f-orig $$f ; \
done
recode-manpage:
chmod +x debian/latin1-troff.pl
debian/latin1-troff.pl conjugue.1
build: patch-stamp save-conjugue recode-manpage build-stamp
build-stamp:
dh_testdir
# Build everything besides aspell
$(MAKE) AWK=/usr/bin/gawk \
formas br.aff br.base br.ispell br.hash
# conjugue files
for e in UTF-8 ISO-8859-1 ; do \
cp verbos verbos-$$e ; \
done
recode l1..utf8 verbos-UTF-8
# wordlist file
cp formas brazilian
touch build-stamp
clean: restore-conjugue unpatch
dh_testdir
dh_testroot
rm -f build-stamp
$(MAKE) clean
rm -f pt_BR.cwl.gz pt_BR.compat pt_BR.rws conjugue-* verbos-* \
brazilian
dh_clean
install: DH_OPTIONS=
install: build
dh_testdir
dh_testroot
# Add here commands to install the package into debian/ibrazilian.
$(MAKE) install prefix=$(usrdir) DESTDIR=$(tmpdir) \
MANDIR=$(usrdir)/share/man HASHDIR=$(usrdir)/lib/ispell \
VDIR=/usr/lib/brazilian-conjugate AWK=/usr/bin/gawk
( cd $(bindir) ; \
for e in UTF-8 ISO-8859-1 ; do \
cp conjugue conjugue-$$e ; \
perl -pi -e "s|/verbos|/verbos-$$e|" conjugue-$$e ; \
done ; \
recode l1..utf8 conjugue-UTF-8 )
( cd $(libdir)/ispell ; \
mv br.hash brasileiro.hash ; mv br.aff brasileiro.aff )
rm -f $(libdir)/brazilian-conjugate/verbos
install --mode=577 debian/conjugue-wrapper $(bindir)/conjugue
dh_install --package=ibrazilian --sourcedir=$(tmpdir)
dh_install --no-package=ibrazilian
for e in UTF-8 ISO-8859-1 ; do \
dh_link --package=brazilian-conjugate \
usr/share/man/man1/conjugue.1 \
usr/share/man/man1/conjugue-$$e.1 ; \
done
# Build architecture-independent files here.
# Pass -i to all debhelper commands in this target to reduce clutter.
binary-indep: build install
dh_testdir -i
dh_testroot -i
dh_installdocs -i README ANUNCIO FAQ.i
dh_installchangelogs -i CHANGELOG
dh_compress -i
dh_fixperms -i
dh_installman -i
installdeb-wordlist --package=wbrazilian
dh_installdeb -i
dh_link -i
dh_gencontrol -i
dh_md5sums -i
dh_builddeb -i
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir -a
dh_testroot -a
dh_installdocs -a README ANUNCIO FAQ.i
dh_installemacsen -a
dh_installchangelogs -a CHANGELOG
dh_compress -a
dh_fixperms -a
installdeb-ispell --package=ibrazilian
dh_installdeb -a
dh_shlibdeps -a
dh_gencontrol -a
dh_md5sums -a
dh_builddeb -a
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
|