File: rules

package info (click to toggle)
usplash 0.3e
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 852 kB
  • ctags: 739
  • sloc: ansic: 7,936; sh: 254; makefile: 173; perl: 26
file content (96 lines) | stat: -rwxr-xr-x 2,123 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
#!/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

patch: patch-stamp
patch-stamp:
	QUILT_PATCHES=debian/patches quilt push -a || test $$? = 2
	touch patch-stamp

unpatch:
	QUILT_PATCHES=debian/patches quilt pop -a -R || test $$? = 2
	rm -rf .pc patch-stamp


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

	$(MAKE)

	touch $@

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

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

	# Ship initramfs hooks and scripts
	install -d $(CURDIR)/debian/usplash/usr/share/initramfs-tools
	cp -a initramfs/* $(CURDIR)/debian/usplash/usr/share/initramfs-tools 
	chmod a+x $(CURDIR)/debian/usplash/usr/share/initramfs-tools/scripts/init-top/*
	install -d $(CURDIR)/debian/usplash/etc
	install $(CURDIR)/debian/lsb/lsb-base-logging-ubuntu.sh \
		$(CURDIR)/debian/usplash/etc/lsb-base-logging.sh
	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_testdir
	dh_testroot
	dh_installchangelogs
	dh_installdocs
	dh_installman
	dh_installinit -r --no-start -- start 98 2 3 4 5 . stop 01 0 1 6 .
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb


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

	-$(MAKE) clean

	dh_clean patch-stamp


.PHONY: build install binary-indep binary-arch binary clean patch-stamp unpatch