File: rules

package info (click to toggle)
xpaste 1.1-15
  • links: PTS
  • area: main
  • in suites: woody
  • size: 76 kB
  • ctags: 31
  • sloc: ansic: 281; makefile: 41
file content (74 lines) | stat: -rwxr-xr-x 2,341 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
#! /usr/bin/make -f
#
# 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.

# The name of the package (for example, `emacs').
p = xpaste
# The version of the package (for example, `19.28').
# The Debian revision of the package (for example, `2').
# The Debian architecture of the package (for example, 'i386').

build:
# Builds the binary package.
	xmkmf
	make
	touch build

clean:
# Undoes the effect of `make -f debian.rules build'.
	$(checkdir)
	rm -f build
	-$(MAKE) clean
	rm -rf debian/substvars
	rm -rf debian/files
	rm -rf debian/tmp

binary-indep: checkroot build
	$(checkdir)

binary-arch:	checkroot build
	$(checkdir)	
	install -d -g root -m 755 -o root debian/tmp
	chmod g-s debian/tmp
	install -d -g root -m 755 -o root debian/tmp/DEBIAN
	install -d -g root -m 755 -o root debian/tmp/usr
	install -d -g root -m 755 -o root debian/tmp/usr/X11R6
	install -d -g root -m 755 -o root debian/tmp/usr/X11R6/bin
	install -d -g root -m 755 -o root debian/tmp/usr/X11R6/man
	install -d -g root -m 755 -o root debian/tmp/usr/X11R6/man/man1
	install -d -g root -m 755 -o root debian/tmp/etc/X11/app-defaults
	#
	install -m 755 -o root -g root xpaste debian/tmp/usr/X11R6/bin/
	install -m 644 -o root -g root xpaste.man debian/tmp/usr/X11R6/man/man1/xpaste.1x
	install -m 644 -o root -g root XPaste.ad debian/tmp/etc/X11/app-defaults/XPaste
	#
	strip debian/tmp/usr/X11R6/bin/*
	chown -R root.root debian/tmp/
	chmod -R a+r debian/tmp/
	debstd
	dpkg-gencontrol -isp
	dpkg --build debian/tmp ..

binary:		binary-indep binary-arch

define checkdir
	test -f debian/rules
endef

checkroot:
	$(checkdir)
	testroot="`whoami`"