File: rules

package info (click to toggle)
console-data 2%3A1.12-10
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,396 kB
  • sloc: sh: 3,272; pascal: 472; makefile: 239; perl: 168
file content (69 lines) | stat: -rwxr-xr-x 2,362 bytes parent folder | download
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
#!/usr/bin/make -f

export DH_VERBOSE=1

%:
	dh $@

# All the small .udebs that get built
EXTRA_UDEB_PKGS    = 	console-keymaps-mac	\
		console-keymaps-sun	\
		console-keymaps-acorn	\
		console-keymaps-atari	\
		console-keymaps-amiga	\
		console-keymaps-usb	\
		console-keymaps-dec
OPTIONAL_UDEB_PKGS = console-keymaps-at
UDEB_PKGS=${OPTIONAL_UDEB_PKGS} ${EXTRA_UDEB_PKGS}

execute_after_dh_clean:
	rm -rf debian/console-data.config debian/console-data.templates debian/sort-tmp debian/locales debian/substvars
	rm -f ./consoletrans/latin_diacr.fallback ./consoletrans/latin_diacr.nofallback

override_dh_auto_configure:
	dh_auto_configure -- --with-main_compressor=gzip

override_dh_auto_install:
	make install DESTDIR=$(CURDIR)/debian/tmp
	make install DESTDIR=$(CURDIR)/debian/console-data
	# Remove useless empty directory
	rmdir $(CURDIR)/debian/console-data/usr/share/videomodes

	chmod +x debian/gen-acorn-keymaps
	debian/gen-acorn-keymaps

		# For convenience of programs that want a list of supported keymaps
		chmod u+x $(CURDIR)/debian/list-keymaps.pl
	$(CURDIR)/debian/list-keymaps.pl $(CURDIR)/debian/console-data.keymaps > $(CURDIR)/debian/console-data/usr/share/console/lists/console-data.keymap-list

	dh_consoledata -i
	# Needed for ubiquity
	for f in $(CURDIR)/debian/console-keymaps-*.templates; do \
	         echo >> $(CURDIR)/debian/console-data.templates ; \
	         cat $$f >> $(CURDIR)/debian/console-data.templates ; \
	done

	for PO in $(CURDIR)/debian/po/*.po; do \
		L="$$(basename $$PO .po)"; \
		install -d $(CURDIR)/debian/console-data/usr/share/locale/$$L/LC_MESSAGES; \
		msgfmt -o $(CURDIR)/debian/console-data/usr/share/locale/$$L/LC_MESSAGES/console-data.mo $$PO; \
	done

execute_after_dh_install:
	chmod +x debian/trim_keymaps.sh
	for P in ${UDEB_PKGS}; do                                                               \
		./debian/trim_keymaps.sh $(CURDIR)/debian/$${P} ;                               \
	done

execute_after_dh_installdebconf:
	# Sort keymaps (including in translations)
	# MUST be after dh_installdebconf
	sh debian/sort-keymaps

execute_after_dh_installexamples:
	gzip -9nf $(CURDIR)/debian/console-data/usr/share/doc/console-data/examples/hypermap.m4

override_dh_missing:

override_dh_gencontrol:
	dh_gencontrol -- -VBuilt-Using="`dpkg-query -f'$${source:Package} (= $${Version})' -W unicode-data`"