File: rules

package info (click to toggle)
xml2 0.3-1
  • links: PTS
  • area: main
  • in suites: sarge, woody
  • size: 72 kB
  • ctags: 69
  • sloc: ansic: 596; makefile: 57; sh: 12
file content (44 lines) | stat: -rwxr-xr-x 1,364 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

PACKAGE	:= xml2

build: build-stamp
build-stamp: debian/control
	test -e debian/control
	$(MAKE) CFLAGS="-Wall -g -O2 `xml-config --cflags`"
	touch build-stamp

clean: debian/control
	test -e debian/control
	test root = "`whoami`" || (echo need root priviledges; exit 1)
	rm -f build-stamp install-stamp
	$(MAKE) clean
	rm -rf debian/substvars debian/files debian/tmp

binary-indep: build

binary-arch: build debian/control
	test -e debian/control
	test root = "`whoami`" || (echo need root priviledges; exit 1)
	rm -rf debian/substvars debian/tmp
	install -d --mode=0755 debian/tmp/usr/bin
	install --mode=0755 \
		2csv 2xml 2html csv2 xml2 html2 \
		"debian/tmp/usr/bin"
	install -d --mode=0755 "debian/tmp/usr/share/doc/$(PACKAGE)"
	install --mode=0644 debian/copyright \
		"debian/tmp/usr/share/doc/$(PACKAGE)"
	install --mode=0644 debian/changelog \
		"debian/tmp/usr/share/doc/$(PACKAGE)/changelog.Debian"
	gzip -9 debian/tmp/usr/share/doc/"$(PACKAGE)"/changelog.Debian
	strip --remove-section=.comment --remove-section=.note \
		debian/tmp/usr/bin/*
	install -d --mode=0755 debian/tmp/DEBIAN
	install --mode=0755 debian/postinst debian/prerm \
		debian/tmp/DEBIAN
	dpkg-shlibdeps debian/tmp/usr/bin/*
	dpkg-gencontrol -isp
	dpkg --build debian/tmp ..

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