File: rules

package info (click to toggle)
gfxboot 4.5.73-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid, trixie
  • size: 21,148 kB
  • sloc: asm: 12,810; perl: 5,125; ansic: 4,018; pascal: 2,266; makefile: 569; xml: 256; sh: 235
file content (105 lines) | stat: -rwxr-xr-x 3,405 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
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
#!/usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

SHELL := sh -e

GFXBOOT_PATH = $(CURDIR)

%:
	dh $@

VERSION:
	echo $(DEB_VERSION_UPSTREAM) > VERSION

changelog:
	cp changelog.upstream changelog

update-upstream-changelog:
	# Needs to be run manually upon new upstream versions
	git checkout -b upstream-tmp-$(DEB_VERSION_UPSTREAM) $(DEB_VERSION_UPSTREAM) && ./git2log --changelog changelog
	git checkout dgit/sid
	git branch -d upstream-tmp-$(DEB_VERSION_UPSTREAM)
	cp changelog changelog.upstream

override_dh_auto_build: VERSION changelog
	dh_auto_build -- CFLAGS="$(CFLAGS) $(CPPFLAGS)"

	LC_ALL=C.UTF-8 $(MAKE) -C doc doc

	# gfxboot-dev
	mkdir -p build/examples
	cp -aL themes/example* build/examples

	for _THEME in $$(cd build/examples && ls); \
	do \
		PATH=$(GFXBOOT_PATH):$${PATH} ADDDIR=$(GFXBOOT_PATH)/bin/adddir $(MAKE) -C build/examples/$${_THEME}; \
	done

	# gfxboot-themes
	mkdir -p build
	cp -aL themes build/themes
	rm -rf build/themes/example* build/themes/test*

	PATH=$(GFXBOOT_PATH):$${PATH} ADDDIR=$(GFXBOOT_PATH)/bin/adddir $(MAKE) -C build/themes/openSUSE/help-install
	PATH=$(GFXBOOT_PATH):$${PATH} ADDDIR=$(GFXBOOT_PATH)/bin/adddir $(MAKE) -C build/themes/openSUSE

	for _THEME in $$(cd build/themes && ls); \
	do \
		if [ "$${_THEME}" != "openSUSE" ]; \
		then \
			PATH=$(GFXBOOT_PATH):$${PATH} ADDDIR=$(GFXBOOT_PATH)/bin/adddir $(MAKE) -C build/themes/$${_THEME}; \
		fi; \
	done

override_dh_auto_clean:
	dh_auto_clean

	$(MAKE) -C doc clean

	rm -rf build
	rm -f VERSION changelog

override_dh_auto_install:
	dh_auto_install

	install -D -m 0644 doc/gfxboot.8 debian/gfxboot/usr/share/man/man1/gfxboot.1

	# Correcting program location
	mv debian/tmp/usr/sbin debian/tmp/usr/bin
	sed -i -e 's|^.TH GFXBOOT 8|.TH GFXBOOT 1|' debian/gfxboot/usr/share/man/man1/gfxboot.1

	# Removing useless files
	rm -rf debian/tmp/etc

	# gfxboot-dev
	for _THEME in $$(cd build/examples && ls); \
	do \
		install -D -m 0644 build/examples/$${_THEME}/bootlogo debian/gfxboot-dev/etc/bootsplash/$${_THEME}/cdrom/bootlogo; \
		$(GFXBOOT_PATH)/bin/unpack_bootlogo debian/gfxboot-dev/etc/bootsplash/$${_THEME}/cdrom; \
		mkdir -p debian/gfxboot-dev/usr/share/gfxboot/themes/$${_THEME}; \
		cp -aL themes/$${_THEME}/* debian/gfxboot-dev/usr/share/gfxboot/themes/$${_THEME}; \
	done

	# gfxboot-themes
	mkdir -p debian/gfxboot-themes/usr/share/gfxboot/themes

	for _THEME in $$(cd build/themes && ls); \
	do \
		cp -aL build/themes/$${_THEME} debian/gfxboot-themes/usr/share/gfxboot/themes; \
		cp -aL themes/openSUSE/Makefile debian/gfxboot-themes/usr/share/gfxboot/themes/$${_THEME}/Makefile; \
		rm -f debian/gfxboot-themes/usr/share/gfxboot/themes/$${_THEME}/Makefile; \
		install -D -m 0644 build/themes/$${_THEME}/bootlogo debian/gfxboot-themes/etc/bootsplash/themes/$${_THEME}/cdrom/bootlogo; \
		$(GFXBOOT_PATH)/bin/unpack_bootlogo debian/gfxboot-themes/etc/bootsplash/themes/$${_THEME}/cdrom; \
		mkdir -p debian/gfxboot-themes/etc/bootsplash/themes/$${_THEME}/bootloader; \
		cp -aL build/themes/$${_THEME}/message build/themes/$${_THEME}/help-boot/*.hlp build/themes/$${_THEME}/po/*.tr debian/gfxboot-themes/etc/bootsplash/themes/$${_THEME}/bootloader; \
	done

override_dh_fixperms:
	dh_fixperms

	find . debian -name "*.xcf" | xargs chmod 0644

override_dh_strip:
	dh_strip --dbgsym-migration='gfxboot-dbg (<< 4.5.2-1.1-6~)'