source: ubiquity/trunk/fuentes/d-i/source/console-setup/debian/rules @ 1053

Last change on this file since 1053 was 1053, checked in by kbut, 3 years ago

add ubiquity

  • Property svn:executable set to *
File size: 12.5 KB
Line 
1#!/usr/bin/make -f
2
3SHELL = /bin/bash
4
5ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
6  NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
7  MAKEFLAGS += -j$(NUMJOBS)
8endif
9
10xkbdir = /usr/share/X11/xkb
11export xkbdir
12pre = debian/preprocessor
13
14manprocessor = sed \
15        -e 's|^\([.a-zA-Z][a-zA-Z]*\) /usr/local/etc|\1 /etc|' \
16        -e 's|^\([.a-zA-Z][a-zA-Z]*\) /usr/local|\1 /usr|'
17
18# One font per fontset supported by d-i in text console
19udeb-fonts = CyrAsia-Fixed16 CyrSlav-TerminusBold16 Greek-VGA16 \
20Lat15-TerminusBold16 Lat2-TerminusBold16 Lat38-VGA16 Lat7-TerminusBold16
21# These are not properly supported by d-i in text console
22# Armenian-Fixed16 CyrKoi-TerminusBold16 Georgian-Fixed16 Hebrew-VGA16  Lao-Fixed16  Thai-Fixed16
23
24# These are Linux-only
25udeb-fonts-big = Uni1-VGA16 Uni2-VGA16 Uni3-Fixed16
26# These are not properly supported by d-i in text console
27# Arabic-VGA16 Ethiopian-Goha16 Vietnamese-Fixed16
28
29# One fontset per charmap
30udeb-scm = $(addprefix Fonts/, ARMSCII-8_Armenian.scm                   \
31CP1251_CyrSlav.scm CP1255_Hebrew.scm GEORGIAN-ACADEMY_Georgian.scm      \
32GEORGIAN-PS_Georgian.scm IBM1133_Lao.scm ISO-8859-1_Lat15.scm           \
33ISO-8859-2_Lat2.scm ISO-8859-3_Lat38.scm ISO-8859-4_Lat7.scm            \
34ISO-8859-4_Lat15.scm ISO-8859-5_CyrSlav.scm ISO-8859-7_Greek.scm        \
35ISO-8859-8_Hebrew.scm ISO-8859-9_Lat15.scm ISO-8859-10_Lat15.scm        \
36ISO-8859-11_Thai.scm ISO-8859-13_Lat7.scm ISO-8859-14_Lat38.scm         \
37ISO-8859-15_Lat15.scm ISO-8859-16_Lat2.scm KOI8-R_CyrKoi.scm            \
38KOI8-U_CyrKoi.scm TIS-620_Thai.scm)
39
40udeb-fonts-linux = $(addprefix Fonts/, $(addsuffix .psf.gz, \
41                        $(udeb-fonts)))
42udeb-fonts-freebsd = $(addprefix Fonts/, $(addsuffix .fnt, $(udeb-fonts)))
43
44main_build:
45        rm Keyboard/KeyboardNames.pl
46        $(MAKE) build-all xkbdir=$(xkbdir)
47        touch main_build
48
49debian/kbdnames.gz: main_build
50        ( cd Keyboard \
51        && ./kbdnames-maker KeyboardNames.pl \
52                | grep -v '^C[*]' | grep -v '[*]model[*]' | sort | gzip -9 ) >$@
53
54build: build-arch build-indep
55build-arch: build-stamp
56build-indep: build-stamp
57build-stamp: main_build debian/kbdnames.gz
58
59.PHONY : clean
60clean:
61        dh_testdir
62        $(MAKE) maintainer-clean
63        -rm -f build main_build
64        -rm -f debian/kbdnames.gz
65        -rm -f debian/*~
66        dh_clean
67        cp COPYRIGHT debian/copyright
68
69.PHONY : install
70install: install-linux install-freebsd install-main install-bdf2psf install-linux-udeb install-freebsd-udeb install-udeb
71
72.PHONY : install-linux
73install-linux: build
74        dh_testdir
75        dh_testroot
76        dh_prep -p console-setup-linux
77        $(MAKE) etcdir=debian/console-setup-linux/etc \
78                prefix=debian/console-setup-linux/usr install-common-linux
79
80.PHONY : install-freebsd
81install-freebsd: build
82        dh_testdir
83        dh_testroot
84        dh_prep -p console-setup-freebsd
85        $(MAKE) etcdir=debian/console-setup-freebsd/etc \
86                prefix=debian/console-setup-freebsd/usr install-common-freebsd
87
88.PHONY : install-main
89install-main: build
90        dh_testdir
91        dh_testroot
92        dh_prep -pkeyboard-configuration
93        dh_prep -p console-setup
94        dh_prep -p console-setup-mini
95        $(MAKE) etcdir=debian/console-setup/etc \
96                prefix=debian/console-setup/usr install-common
97        $(MAKE) etcdir=debian/console-setup/etc \
98                prefix=debian/console-setup/usr install-ckbcomp
99        dh_install -pconsole-setup Keyboard/pc105.tree \
100                usr/share/console-setup
101        dh_installinit -pconsole-setup \
102                --no-start --name console-font
103ifneq (,$(filter console-setup-linux, $(shell dh_listpackages)))
104        dh_installinit -pconsole-setup-linux \
105                --no-start --name setvtrgb
106        install -m 644 debian/vtrgb debian/console-setup-linux/etc/console-setup/
107        install -m 644 debian/vtrgb.vga debian/console-setup-linux/etc/console-setup/
108endif
109        $(MAKE) etcdir=debian/console-setup-mini/etc \
110                prefix=debian/console-setup-mini/usr install-common
111        $(MAKE) etcdir=debian/console-setup-mini/etc \
112                prefix=debian/console-setup-mini/usr install-ckbcomp-mini
113        $(pre) --mini debian/console-setup-mini/bin/setupcon
114        $(pre) --mini debian/console-setup-mini/usr/bin/ckbcomp-mini
115        ls debian/console-setup*/usr/share/man/*/* \
116                | xargs -n 1 $(manprocessor) -i
117        install -d debian/keyboard-configuration/usr/share/console-setup/
118        mv debian/console-setup/etc/default/keyboard \
119                debian/keyboard-configuration/usr/share/console-setup/
120        install -d debian/console-setup/usr/share/console-setup/
121        mv debian/console-setup/etc/default/console-setup \
122                debian/console-setup/usr/share/console-setup/
123        rm debian/console-setup-mini/etc/default/keyboard
124        rm debian/console-setup-mini/etc/default/console-setup
125        dh_movefiles -pkeyboard-configuration --sourcedir=debian/console-setup \
126                usr/share/man/man5/keyboard.5
127        rm debian/console-setup-mini/usr/share/man/man5/keyboard.5
128# For KeyboardNames.pl and kbdnames-maker see #420914
129        dh_install -pkeyboard-configuration Keyboard/KeyboardNames.pl \
130                usr/share/console-setup/
131        dh_install -pkeyboard-configuration Keyboard/kbdnames-maker \
132                usr/share/console-setup/
133        dh_link -pkeyboard-configuration usr/share/X11/xkb/rules/xorg.lst \
134                usr/share/doc/keyboard-configuration/xorg.lst
135        # no upstart job for keyboard-setup
136        dh_installinit -pkeyboard-configuration \
137                --no-start --name console-setup -- start 49 S .
138        install -d debian/keyboard-configuration/usr/share/initramfs-tools/hooks \
139                debian/keyboard-configuration/usr/share/initramfs-tools/scripts/init-top \
140                debian/keyboard-configuration/usr/share/initramfs-tools/scripts/panic
141        install -m755 debian/console-setup.initramfs-hook \
142                debian/keyboard-configuration/usr/share/initramfs-tools/hooks/console_setup
143        install -m755 debian/console-setup.initramfs-top \
144                debian/keyboard-configuration/usr/share/initramfs-tools/scripts/init-top/console_setup
145        sed -e "/^OPTION=/d" \
146                < debian/console-setup.initramfs-top \
147                > debian/keyboard-configuration/usr/share/initramfs-tools/scripts/panic/console_setup
148        chmod 755 debian/keyboard-configuration/usr/share/initramfs-tools/scripts/panic/console_setup
149        install -d debian/keyboard-configuration/usr/share/apport/package-hooks
150        install -m644 debian/console-setup.apport \
151                debian/keyboard-configuration/usr/share/apport/package-hooks/source_console-setup.py
152        dh_install -pkeyboard-configuration console-setup-tty lib/udev
153        dh_installudev -pkeyboard-configuration --priority=85
154
155
156.PHONY : install-bdf2psf
157install-bdf2psf: build
158        dh_testdir
159        dh_testroot
160        dh_prep -pbdf2psf
161        dh_install -pbdf2psf Fonts/bdf2psf usr/bin/
162        dh_install -pbdf2psf Fonts/*.equivalents Fonts/*.set \
163                Fonts/fontsets usr/share/bdf2psf
164        dh_installman -pbdf2psf man/bdf2psf.1
165        dh_installdocs -pbdf2psf debian/README.fontsets
166
167.PHONY : install-linux-udeb
168install-linux-udeb: build
169        dh_testdir
170        dh_testroot
171# console-setup-linux-charmaps-udeb
172        dh_prep -p console-setup-linux-charmaps-udeb
173        $(MAKE) etcdir=debian/console-setup-linux-charmaps-udeb/etc \
174                prefix=debian/console-setup-linux-charmaps-udeb/usr \
175                        install-common-linux
176        dh_install -p console-setup-linux-charmaps-udeb \
177                Keyboard/charmap_functions.sh usr/share/console-setup/
178        rm -r debian/console-setup-linux-charmaps-udeb/usr/share/consolefonts/
179# console-setup-linux-fonts-udeb
180        dh_prep -p console-setup-linux-fonts-udeb
181        dh_install -p console-setup-linux-fonts-udeb $(udeb-fonts-linux) \
182                usr/share/consolefonts
183        dh_install -p console-setup-linux-fonts-udeb debian/font-switch \
184                /usr/share/console-setup
185
186.PHONY : install-freebsd-udeb
187install-freebsd-udeb: build
188        dh_testdir
189        dh_testroot
190# console-setup-freebsd-charmaps-udeb
191        dh_prep -p console-setup-freebsd-charmaps-udeb
192        $(MAKE) etcdir=debian/console-setup-freebsd-charmaps-udeb/etc \
193                prefix=debian/console-setup-freebsd-charmaps-udeb/usr \
194                        install-common-freebsd
195        dh_install -p console-setup-freebsd-charmaps-udeb \
196                Keyboard/charmap_functions.sh usr/share/console-setup/
197        rm -r debian/console-setup-freebsd-charmaps-udeb/usr/share/consoletrans/
198        rm -r debian/console-setup-freebsd-charmaps-udeb/usr/share/syscons/
199# console-setup-freebsd-fonts-udeb
200        dh_prep -p console-setup-freebsd-fonts-udeb
201        dh_install -p console-setup-freebsd-fonts-udeb $(udeb-fonts-freebsd) \
202                usr/share/syscons/fonts/
203        dh_install -p console-setup-freebsd-fonts-udeb $(udeb-scm) \
204                usr/share/syscons/scrnmaps/
205
206.PHONY : install-udeb
207install-udeb: build
208        dh_testdir
209        dh_testroot
210        dh_prep -p console-setup-amiga-ekmap
211        dh_prep -p console-setup-ataritt-ekmap
212        dh_prep -p console-setup-macintoshold-ekmap
213        dh_prep -p console-setup-pc-ekmap
214        dh_prep -p console-setup-sun4-ekmap
215        dh_prep -p console-setup-sun5-ekmap
216        dh_prep -p console-setup-udeb
217        dh_prep -p console-setup-pc-ekbd
218        $(MAKE) etcdir=debian/console-setup-udeb/etc \
219                prefix=debian/console-setup-udeb/usr install-common
220        $(MAKE) etcdir=debian/console-setup-udeb/etc \
221                prefix=debian/console-setup-udeb/usr install-ckbcomp-mini
222        $(pre) --udeb debian/console-setup-udeb/bin/setupcon
223        $(pre) --udeb debian/console-setup-udeb/usr/bin/ckbcomp-mini
224        rm -r debian/console-setup-udeb/usr/share/man/
225        dh_installdirs -p console-setup-udeb usr/share/console-setup
226        mv debian/console-setup-udeb/etc/default/keyboard \
227                debian/console-setup-udeb/usr/share/console-setup/
228        rm debian/console-setup-udeb/etc/default/console-setup
229        rm debian/console-setup-udeb/usr/share/console-setup/charmap_functions.sh
230        install -m0755 debian/keyboard-configuration.config \
231                debian/console-setup-udeb/usr/share/console-setup/
232        $(pre) --udeb debian/console-setup-udeb/usr/share/console-setup/keyboard-configuration.config
233        dh_installdirs -p console-setup-udeb lib/debian-installer.d/
234        install -m0644 debian/console-setup-udeb.startup \
235                debian/console-setup-udeb/lib/debian-installer.d/S55console-setup
236        dh_installdirs -p console-setup-udeb usr/lib/base-installer.d
237        install -m0755 debian/console-setup-udeb.base-installer \
238                debian/console-setup-udeb/usr/lib/base-installer.d/20console-setup
239        install -m 644 debian/vtrgb debian/console-setup-udeb/etc/
240        install -m 644 debian/vtrgb.vga debian/console-setup-udeb/etc/
241        $(pre) --udeb debian/console-setup-udeb/usr/lib/base-installer.d/20console-setup
242# console-setup-*-ekmap
243        dh_movefiles -p console-setup-amiga-ekmap --sourcedir=debian/console-setup-udeb usr/share/console-setup/amiga.ekmap.gz
244        cat Keyboard/amiga.ekmap.gz >debian/console-setup-amiga-ekmap/usr/share/console-setup/amiga.ekmap.gz
245        dh_movefiles -p console-setup-ataritt-ekmap --sourcedir=debian/console-setup-udeb usr/share/console-setup/ataritt.ekmap.gz
246        cat Keyboard/ataritt.ekmap.gz >debian/console-setup-ataritt-ekmap/usr/share/console-setup/ataritt.ekmap.gz
247        dh_movefiles -p console-setup-macintoshold-ekmap --sourcedir=debian/console-setup-udeb usr/share/console-setup/macintosh_old.ekmap.gz
248        cat Keyboard/macintosh_old.ekmap.gz >debian/console-setup-macintoshold-ekmap/usr/share/console-setup/macintosh_old.ekmap.gz
249        dh_movefiles -p console-setup-pc-ekmap --sourcedir=debian/console-setup-udeb usr/share/console-setup/pc105.ekmap.gz
250        cat Keyboard/pc105.ekmap.gz >debian/console-setup-pc-ekmap/usr/share/console-setup/pc105.ekmap.gz
251        dh_install -pconsole-setup-pc-ekmap Keyboard/pc105.tree \
252                usr/share/console-setup-mini
253        dh_movefiles -p console-setup-sun4-ekmap --sourcedir=debian/console-setup-udeb usr/share/console-setup/sun4.ekmap.gz
254        cat Keyboard/sun4.ekmap.gz >debian/console-setup-sun4-ekmap/usr/share/console-setup/sun4.ekmap.gz
255        dh_movefiles -p console-setup-sun5-ekmap --sourcedir=debian/console-setup-udeb usr/share/console-setup/sun5.ekmap.gz
256        cat Keyboard/sun5.ekmap.gz >debian/console-setup-sun5-ekmap/usr/share/console-setup/sun5.ekmap.gz
257        dh_movefiles -p console-setup-pc-ekbd --sourcedir=debian/console-setup-udeb usr/share/console-setup/pc105.ekbd.gz
258        cat Keyboard/pc105.ekbd.gz >debian/console-setup-pc-ekbd/usr/share/console-setup/pc105.ekbd.gz
259
260# Build architecture-independent files here.
261.PHONY : binary-indep
262binary-indep: build install
263        dh_testdir
264        dh_testroot
265        dh_installdebconf
266        dh_installdocs -pkeyboard-configuration \
267                FAQ copyright.fonts copyright.xkb
268        dh_installdocs -p console-setup-linux --link-doc=keyboard-configuration
269        dh_installdocs -pconsole-setup-freebsd --link-doc=keyboard-configuration
270        dh_installdocs -p console-setup-mini --link-doc=keyboard-configuration
271        dh_installdocs -p console-setup --link-doc=keyboard-configuration
272        dh_lintian
273        dh_bugfiles
274        dh_installman
275        dh_installchangelogs
276        dh_compress
277        dh_fixperms
278        dh_installdeb
279# To deal somehow with bug #657904.  See also #255819 and #17624.
280#       rm debian/console-setup/usr/share/doc/console-setup
281        $(pre) debian/keyboard-configuration/DEBIAN/config
282        $(pre) debian/keyboard-configuration/DEBIAN/postinst
283        $(pre) debian/console-setup/DEBIAN/config
284        $(pre) debian/console-setup/DEBIAN/postinst
285        $(pre) --udeb debian/console-setup-udeb/DEBIAN/postinst
286        dh_gencontrol
287        dh_md5sums
288        dh_builddeb
289
290# Build architecture-dependent files here.
291.PHONY : binary-arch
292binary-arch : build install
293# We have nothing to do by default.
294
295.PHONY : binary
296binary : binary-indep binary-arch
Note: See TracBrowser for help on using the repository browser.