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 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183
|
#!/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 compatibility version to use.
#export DH_COMPAT=3
# -- ispell dict package name and dirs
IPACKAGE = igalician-minimos
IDIR = $(CURDIR)/debian/$(IPACKAGE)/usr/lib/ispell
ISHAREDIR = $(CURDIR)/debian/$(IPACKAGE)/usr/share/ispell
IVARDIR = $(CURDIR)/debian/$(IPACKAGE)/var/lib/ispell
# -- wordlist package name and dirs
WPACKAGE = wgalician-minimos
WDIR = $(CURDIR)/debian/$(WPACKAGE)/usr/share/dict
# -- aspell dict package name and dirs
APACKAGE = aspell-gl-minimos
ADIR = $(CURDIR)/debian/$(APACKAGE)/usr/lib/aspell
ADATADIR = $(CURDIR)/debian/$(APACKAGE)/usr/lib/aspell
AVARDIR = $(CURDIR)/debian/$(APACKAGE)/var/lib/aspell
ASHAREDIR = $(CURDIR)/debian/$(APACKAGE)/usr/share/aspell
# -- aspell official dict builddir
ASPELL6BASENAME = aspell6-gl
ASPELL6DIR = $(CURDIR)/debian/$(ASPELL6BASENAME)
ASPELLPROC = /usr/share/aspell-lang/proc # Location of proc script
# Make sure build is always done in a reproducible and working
# language environment
LC_ALL = C
export LC_ALL
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
CFLAGS += -g
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
endif
configure: configure-stamp
configure-stamp:
dh_testdir
# Add here commands to configure the package.
touch configure-stamp
build: build-arch build-indep
build-arch: build-stamp
build-indep: build-stamp
build-stamp: configure-stamp
dh_testdir
# Add here commands to compile the package.
# $(MAKE)
# /usr/bin/docbook-to-man debian/ispell-gl.sgml > ispell-gl.1
gzip -9n -c galician.words > galician-minimos.mwl.gz
buildhash galician.words galician.aff galician.hash
#
cat galician.words | \
ispell -d ./galician -e | \
tr -s ' ' '\n' | \
LC_ALL=POSIX sort -u | \
iconv -f latin1 -t utf-8 > galician-minimos.debian-plain-wordlist
# -- Creating myspell aff file for aspell-gl-es
ispellaff2myspell --charset=latin1 \
--myheader=debian/gl_ES.myheader \
--replacements=debian/gl_ES.replaces \
galician.aff > gl_ES.myaff
# -- Dealing with aspell
cat galician.words | \
prezip -s -c | \
gzip -9n -c > gl-minimos.cwl.gz
# -- Make docs utf-8
mkdir -p tmp
for i in readme.txt leme.txt normas.txt LICENZA.txt; do \
iconv -f iso-8859-1 -t utf-8 $$i > tmp/$$i; done
# -- Done
touch build-stamp
aspelltgz: clean build
mkdir -p $(ASPELL6DIR)/doc
install -m 0644 debian/aspell/Copyright $(ASPELL6DIR)
install -m 0644 debian/aspell/info $(ASPELL6DIR)
install -m 0644 /usr/share/common-licenses/GPL-2 $(ASPELL6DIR)/COPYING
sed 's/gl-minimos/gl/' debian/galician-minimos.dat > debian/aspell/gl.dat
install -m 0644 debian/aspell/gl.dat $(ASPELL6DIR)/gl.dat
install -m 0644 debian/galician_phonet.dat $(ASPELL6DIR)/gl_phonet.dat
install -m 0644 gl_ES.myaff $(ASPELL6DIR)/gl_affix.dat
install -m 0644 debian/README.minimos normas.txt $(ASPELL6DIR)/doc
cat gl_ES.mydict | \
sed 1d | \
LC_COLLATE=C sort -u > $(ASPELL6DIR)/gl.wl
( cd $(ASPELL6DIR) && \
ln -sf $(ASPELLPROC) && \
perl proc && \
./configure && \
make dist )
mv $(ASPELL6DIR)/$(ASPELL6BASENAME)*.tar.bz2 ..
clean:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
# Add here commands to clean up after the build process.
# -$(MAKE) clean
-rm galician.hash galician.words.cnt galician.words.stat galician-minimos.mwl.gz
-rm galician-minimos.debian-plain-wordlist
#
rm -f gl_ES.mydict gl_ES.myaff
rm -f gl-minimos.cwl.gz
rm -f debian/aspell/gl.dat
-rm -f $(ASPELL6DIR)/doc/* && rmdir $(ASPELL6DIR)/doc
-rm -f $(ASPELL6DIR)/* && rmdir $(ASPELL6DIR)
-rm -f tmp/* && rmdir tmp
#
dh_clean
install: build
dh_testdir
dh_testroot
dh_prep
dh_installdirs
# Add here commands to install the package into debian/ispell-gl.
# $(MAKE) install DESTDIR=$(CURDIR)/debian/ispell-gl
# -- ispell
# install -m 644 galician.hash $(IDIR)/galician-minimos.hash
install -m 644 galician-minimos.mwl.gz $(ISHAREDIR)
install -m 644 galician.aff $(IDIR)/galician-minimos.aff
# -- wordlist
install -m 644 galician-minimos.debian-plain-wordlist $(WDIR)/galician-minimos
# -- aspell
# install -m 644 galician-minimos.debian-aspell-dict $(ADIR)/galician-minimos.rws
install -m 644 gl-minimos.cwl.gz $(ASHAREDIR)
install -m 644 debian/galician-minimos.dat $(ADATADIR)/gl-minimos.dat
install -m 644 debian/galician_phonet.dat $(ADATADIR)/gl-minimos_phonet.dat
install -m 644 debian/gl-minimos.multi $(ADIR)
install -m 644 debian/galician-minimos.alias $(ADIR)
install -m 644 gl_ES.myaff $(ADATADIR)/gl-minimos_affix.dat
# This is really more appropiate for a binary-common target, but for
# simplicity this is also a good place
installdeb-wordlist -p$(WPACKAGE) # Calls internally dh_installdebconf
installdeb-ispell -p$(IPACKAGE) # Calls internally dh_installdebconf
installdeb-aspell -p$(APACKAGE)
#
dh_installdocs -A
# Build architecture-independent files here.
#binary-indep: DH_OPTIONS=--package=$(IPACKAGE) --package=$(WPACKAGE) --package=$(MPACKAGE) --package=$(APACKAGE)
binary-indep: build install
dh_testdir
dh_testroot
dh_installexamples
dh_installmenu
dh_installman
dh_installchangelogs
dh_link
dh_compress
dh_fixperms
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb --package=$(WPACKAGE)
dh_builddeb --package=$(IPACKAGE)
dh_builddeb --package=$(APACKAGE)
binary-arch:
binary: binary-indep
.PHONY: build clean binary-indep binary-arch binary install configure
|