File: rules

package info (click to toggle)
junkfilter 20030115-4
  • links: PTS
  • area: main
  • in suites: squeeze, wheezy
  • size: 300 kB
  • ctags: 16
  • sloc: makefile: 147; sh: 115
file content (40 lines) | stat: -rwxr-xr-x 1,065 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
#!/usr/bin/make -f

package = junkfilter
docdir = debian/tmp/usr/share/doc/$(package)

build:
	touch build

clean:
	rm -f build
	rm -f `find . -name "*~"`
	rm -rf debian/tmp debian/files* core debian/substvars

binary-indep: build
	rm -rf debian/tmp
	install -d debian/tmp/DEBIAN $(docdir)/examples
	cd debian/tmp && install -d usr/share/$(package) usr/lib
	cp -p jf* junkfilter* debian/tmp/usr/share/junkfilter

	# Temporary hack:
	rm -f debian/tmp/usr/share/junkfilter/junkfilter.four.orig

	cp -p procmailrc.sample $(docdir)/examples
	cp -p README README.DEVELOPERS TODO debian/README.Debian \
		debian/copyright $(docdir)
	ln -s ../share/junkfilter debian/tmp/usr/lib/junkfilter
	cp -p debian/changelog $(docdir)/changelog.Debian
	cd $(docdir) && gzip -9 README changelog.Debian
	dpkg-gencontrol
	cd debian/tmp && \
		md5sum `find * -type f ! -regex "DEBIAN/.*"` > DEBIAN/md5sums
	chown -R 0:0 debian/tmp
	chmod -R go=rX debian/tmp
	dpkg --build debian/tmp ..

binary-arch: build

binary: binary-indep binary-arch

.PHONY: binary binary-arch binary-indep clean