File: rules

package info (click to toggle)
swaks 20130209.0-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 700 kB
  • ctags: 168
  • sloc: perl: 2,062; makefile: 40
file content (54 lines) | stat: -rwxr-xr-x 1,632 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
#!/usr/bin/make -f
INSTALL = install
INSTALL_FILE    = $(INSTALL) -p    -o root -g root  -m  644
INSTALL_PROGRAM = $(INSTALL) -p    -o root -g root  -m  755
INSTALL_SCRIPT  = $(INSTALL) -p    -o root -g root  -m  755
INSTALL_DIR     = $(INSTALL) -p -d -o root -g root  -m  755


build:
# nothing to do
build-arch:
# nothing to do
build-indep:
# nothing to do

clean:
	test -d debian
	-rm -rf debian/tmp debian/files

checkroot:
	test "0" = "`id -u`"

binary-indep: checkroot build
	test -d debian
	$(INSTALL_DIR) debian/tmp/DEBIAN \
		debian/tmp/usr/bin debian/tmp/usr/share/man/man1 \
		debian/tmp/usr/share/doc/swaks/examples
	$(INSTALL_SCRIPT) swaks debian/tmp/usr/bin/
	pod2man --center=SWAKS --section=1 \
		swaks debian/tmp/usr/share/man/man1/swaks.1
	$(INSTALL_FILE)	debian/changelog \
		debian/tmp/usr/share/doc/swaks/changelog.Debian
	$(INSTALL_FILE) doc/Changes.txt \
		debian/tmp/usr/share/doc/swaks/changelog
	$(INSTALL_FILE)	debian/copyright \
		debian/tmp/usr/share/doc/swaks/
	$(INSTALL_FILE) doc/recipes.txt debian/tmp/usr/share/doc/swaks/examples/
	find debian/tmp/usr/share/man/man1 debian/tmp/usr/share/doc/swaks/ \
		-type f -size +4096c -exec gzip -v9 {} +
	(cd debian/tmp; find -type f | sed s#^./## | grep -v DEBIAN | \
					xargs md5sum > DEBIAN/md5sums && \
					chmod 644 DEBIAN/md5sums )
	dpkg-gencontrol -isp
	# fix permissions
	find debian/tmp/usr/share/man debian/tmp/usr/share/doc \
		-type f -print0 | xargs -0r chmod 644
	dpkg --build debian/tmp ..

binary-arch:
	#nothing to do

binary:	binary-indep binary-arch

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