File: rules

package info (click to toggle)
console-data 2:1.12-5
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 6,388 kB
  • sloc: sh: 3,272; pascal: 472; makefile: 231; perl: 168
file content (64 lines) | stat: -rwxr-xr-x 2,225 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
#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk

# Automatically controls patching at build time:
include /usr/share/cdbs/1/class/autotools.mk

# 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}

DEB_CONFIGURE_EXTRA_FLAGS := --with-main_compressor=gzip

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

clean::
	rm -rf debian/console-data.config debian/console-data.templates debian/sort-tmp debian/locales debian/substvars

install/console-data::
	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

binary-predeb/console-data::
	# Sort keymaps (including in translations)
	# MUST be after dh_installdebconf
	sh debian/sort-keymaps


common-binary-post-install-indep::
	chmod +x debian/trim_keymaps.sh
	for P in ${UDEB_PKGS}; do                                                               \
                ./debian/trim_keymaps.sh $(CURDIR)/debian/$${P} ;                               \
	done