File: rules

package info (click to toggle)
usplash 0.5.19-3
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 2,576 kB
  • ctags: 2,929
  • sloc: ansic: 23,562; makefile: 1,011; sh: 430; asm: 377; perl: 26; python: 7
file content (97 lines) | stat: -rwxr-xr-x 2,317 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
#!/usr/bin/make -f
# debian/rules for the usplash package.
# Copyright © 2006 Canonical Ltd.
# Author: Scott James Remnant <scott@ubuntu.com>

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

export DH_OPTIONS

CFLAGS = -g -Wall

# Disable optimisations if noopt found in $DEB_BUILD_OPTIONS
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -O0
else
	CFLAGS += -Os
endif

ifeq ($(DEB_HOST_ARCH), $(findstring $(DEB_HOST_ARCH),i386 amd64))
	BACKEND = "BACKEND=svga"
else
	BACKEND =
endif

# Build the package
build: build-stamp
build-stamp:
	dh_testdir

	$(MAKE) $(BACKEND)

	touch $@

# Install files
install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp

	# Ship initramfs hooks and scripts
	install -d $(CURDIR)/debian/tmp/usr/share/initramfs-tools
	cp -a initramfs/* $(CURDIR)/debian/tmp/usr/share/initramfs-tools 
	chmod a+x $(CURDIR)/debian/tmp/usr/share/initramfs-tools/scripts/init-top/*
	install -d $(CURDIR)/debian/usplash/etc/console-tools/config.d
	install -d $(CURDIR)/debian/usplash/etc/kbd/config.d
	echo "pidof usplash && exit 0" > $(CURDIR)/debian/usplash/etc/console-tools/config.d/usplash
	chmod a+x $(CURDIR)/debian/usplash/etc/console-tools/config.d/usplash
	echo "pidof usplash && exit 0" > $(CURDIR)/debian/usplash/etc/kbd/config.d/usplash
	chmod a+x $(CURDIR)/debian/usplash/etc/kbd/config.d/usplash
	install -d $(CURDIR)/debian/usplash/usr/share/lintian/overrides
	install -m 0644 $(CURDIR)/debian/usplash.lintian \
	$(CURDIR)/debian/usplash/usr/share/lintian/overrides/usplash

binary: binary-indep binary-arch

# Build architecture-independent files here.
binary-indep:
# We have nothing to do by default.

# Build architecture-dependent files here.
binary-arch: DH_OPTIONS=-a
binary-arch: build install
	dh_install --sourcedir=debian/tmp
	dh_testdir
	dh_testroot
	dh_installchangelogs
	dh_installdocs
	dh_installexamples
	dh_installman
	dh_installinit -r --no-start -- start 98 2 3 4 5 . stop 01 0 1 6 .
	dh_link
	dh_strip
	dh_compress -X example
	dh_fixperms
	dh_makeshlibs
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb


# Clean up the mess we made
clean:
	dh_testdir
	rm -f build-stamp

	$(MAKE) clean

	dh_clean


.PHONY: build install binary-indep binary-arch binary clean