File: rules

package info (click to toggle)
bsdmainutils 4.4.0.1
  • links: PTS
  • area: main
  • in suites: slink
  • size: 592 kB
  • ctags: 479
  • sloc: ansic: 5,905; makefile: 126; sh: 116
file content (69 lines) | stat: -rwxr-xr-x 2,282 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
#! /usr/bin/make -f
#
# Last updated: Sun Jun  1 17:12:04 BST 1997 by and1000.
#
# 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.

package=bsdmainutils

build:
	make
	touch build

clean:
	make clean
	rm -f build
	rm -rf debian/tmp
	rm -f debian/files
	rm -f debian/substvars
	rm -f debian/*~
	rm -f calendars/*~

binary-indep:   checkroot build

binary-arch:    checkroot build
	rm -rf debian/tmp
	install -o root -g root -m 755 -d debian/tmp debian/tmp/DEBIAN
	install -o root -g root -m 755 -d debian/tmp/usr/doc/$(package)
	make install \
	  usrbindir=debian/tmp/usr/bin \
	  gamedir=debian/tmp/usr/games \
	  libdir=debian/tmp/usr/lib \
	  mandir=debian/tmp/usr/man
	gzip -9v debian/tmp/usr/man/man?/*
	chmod -R g-w debian/tmp
	install -g root -m 644 -o root debian/conffiles \
		debian/tmp/DEBIAN/conffiles
	install -o root -g root -m 644 debian/copyright \
		debian/tmp/usr/doc/$(package)/copyright
	install -o root -g root -m 644 debian/changelog \
		debian/tmp/usr/doc/$(package)/changelog.Debian
	install -o root -g root -m 644 README.* \
		debian/tmp/usr/doc/$(package)
	gzip -9v debian/tmp/usr/doc/$(package)/*
	gunzip debian/tmp/usr/doc/$(package)/copyright.gz
	install -o root -g root -d -m 755 debian/tmp/etc/cron.daily
	install -m 755 -o root -g root debian/cron.calendar \
		debian/tmp/etc/cron.daily/calendar
	dpkg-shlibdeps banner cal calendar col colcrt colrm column from \
		hexdump look tsort ul vacation whois write
	dpkg-gencontrol
	dpkg --build debian/tmp ..

binary:         binary-indep binary-arch
checkroot:
	test root = "`whoami`"

.PHONY: binary binary-arch binary-indep clean checkroot