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
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
|
# File: Makefile.in -*- Makefile -*-
# Description: Makefile for the dictionaries-common Debian package
# Author: Rafael Laboissière <rafael@debian.org>
# Created on: Tue Oct 26 11:08:11 CEST 1999
# $Id: Makefile.in,v 1.23 2006/06/28 23:49:31 rafael Exp $
#########################################################################
# Release definitions (set by from configure script from information
# extracted from debian/changelog)
release := @RELEASE@
date := @DATE@
#########################################################################
# Installation directories
DESTDIR =
usr_dir := $(DESTDIR)/usr
bin_dir := $(usr_dir)/bin
sbin_dir := $(usr_dir)/sbin
share_dir := $(usr_dir)/share
policy_dir := $(share_dir)/doc/dictionaries-common-dev
man1_dir := $(share_dir)/man/man1
man3_dir := $(share_dir)/man/man3
man8_dir := $(share_dir)/man/man8
perl_dir := $(share_dir)/perl5/Debian
#########################################################################
# Perl module definitions
lib_dir := $(DESTDIR)@LIBDIR@
cache_dir := $(DESTDIR)@CACHEDIR@
emacs_lisp_dir := $(share_dir)/emacs/site-lisp/dictionaries-common
emacs_init_dir := $(DESTDIR)/etc/emacs/site-start.d
share_dict_dir := $(share_dir)/dictionaries-common
debconf_dir := $(share_dict_dir)/debconf
dh_auto_dir := $(share_dir)/debhelper/autoscripts
cdbs_dir := $(share_dict_dir)/cdbs
#########################################################################
# Script definitions
base_maintainer_scripts := config postinst postrm templates
ispell_maintainer_scripts := $(addsuffix -ispell,$(base_maintainer_scripts))
aspell_maintainer_scripts := $(addsuffix -aspell, postinst postrm)
wordlist_maintainer_scripts := \
$(addsuffix -wordlist,$(base_maintainer_scripts))
maintainer_scripts := $(addprefix scripts/maintainer/,\
$(ispell_maintainer_scripts) \
$(aspell_maintainer_scripts) \
$(wordlist_maintainer_scripts))
base_system_scripts := update-default select-default remove-default
ispell_system_scripts := $(addsuffix -ispell,$(base_system_scripts))
aspell_system_scripts := $(addsuffix -aspell, update-dictcommon)
wordlist_system_scripts := $(addsuffix -wordlist,$(base_system_scripts))
# myspell system script moved to system_scripts_noauto
system_scripts := $(addprefix scripts/system/,\
$(ispell_system_scripts) \
$(aspell_system_scripts) \
$(wordlist_system_scripts) \
$(myspell_system_scripts))
base_debhelper_script := installdeb
debhelper_scripts := $(addprefix scripts/debhelper/,\
$(base_debhelper_script)-ispell \
$(base_debhelper_script)-aspell \
$(base_debhelper_script)-wordlist)
# noauto scripts. This will not be generated from .in files but directly handled
# user scripts also fit in this section
user_scripts := $(addprefix scripts/system/, \
select-default-iwrap \
ispell-wrapper)
system_scripts_noauto := $(addprefix scripts/system/,\
ispell-autobuildhash \
aspell-autobuildhash \
update-openoffice-dicts)
maintainer_scripts_noauto := $(addprefix scripts/maintainer/, \
postinst-myspell \
postrm-myspell)
debhelper_scripts_noauto := $(addprefix scripts/debhelper/, \
installdeb-myspell)
#########################################################################
# Policy definitions
policy := policy/dsdt-policy
html_stylesheet := policy/html.dsl
#########################################################################
# Main target for build
all: $(policy).txt $(system_scripts) $(debhelper_scripts)
#########################################################################
# Policy XML document
$(policy).html: $(policy).xml $(html_stylesheet) $(maintainer_scripts)
jade -t sgml -V nochunks -d $(html_stylesheet) \
/usr/share/sgml/declaration/xml.decl $< > $@
%.txt: %.html
links -dump $< | perl -pi -e 's/\015 *//g' > $@
#########################################################################
# Template rules using the slice filter
%-ispell: %.in
slice -oUNDEF+I+IW+IA-A-W:$@ $<
%-aspell: %.in
slice -oUNDEF+A+IA-I-W:$@ $<
%-wordlist: %.in
slice -oUNDEF+W+IW-I-A:$@ $<
#########################################################################
# Installation
install: all
# Superuser scripts
install -d $(sbin_dir)
install --mode=755 $(system_scripts) $(system_scripts_noauto) $(sbin_dir)
# Regular system scripts
install -d $(bin_dir)
install --mode=755 $(user_scripts) $(bin_dir)
# Debhelper scripts
install --mode=755 $(debhelper_scripts) $(debhelper_scripts_noauto) $(bin_dir)
# CDBS makefile scrap
install -d $(cdbs_dir)
install --mode=644 scripts/cdbs/dict-common.mk $(cdbs_dir)
# Maintainer script
install -d $(dh_auto_dir)
install --mode=644 $(maintainer_scripts) $(maintainer_scripts_noauto) $(dh_auto_dir)
install -d $(debconf_dir)
mv $(dh_auto_dir)/config-* $(dh_auto_dir)/templates-* $(debconf_dir)
# Perl module
install -d $(perl_dir)
install --mode=644 scripts/Debian/DictionariesCommon.pm $(perl_dir)
# Man pages
install -d $(man1_dir)
install -d $(man3_dir)
install -d $(man8_dir)
for i in $(sbin_dir)/* ; do \
b=`basename $$i` ; \
( cd $(sbin_dir) ; \
pod2man --release=$(release) --section=8 --date=$(date) \
--center=" " $$b ) > $(man8_dir)/$$b.8 ; \
done
for i in $(bin_dir)/* ; do \
b=`basename $$i` ; \
( cd $(bin_dir) ; \
pod2man --release=$(release) --section=1 --date=$(date) \
--center=" " $$b ) | sed s/ê/\\\\[^e]/ > $(man1_dir)/$$b.1 ; \
done
( cd scripts/Debian ; \
pod2man --release=$(release) --section=3pm --date=$(date) \
--center=" " DictionariesCommon.pm ) \
> $(man3_dir)/Debian::DictionariesCommon.3pm
# dictionaries-common cache & lib directories
install -d $(lib_dir)/ispell
install -d $(lib_dir)/wordlist
install -d $(cache_dir)
# Policy
install -d $(policy_dir)
install --mode=644 $(policy).html $(policy).txt $(policy_dir)
# Emacsen support
install -d $(emacs_lisp_dir) $(emacs_init_dir)
install --mode=644 support/emacsen/*.el $(emacs_lisp_dir)
mv $(emacs_lisp_dir)/startup.el \
$(emacs_init_dir)/50dictionaries-common.el
# Mutt support
install --mode=644 support/mutt/ispell-init \
$(share_dict_dir)/mutt-ispell-init
# Shared debconf stuff
install --mode=644 scripts/system/dc-debconf-select.pl \
$(share_dict_dir)
# Make config
cat debian/dictionaries-common.config-base \
scripts/system/dc-debconf-select.pl \
> debian/dictionaries-common.config
#########################################################################
# Mr Proper
clean:
rm -f $(policy).html $(policy).txt $(maintainer_scripts) \
$(system_scripts) $(debhelper_scripts) \
debian/dictionaries-common.config
distclean: clean
rm -f Makefile config.* scripts/Debian/DictionariesCommon.pm \
support/emacsen/startup.el $(policy).xml
maintainer-clean: distclean
rm -f configure
#########################################################################
# Postlog
.PHONY: all clean distclean maintainer-clean install
|