File: rules

package info (click to toggle)
pixmap 2.6pl4-4
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 784 kB
  • ctags: 1,560
  • sloc: ansic: 12,701; makefile: 862
file content (100 lines) | stat: -rwxr-xr-x 3,126 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
#! /usr/bin/make -f
#   -*- mode: makefile; -*-
#
#
# 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.

CC = gcc
CFLAGS = -O2 -g
LDFLAGS = -s

# The name of the package (for example, `emacs').
p = pixmap

package=$(p)

build:
# Builds the binary package.
	xmkmf
	rm -f clean
	make Makefiles
	make
	touch stamp-build

clean:
# Undoes the effect of `make -f debian.rules build'.
	-make clean
	touch clean
	rm -f Makefile Makefile.bak SelFile/Makefile dotpixmap .#pixmap
	rm -f stamp-build
	rm -rf debian/tmp

binary-arch:    checkroot build
# Makes a binary package.
	test -f stamp-build || make -f debian.rules build
	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/X11R6/bin
	install -d -g root -m 755 -o root debian/tmp/usr/X11R6/lib/X11
	install -d -g root -m 755 -o root debian/tmp/usr/doc/$(p)\
	        debian/tmp/usr/lib/menu 	 \
		debian/tmp/usr/X11R6/lib/X11/Pixmap
	install -d -g root -m 755 -o root \
	  debian/tmp/usr/X11R6/lib/X11/app-defaults
	strip pixmap
	install -g root -m 755 -o root pixmap debian/tmp/usr/X11R6/bin/pixmap
	install -g root -m 644 -o root Pixmap.ad \
	  debian/tmp/usr/X11R6/lib/X11/app-defaults/Pixmap
	for file in Down Excl FlipHoriz FlipVert Fold Left Right RotateLeft \
	            RotateRight Stipple Term Up; do \
	    install -g root -m 644 -o root $$file \
	      debian/tmp/usr/X11R6/lib/X11/Pixmap/$$file; \
	  done
	install -d -g root -m 755 -o root debian/tmp/usr/X11R6/man/man1
	install -g root -m 644 -o root pixmap.man \
	  debian/tmp/usr/X11R6/man/man1/pixmap.1x
	install -g root -m 644 -o root debian/menu \
	  debian/tmp/usr/lib/menu/$(p)
	install -g root -m 644 -o root debian/copyright \
	  debian/tmp/usr/doc/$(p)/copyright
	install -g root -m 644 -o root debian/changelog \
	  debian/tmp/usr/doc/$(p)/changelog.Debian
	install -g root -m 644 -o root CHANGES \
	  debian/tmp/usr/doc/$(p)/changelog
	-gzip debian/tmp/usr/doc/$(p)/*
	dpkg-shlibdeps pixmap
	dpkg-gencontrol
	chown -R root.root debian/tmp
	chmod -R g-ws debian/tmp
	dpkg --build debian/tmp ..
	rm -f clean

define checkdir
	test -f debian/rules
endef

# Below here is fairly generic really

binary:         binary-indep binary-arch

source diff:
	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false

checkroot:
	$(checkdir)
	test root = "`whoami`"

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