[go: up one dir, main page]

File: rules

package info (click to toggle)
colormake 0.2-4.3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 112 kB
  • ctags: 4
  • sloc: perl: 73; makefile: 59; sh: 18
file content (64 lines) | stat: -rwxr-xr-x 2,037 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
#!/usr/bin/make -f
# Sample debian/rules file - for GNU Hello (1.3).
# Copyright 1994,1995 by Ian Jackson.
# I hereby give you perpetual unlimited permission to copy,
# modify and relicense this file, provided that you do not remove
# my name from the file itself.  (I assert my moral right of
# paternity under the Copyright, Designs and Patents Act 1988.)
# This file may have to be extensively modified

package=colormake

build:
	$(checkdir)
	touch build

clean:
	$(checkdir)
	rm -f build
	rm -rf *~ debian/tmp debian/*~ debian/files* debian/substvars

binary-arch:	checkroot build
	$(checkdir)

binary-indep:	checkroot build
	$(checkdir)
	rm -rf debian/tmp
	install -d debian/tmp/DEBIAN\
		-d debian/tmp/usr/bin\
		-d debian/tmp/usr/share/colormake\
		-d debian/tmp/usr/share/man/man1\
		-d debian/tmp/usr/share/doc/$(package)
	install -m 755 debian/postinst debian/postrm debian/tmp/DEBIAN
	cp -a debian/copyright debian/tmp/usr/share/doc/$(package)/.
	cp -a debian/changelog debian/tmp/usr/share/doc/$(package)/changelog.Debian
	cp -a ChangeLog debian/tmp/usr/share/doc/$(package)/changelog
	cp -a README BUGS AUTHORS debian/tmp/usr/share/doc/$(package)/
	cp -a colormake.pl debian/tmp/usr/share/colormake/colormake.pl
	cp -a clmake debian/tmp/usr/bin/clmake
	cp -a cmake debian/tmp/usr/bin/colormake-short
	sed 's/[^ ]*SIZE.*//' cmake > debian/tmp/usr/bin/colormake
	chmod +x debian/tmp/usr/bin/colormake
	cp -a debian/*.1 debian/tmp/usr/share/man/man1
	(cd debian/tmp/usr/share/man/man1 && gzip -v9 *)
	ln -s colormake.1.gz debian/tmp/usr/share/man/man1/colormake-short.1.gz
	cd debian/tmp/usr/share/doc/$(package) && gzip -9v changelog changelog.Debian
	#dpkg-shlibdeps colormake
	dpkg-gencontrol -isp
	chown -R root.root debian/tmp
	chmod -R g-ws debian/tmp
	dpkg --build debian/tmp ..

define checkdir
	test -f colormake.pl -a -f debian/rules
endef

# Below here is fairly generic really

binary:		binary-indep binary-arch

checkroot:
	$(checkdir)
	test $$(id -u) = 0

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