File: rules

package info (click to toggle)
eo-spell 2.1.2000.02.25-57
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 476 kB
  • sloc: makefile: 113; sed: 24
file content (164 lines) | stat: -rwxr-xr-x 4,980 bytes parent folder | download | duplicates (2)
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

# This is the debhelper compatability version to use.

package         = iesperanto
apackage        = aspell-eo
apackage_cx     = aspell-eo-cx7

ISPELLDIR       = $(CURDIR)/debian/${package}/usr/lib/ispell
ISPELLVARDIR    = $(CURDIR)/debian/${package}/var/lib/ispell
ISPELLSHAREDIR  = $(CURDIR)/debian/${package}/usr/share/ispell
ISPELLOVRDIR    = $(CURDIR)/debian/${package}/usr/share/lintian/overrides

ASPELLDATADIR   = $(CURDIR)/debian/${apackage}/usr/lib/aspell
ASPELLSHAREDIR  = $(CURDIR)/debian/${apackage}/usr/share/aspell
ASPELLOVRDIR    = $(CURDIR)/debian/${apackage}/usr/share/lintian/overrides
ASPELLVARDIR    = $(CURDIR)/debian/${apackage}/var/lib/aspell
ASPELL6BASENAME = aspell6-eo
ASPELL6DIR      = $(CURDIR)/debian/$(ASPELL6BASENAME)
ASPELLPROC      = /usr/share/aspell-lang/proc    # Location of proc script
ASPELLDATA      = eo.dat eo.multi

TMP_BUILD       = ooo-tmp

MUNCHED_WORDS   = kerno.txt \
  komputo.txt \
  etnoland.txt \
  kancero.txt \
  movado.txt \
  personoj.txt

# Make sure build is always done in a reproducible and working
# language environment
LC_ALL = C
export LC_ALL

include /usr/share/quilt/quilt.make


configure: configure-stamp
configure-stamp:
	dh_testdir
	# Add here commands to configure the package.

	touch $@

build: build-arch build-indep
build-arch: build-stamp
build-indep: build-stamp
build-stamp: $(QUILT_STAMPFN) configure-stamp
	dh_testdir
	mkdir -p $(TMP_BUILD)

	cp README debian/README.ispell
	cp legumin.l3 debian/legumin.l3.ispell
	cat $(MUNCHED_WORDS) | sort -uf > kune.txt
	gzip -9n -c kune.txt > $(TMP_BUILD)/esperanto.mwl.gz
	cp eo.aff $(TMP_BUILD)/esperanto.aff

	# Create ispell latin3 munched wordlist and affix file
	sed -f debian/cx2latin3.sed kune.txt > $(TMP_BUILD)/eo.wl
	sed -f debian/cx2latin3.sed eo.aff   > eo-latin3.aff

	# Create myspell latin3 munched wordlist and affix file
	( echo `cat $(TMP_BUILD)/eo.wl | wc -l`; cat $(TMP_BUILD)/eo.wl ) > $(TMP_BUILD)/eo.dic
	ispellaff2myspell --charset=latin3 --myheader=debian/eo_ALL.header eo-latin3.aff > $(TMP_BUILD)/eo.aff

	# Copy aspell affix file with preferred name and prepare .cwl
	cat $(TMP_BUILD)/eo.wl | prezip -s -c | gzip -9n -c > $(TMP_BUILD)/eo.cwl.gz
	cp  $(TMP_BUILD)/eo.aff $(TMP_BUILD)/eo_affix.dat
	install -m 0644 debian/aspell/eo.dat debian/aspell/eo.multi $(TMP_BUILD)

	# Build stuff for aspell cx pseudocharset
	buildhash kune.txt eo.aff eo.hash
	cat kune.txt | ispell -d ./eo -e | tr -s ' ' '\n' | sort -u > $(TMP_BUILD)/eo-cx.wl
	cat $(TMP_BUILD)/eo-cx.wl | grep -v -e "-'$$" | prezip -s -c | gzip -9n -c > $(TMP_BUILD)/eo-cx.cwl.gz
	install -m 0644 debian/aspell/eo-cx.dat debian/aspell/eo-cx.multi $(TMP_BUILD)
	unmunch $(TMP_BUILD)/eo.dic $(TMP_BUILD)/eo.aff \
		| iconv -f latin3 -t utf-8 \
		| sed -f debian/cx2utf8.sed > $(TMP_BUILD)/esperanto

	touch $@

aspelltgz: clean build
	mkdir -p $(ASPELL6DIR)
	install -m 644 debian/aspell/Copyright $(ASPELL6DIR)
	install -m 644 debian/aspell/info $(ASPELL6DIR)
	install -m 644 debian/aspell/eo.dat $(ASPELL6DIR)
	install -m 644 debian/README.ispell debian/legumin.l3.ispell $(ASPELL6DIR)
	install -m 644 debian/README.aspell $(ASPELL6DIR)/README
	install -m 644 eo.aff.myspell $(ASPELL6DIR)/eo_affix.dat
	cat eo.dic | sed 1d | LC_COLLATE=C sort -u | \
		aspell --local-data-dir=$(ASPELL6DIR) --lang=eo  clean > $(ASPELL6DIR)/eo.wl
	( cd $(ASPELL6DIR) && \
		ln -sf $(ASPELLPROC) proc && \
		perl proc && \
		./configure && \
		make dist )
	mv $(ASPELL6DIR)/$(ASPELL6BASENAME)*.tar.bz2 ..

clean: clean-patched unpatch
clean-patched:
	dh_testdir
	dh_testroot
	rm -f build-stamp configure-stamp

	# Add here commands to clean up after the build process.
	rm -f eo.hash kune.txt kune.txt.cnt kune.txt.stat
	rm -f eo-latin3.aff
	rm -f debian/legumin.l3.ispell debian/README.ispell
	rm -rf $(TMP_BUILD)

	if [ -d $(ASPELL6DIR) ]; then \
		rm $(ASPELL6DIR)/* && rmdir $(ASPELL6DIR); fi

	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs

	# Add here commands to install the package into debian/${package}.

	installdeb-ispell -piesperanto
	installdeb-myspell --srcdir=$(TMP_BUILD) -pmyspell-eo
	installdeb-hunspell -pmyspell-eo
	installdeb-aspell -p$(apackage)
	installdeb-aspell -p$(apackage_cx)

# Build architecture-independent files here.
binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installdocs
	dh_installexamples
	dh_installmenu
	dh_install --sourcedir=$(TMP_BUILD)
#	dh_installman
#	dh_undocumented
	dh_installchangelogs
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
#	dh_makeshlibs
	dh_installdeb
#	dh_perl
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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

binary: binary-indep binary-arch
.PHONY: build clean clean-patched binary-indep binary-arch binary install patch unpatch configure