File: rules

package info (click to toggle)
lilo 21-4
  • links: PTS
  • area: main
  • in suites: slink
  • size: 812 kB
  • ctags: 895
  • sloc: ansic: 3,420; asm: 2,546; sh: 767; perl: 607; makefile: 193; cpp: 3
file content (105 lines) | stat: -rwxr-xr-x 3,663 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
#
# Streamlined by Martin Mitchell <martin@debian.org>
#
# Modifies by Shaya Potter on Thu, 23 Jan 1997 09:46:40 -0500
# for upgrading to new packagins standards.
#
# Thu Jul 25 23:12:28 MET DST 1996 ecki@debian.org
#   Modified for architecture support and _ in package names
#
# Modified for my own packages 22-Dec-1994 by Bruce Perens
#	<Bruce@Pixar.com>
# 
# Last updated: Sat Dec 17 10:52:20 EST 1994 by imurdock.
#
# To make the binary distribution package, the ``Debianized'' source package
# and the context diff to the original package, type `./debian.rules dist'.
# Make sure that `debian.rules' is executable before the final distribution
# is made.
#
# Invoke each target with `./debian.rules <target>'.  All targets should be
# invoked with the package root as the current directory.
#
# The `binary' target must be run as root, as it needs to install files with
# specific ownerships.  The `diff' target assumes that you have the original
# source package available, unpacked, in ../$(p)-$(v).orig, or that you have
# the previous revision of the ``Debianized'' source package and context diff
# in the parent directory.

BUILD_DIR=`pwd`/debian


build:
	$(checkdir)
# Builds the binary package.
#	 ./configure --prefix=/
	@if [ -r $$ROOT/etc/lilo.defines ]; then \
		echo "******************************************"; \
		echo "WARNING: lilo.defines overwriting defaults"; \
	fi
	make LDFLAGS="-s"
	cd doc && make user.ps tech.ps
	touch build

clean:
# Undoes the effect of `make -f debian/rules build'.
	$(checkdir)
	make spotless
	-rm -f build debian/files debian/substvars debian/*~ *~ doc/*.{dvi,ps,aux,toc,log}
	rm -rf debian/tmp debian/lilo-doc

binary-indep:   checkroot build lilo-doc
	$(checkdir)
binary-arch:    checkroot build lilo-main

lilo-main:
	$(checkdir)
	rm -rf debian/tmp/ debian/tmp-doc/
	#mkdir debian/tmp
	#cd debian/tmp && install -d `cat ../lilo.dirs`
	dh_installdirs -plilo -Pdebian/tmp
	install -g root -m 644 -o root boot.b debian/tmp/boot/boot.b
	install -g root -m 644 -o root chain.b debian/tmp/boot/chain.b
	install -g root -m 644 -o root os2_d.b debian/tmp/boot/os2_d.b
	install -g root -m 755 -o root lilo debian/tmp/sbin/
	install -g root -m 755 -o root activate debian/tmp/sbin/
	install -g root -m 755 -o root keytab-lilo.pl debian/tmp/usr/sbin/
	install -g root -m 755 -o root debian/liloconfig debian/tmp/usr/sbin/
	cp debian/conf.empty debian/tmp/etc/lilo.conf
	dh_installexamples -plilo -Pdebian/tmp QuickInst debian/conf.sample
	chmod 644 debian/tmp/usr/doc/lilo/examples/QuickInst
	install -g root -m 644 -o root debian/copyright debian/tmp/usr/doc/lilo
	dh_installchangelogs  -plilo -Pdebian/tmp CHANGES
	cp README debian/tmp/usr/doc/lilo/Manual.txt
	dh_installmanpages -plilo -Pdebian/tmp
	cd debian/tmp/usr/man/man1 && ln -s ../man7/undocumented.7.gz liloconfig.1.gz
	#( cd debian/tmp/usr/doc/lilo/ && mv README README.makedoc )
	dh_strip -plilo -Pdebian/tmp
	dh_compress -plilo -Pdebian/tmp
	dh_fixperms -plilo -Pdebian/tmp
	dh_shlibdeps -plilo -Pdebian/tmp
	dh_gencontrol -plilo -Pdebian/tmp
	dh_installdeb -plilo -Pdebian/tmp
	dh_md5sums -plilo -Pdebian/tmp
	dh_builddeb -plilo -Pdebian/tmp

lilo-doc:
	$(checkdir)
	dh_installdocs		 -p$@ -P$(BUILD_DIR)/$@ INCOMPAT lilo.lsm doc/user.ps doc/tech.ps
	dh_installchangelogs -p$@ -P$(BUILD_DIR)/$@
	dh_compress		 	 -p$@ -P$(BUILD_DIR)/$@
	dh_fixperms		 	 -p$@ -P$(BUILD_DIR)/$@
	dh_installdeb	 	 -p$@ -P$(BUILD_DIR)/$@
	dh_gencontrol	 	 -p$@ -P$(BUILD_DIR)/$@
	dh_md5sums		 	 -p$@ -P$(BUILD_DIR)/$@
	dh_builddeb		 	 -p$@ -P$(BUILD_DIR)/$@

binary: 	binary-indep binary-arch

checkroot:
	dh_testroot

define checkdir
	dh_testdir
endef