File: rules

package info (click to toggle)
br.ispell 3.0~beta4-14
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 924 kB
  • ctags: 80
  • sloc: perl: 2,337; awk: 1,209; makefile: 194
file content (129 lines) | stat: -rwxr-xr-x 3,597 bytes parent folder | download
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
#!/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/quilt/quilt.make

debdir   := $(CURDIR)/debian
tmpdir   := $(debdir)/tmp
usrdir   := $(tmpdir)/usr
bindir   := $(usrdir)/bin

libdir   := $(usrdir)/lib/ispell
vardir   := $(tmpdir)/var/lib/ispell
sharedir := $(tmpdir)/usr/share/ispell

# 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:
	perl debian/latin1-troff.pl conjugue.1

build: patch 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

	# 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

	dh_clean

install: DH_OPTIONS=
install: build
	dh_testdir
	dh_testroot

	mkdir -p $(sharedir) $(vardir)
	# 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 )
	mv $(libdir)/br.aff $(libdir)/brasileiro.aff
	rm -f $(libdir)/br.hash
	rm -f $(libdir)/brazilian-conjugate/verbos
        # -- Install gzipped affix compressed dictionary
	gzip --best -c br.ispell > $(sharedir)/brasileiro.mwl.gz
        # -- Install compat file and hash placeholder
	touch $(vardir)/brasileiro.compat $(vardir)/brasileiro.hash
	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 --package=wbrazilian
	dh_installdocs -A --no-package=wbrazilian README ANUNCIO FAQ.i
	dh_installchangelogs -i CHANGELOG
	dh_installman -i
	installdeb-wordlist --package=wbrazilian
	installdeb-ispell --package=ibrazilian
	dh_compress -i
	dh_fixperms -i
	dh_installdeb -i
	dh_link -i
	dh_gencontrol -i
	dh_md5sums -i -Xvar/lib/ispell
	dh_builddeb -i

# Build architecture-dependent files here.
binary-arch: build install
        # Nothing to do here

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install