File: rules

package info (click to toggle)
xcdroast 0.96e-3
  • links: PTS
  • area: main
  • in suites: potato, slink
  • size: 4,100 kB
  • ctags: 5,698
  • sloc: ansic: 31,913; tcl: 10,036; sh: 753; makefile: 397
file content (112 lines) | stat: -rwxr-xr-x 3,628 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
106
107
108
109
110
111
112
#!/usr/bin/make -f
# Made with the aid of debmake, by Christoph Lameter,
# based on the sample debian/rules file for GNU hello by Ian Jackson.

package=xcdroast
libdir=/usr/lib/xcdroast-0.96e

stamp-config: configure Makefile.in src/etixwish/Makefile.in
	$(checkdir)
	./configure --prefixdir /usr
	touch stamp-config

build: stamp-config
	$(checkdir)
	( cd src/utils/cdrecord-1.6.1/RULES; \
	  ln -sf i586-linux-cc.rul m68k-linux-cc.rul; \
	  ln -sf i586-linux-gcc.rul m68k-linux-gcc.rul )
	make
#	make utils
	touch build

clean:
	$(checkdir)
	-rm -f build stamp-config
	-make -f Makefile.in clean
	-rm xcdroast
	-rm -rf debian/tmp debian/files* core debian/substvars
	-( cd src/utils/cdrecord-1.6.1/RULES; \
	  rm -f m68k-linux-cc.rul m68k-linux-gcc.rul )

binary-indep:	checkroot build
	$(checkdir)
# There are no architecture-independent files to be uploaded
# generated by this package.  If there were any they would be
# made here.

binary-arch:	checkroot build
	$(checkdir)
	-rm -rf debian/tmp
	install -d debian/tmp
	install -d debian/tmp/DEBIAN

# Setup directory structure
	install -m 755 -d debian/tmp/usr/doc/$(package)
	install -m 755 -d debian/tmp/$(libdir)/{bin,logo,sound}
	install -m 755 -d debian/tmp/usr/bin
	install -m 755 -d debian/tmp/usr/man/man1

# Install all necessary files
	install -s -m 755 -o root -g root lib/bin/* debian/tmp/$(libdir)/bin
	install -m 644 -o root -g root lib/logo/* debian/tmp/$(libdir)/logo
	install -m 644 -o root -g root lib/sound/* debian/tmp/$(libdir)/sound
	install -m 755 -o root -g root xcdroast debian/tmp/usr/bin

# Remove cdrecord and replace it with a link to the cdrecord package
	rm -f debian/tmp/$(libdir)/bin/cdrecord-1.6
	ln -s ../../../bin/cdrecord debian/tmp/$(libdir)/bin/cdrecord-1.6

# Install and compress documentation
	install -m 644 -o root -g root xcdroast.1 debian/tmp/usr/man/man1
	gzip -9f debian/tmp/usr/man/man1/*

# Install upstream documentation
	install -m 644 -o root -g root Changes \
		debian/tmp/usr/doc/$(package)/changelog
	install -m 644 -o root -g root README.html README.nonroot \
		README.cdparanoia debian/tmp/usr/doc/$(package)/
	gzip -9f debian/tmp/usr/doc/$(package)/README.[^h]*

# Install debian-specific files
	install -d debian/tmp/usr/share/doc-base
	install -m 644 -o root -g root debian/doc-base \
		debian/tmp/usr/share/doc-base/$(package)
	install -d debian/tmp/usr/lib/menu
	install -d debian/tmp/usr/X11R6/include/X11/pixmaps
	install -m 644 -o root -g root debian/menu \
			debian/tmp/usr/lib/menu/$(package)
	install -m 644 -o root -g root lib/logo/xcdrmini.xpm \
			debian/tmp/usr/X11R6/include/X11/pixmaps/xcdroast.xpm

	install -m 644 -o root -g root debian/control debian/tmp/DEBIAN
	install -m 755 -o root -g root debian/prerm debian/tmp/DEBIAN
	install -m 755 -o root -g root debian/postinst debian/tmp/DEBIAN
	install -m 755 -o root -g root debian/postrm debian/tmp/DEBIAN
	install -m 644 -o root -g root debian/changelog \
			debian/tmp/usr/doc/$(package)/changelog.Debian
	gzip -9f debian/tmp/usr/doc/$(package)/changelog.Debian
	install -m 644 -o root -g root debian/copyright \
			debian/tmp/usr/doc/$(package)

	find debian/tmp -type f | grep -v "./DEBIAN" | xargs md5sum | \
					sed -e 's#debian/tmp/##' > debian/tmp/DEBIAN/md5sums

	dpkg-shlibdeps debian/tmp/usr/bin/xcdroast
	dpkg-gencontrol
	chown -R root.root debian/tmp
	chmod -R go=rX debian/tmp
	dpkg --build debian/tmp ..

define checkdir
	test -f debian/rules
endef

# Below here is fairly generic really

binary:		binary-indep binary-arch

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

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