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

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

Update from upstream

  • Property svn:executable set to *
File size: 12.6 KB
RevLine 
[1053]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
[3069]79ifneq (,$(filter console-setup-linux, $(shell dh_listpackages)))
80        dh_installinit -pconsole-setup-linux \
81                --no-start --name setvtrgb -- start 49 S .
82        dh_link -pconsole-setup-linux
83        install -m 644 debian/vtrgb debian/console-setup-linux/etc/console-setup/
84        install -m 644 debian/vtrgb.vga debian/console-setup-linux/etc/console-setup/
85endif
[1053]86
87.PHONY : install-freebsd
88install-freebsd: build
89        dh_testdir
90        dh_testroot
91        dh_prep -p console-setup-freebsd
92        $(MAKE) etcdir=debian/console-setup-freebsd/etc \
93                prefix=debian/console-setup-freebsd/usr install-common-freebsd
94
95.PHONY : install-main
96install-main: build
97        dh_testdir
98        dh_testroot
99        dh_prep -pkeyboard-configuration
100        dh_prep -p console-setup
101        dh_prep -p console-setup-mini
102        $(MAKE) etcdir=debian/console-setup/etc \
103                prefix=debian/console-setup/usr install-common
104        $(MAKE) etcdir=debian/console-setup/etc \
105                prefix=debian/console-setup/usr install-ckbcomp
106        dh_install -pconsole-setup Keyboard/pc105.tree \
107                usr/share/console-setup
108        dh_installinit -pconsole-setup \
109                --no-start --name console-font
110        $(MAKE) etcdir=debian/console-setup-mini/etc \
111                prefix=debian/console-setup-mini/usr install-common
112        $(MAKE) etcdir=debian/console-setup-mini/etc \
113                prefix=debian/console-setup-mini/usr install-ckbcomp-mini
114        $(pre) --mini debian/console-setup-mini/bin/setupcon
115        $(pre) --mini debian/console-setup-mini/usr/bin/ckbcomp-mini
116        ls debian/console-setup*/usr/share/man/*/* \
117                | xargs -n 1 $(manprocessor) -i
118        install -d debian/keyboard-configuration/usr/share/console-setup/
119        mv debian/console-setup/etc/default/keyboard \
120                debian/keyboard-configuration/usr/share/console-setup/
121        install -d debian/console-setup/usr/share/console-setup/
122        mv debian/console-setup/etc/default/console-setup \
123                debian/console-setup/usr/share/console-setup/
124        rm debian/console-setup-mini/etc/default/keyboard
125        rm debian/console-setup-mini/etc/default/console-setup
126        dh_movefiles -pkeyboard-configuration --sourcedir=debian/console-setup \
127                usr/share/man/man5/keyboard.5
128        rm debian/console-setup-mini/usr/share/man/man5/keyboard.5
129# For KeyboardNames.pl and kbdnames-maker see #420914
130        dh_install -pkeyboard-configuration Keyboard/KeyboardNames.pl \
131                usr/share/console-setup/
132        dh_install -pkeyboard-configuration Keyboard/kbdnames-maker \
133                usr/share/console-setup/
134        dh_link -pkeyboard-configuration usr/share/X11/xkb/rules/xorg.lst \
135                usr/share/doc/keyboard-configuration/xorg.lst
136        dh_installinit -pkeyboard-configuration \
[3069]137                --no-start --name keyboard-setup -- start 49 S .
138        dh_installinit -pkeyboard-configuration \
[1053]139                --no-start --name console-setup -- start 49 S .
140        install -d debian/keyboard-configuration/usr/share/initramfs-tools/hooks \
141                debian/keyboard-configuration/usr/share/initramfs-tools/scripts/init-top \
142                debian/keyboard-configuration/usr/share/initramfs-tools/scripts/panic
143        install -m755 debian/console-setup.initramfs-hook \
144                debian/keyboard-configuration/usr/share/initramfs-tools/hooks/console_setup
145        install -m755 debian/console-setup.initramfs-top \
146                debian/keyboard-configuration/usr/share/initramfs-tools/scripts/init-top/console_setup
147        sed -e "/^OPTION=/d" \
148                < debian/console-setup.initramfs-top \
149                > debian/keyboard-configuration/usr/share/initramfs-tools/scripts/panic/console_setup
150        chmod 755 debian/keyboard-configuration/usr/share/initramfs-tools/scripts/panic/console_setup
151        install -d debian/keyboard-configuration/usr/share/apport/package-hooks
152        install -m644 debian/console-setup.apport \
153                debian/keyboard-configuration/usr/share/apport/package-hooks/source_console-setup.py
154        dh_install -pkeyboard-configuration console-setup-tty lib/udev
155        dh_installudev -pkeyboard-configuration --priority=85
156
157
158.PHONY : install-bdf2psf
159install-bdf2psf: build
160        dh_testdir
161        dh_testroot
162        dh_prep -pbdf2psf
163        dh_install -pbdf2psf Fonts/bdf2psf usr/bin/
164        dh_install -pbdf2psf Fonts/*.equivalents Fonts/*.set \
165                Fonts/fontsets usr/share/bdf2psf
166        dh_installman -pbdf2psf man/bdf2psf.1
167        dh_installdocs -pbdf2psf debian/README.fontsets
168
169.PHONY : install-linux-udeb
170install-linux-udeb: build
171        dh_testdir
172        dh_testroot
173# console-setup-linux-charmaps-udeb
174        dh_prep -p console-setup-linux-charmaps-udeb
175        $(MAKE) etcdir=debian/console-setup-linux-charmaps-udeb/etc \
176                prefix=debian/console-setup-linux-charmaps-udeb/usr \
177                        install-common-linux
178        dh_install -p console-setup-linux-charmaps-udeb \
179                Keyboard/charmap_functions.sh usr/share/console-setup/
180        rm -r debian/console-setup-linux-charmaps-udeb/usr/share/consolefonts/
181# console-setup-linux-fonts-udeb
182        dh_prep -p console-setup-linux-fonts-udeb
183        dh_install -p console-setup-linux-fonts-udeb $(udeb-fonts-linux) \
184                usr/share/consolefonts
185        dh_install -p console-setup-linux-fonts-udeb debian/font-switch \
186                /usr/share/console-setup
187
188.PHONY : install-freebsd-udeb
189install-freebsd-udeb: build
190        dh_testdir
191        dh_testroot
192# console-setup-freebsd-charmaps-udeb
193        dh_prep -p console-setup-freebsd-charmaps-udeb
194        $(MAKE) etcdir=debian/console-setup-freebsd-charmaps-udeb/etc \
195                prefix=debian/console-setup-freebsd-charmaps-udeb/usr \
196                        install-common-freebsd
197        dh_install -p console-setup-freebsd-charmaps-udeb \
198                Keyboard/charmap_functions.sh usr/share/console-setup/
199        rm -r debian/console-setup-freebsd-charmaps-udeb/usr/share/consoletrans/
200        rm -r debian/console-setup-freebsd-charmaps-udeb/usr/share/syscons/
201# console-setup-freebsd-fonts-udeb
202        dh_prep -p console-setup-freebsd-fonts-udeb
203        dh_install -p console-setup-freebsd-fonts-udeb $(udeb-fonts-freebsd) \
204                usr/share/syscons/fonts/
205        dh_install -p console-setup-freebsd-fonts-udeb $(udeb-scm) \
206                usr/share/syscons/scrnmaps/
207
208.PHONY : install-udeb
209install-udeb: build
210        dh_testdir
211        dh_testroot
212        dh_prep -p console-setup-amiga-ekmap
213        dh_prep -p console-setup-ataritt-ekmap
214        dh_prep -p console-setup-macintoshold-ekmap
215        dh_prep -p console-setup-pc-ekmap
216        dh_prep -p console-setup-sun4-ekmap
217        dh_prep -p console-setup-sun5-ekmap
218        dh_prep -p console-setup-udeb
219        dh_prep -p console-setup-pc-ekbd
220        $(MAKE) etcdir=debian/console-setup-udeb/etc \
221                prefix=debian/console-setup-udeb/usr install-common
222        $(MAKE) etcdir=debian/console-setup-udeb/etc \
223                prefix=debian/console-setup-udeb/usr install-ckbcomp-mini
224        $(pre) --udeb debian/console-setup-udeb/bin/setupcon
225        $(pre) --udeb debian/console-setup-udeb/usr/bin/ckbcomp-mini
226        rm -r debian/console-setup-udeb/usr/share/man/
227        dh_installdirs -p console-setup-udeb usr/share/console-setup
228        mv debian/console-setup-udeb/etc/default/keyboard \
229                debian/console-setup-udeb/usr/share/console-setup/
230        rm debian/console-setup-udeb/etc/default/console-setup
231        rm debian/console-setup-udeb/usr/share/console-setup/charmap_functions.sh
232        install -m0755 debian/keyboard-configuration.config \
233                debian/console-setup-udeb/usr/share/console-setup/
234        $(pre) --udeb debian/console-setup-udeb/usr/share/console-setup/keyboard-configuration.config
235        dh_installdirs -p console-setup-udeb lib/debian-installer.d/
236        install -m0644 debian/console-setup-udeb.startup \
237                debian/console-setup-udeb/lib/debian-installer.d/S55console-setup
238        dh_installdirs -p console-setup-udeb usr/lib/base-installer.d
239        install -m0755 debian/console-setup-udeb.base-installer \
240                debian/console-setup-udeb/usr/lib/base-installer.d/20console-setup
241        install -m 644 debian/vtrgb debian/console-setup-udeb/etc/
242        install -m 644 debian/vtrgb.vga debian/console-setup-udeb/etc/
243        $(pre) --udeb debian/console-setup-udeb/usr/lib/base-installer.d/20console-setup
244# console-setup-*-ekmap
245        dh_movefiles -p console-setup-amiga-ekmap --sourcedir=debian/console-setup-udeb usr/share/console-setup/amiga.ekmap.gz
246        cat Keyboard/amiga.ekmap.gz >debian/console-setup-amiga-ekmap/usr/share/console-setup/amiga.ekmap.gz
247        dh_movefiles -p console-setup-ataritt-ekmap --sourcedir=debian/console-setup-udeb usr/share/console-setup/ataritt.ekmap.gz
248        cat Keyboard/ataritt.ekmap.gz >debian/console-setup-ataritt-ekmap/usr/share/console-setup/ataritt.ekmap.gz
249        dh_movefiles -p console-setup-macintoshold-ekmap --sourcedir=debian/console-setup-udeb usr/share/console-setup/macintosh_old.ekmap.gz
250        cat Keyboard/macintosh_old.ekmap.gz >debian/console-setup-macintoshold-ekmap/usr/share/console-setup/macintosh_old.ekmap.gz
251        dh_movefiles -p console-setup-pc-ekmap --sourcedir=debian/console-setup-udeb usr/share/console-setup/pc105.ekmap.gz
252        cat Keyboard/pc105.ekmap.gz >debian/console-setup-pc-ekmap/usr/share/console-setup/pc105.ekmap.gz
253        dh_install -pconsole-setup-pc-ekmap Keyboard/pc105.tree \
254                usr/share/console-setup-mini
255        dh_movefiles -p console-setup-sun4-ekmap --sourcedir=debian/console-setup-udeb usr/share/console-setup/sun4.ekmap.gz
256        cat Keyboard/sun4.ekmap.gz >debian/console-setup-sun4-ekmap/usr/share/console-setup/sun4.ekmap.gz
257        dh_movefiles -p console-setup-sun5-ekmap --sourcedir=debian/console-setup-udeb usr/share/console-setup/sun5.ekmap.gz
258        cat Keyboard/sun5.ekmap.gz >debian/console-setup-sun5-ekmap/usr/share/console-setup/sun5.ekmap.gz
259        dh_movefiles -p console-setup-pc-ekbd --sourcedir=debian/console-setup-udeb usr/share/console-setup/pc105.ekbd.gz
260        cat Keyboard/pc105.ekbd.gz >debian/console-setup-pc-ekbd/usr/share/console-setup/pc105.ekbd.gz
261
262# Build architecture-independent files here.
263.PHONY : binary-indep
264binary-indep: build install
265        dh_testdir
266        dh_testroot
267        dh_installdebconf
268        dh_installdocs -pkeyboard-configuration \
269                FAQ copyright.fonts copyright.xkb
270        dh_installdocs -p console-setup-linux --link-doc=keyboard-configuration
271        dh_installdocs -pconsole-setup-freebsd --link-doc=keyboard-configuration
272        dh_installdocs -p console-setup-mini --link-doc=keyboard-configuration
273        dh_installdocs -p console-setup --link-doc=keyboard-configuration
274        dh_lintian
275        dh_bugfiles
276        dh_installman
277        dh_installchangelogs
278        dh_compress
279        dh_fixperms
280        dh_installdeb
281# To deal somehow with bug #657904.  See also #255819 and #17624.
282#       rm debian/console-setup/usr/share/doc/console-setup
283        $(pre) debian/keyboard-configuration/DEBIAN/config
284        $(pre) debian/keyboard-configuration/DEBIAN/postinst
285        $(pre) debian/console-setup/DEBIAN/config
286        $(pre) debian/console-setup/DEBIAN/postinst
287        $(pre) --udeb debian/console-setup-udeb/DEBIAN/postinst
288        dh_gencontrol
289        dh_md5sums
290        dh_builddeb
291
292# Build architecture-dependent files here.
293.PHONY : binary-arch
294binary-arch : build install
295# We have nothing to do by default.
296
297.PHONY : binary
298binary : binary-indep binary-arch
Note: See TracBrowser for help on using the repository browser.