File: rules

package info (click to toggle)
sformat 3.4-1
  • links: PTS
  • area: main
  • in suites: potato, slink
  • size: 2,056 kB
  • ctags: 3,432
  • sloc: ansic: 20,874; makefile: 98; sh: 95
file content (68 lines) | stat: -rwxr-xr-x 1,724 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
#!/usr/bin/make -f

SOURCEDIR := $(shell pwd)
TMPDIR=$(SOURCEDIR)/debian/tmp
MAKE := make MAKEPROG=gmake

build:
	$(checkdir)
	-cd RULES; sh MKLINKS
	$(MAKE) CFLAGS='-O2 -g -Wall' all
	touch build

binary-indep:

binary-arch: checkroot build
	$(checkdir)
	-rm -rf $(TMPDIR)
	install -d $(TMPDIR)/DEBIAN $(TMPDIR)/etc $(TMPDIR)/usr/doc/sformat
	$(MAKE) INS_BASE=$(TMPDIR)/usr DEFUMASK=022 install
#	fix ups
	mv $(TMPDIR)/usr/etc/sformat.dat $(TMPDIR)/etc
	mv $(TMPDIR)/usr/bin $(TMPDIR)/usr/sbin
	rm -rf $(TMPDIR)/usr/lib $(TMPDIR)/usr/man/man5 $(TMPDIR)/usr/etc
	gzip -9 $(TMPDIR)/usr/man/man8/sformat.8
#	copyright etc
	install -m 644 README README.database README.seagate \
		doc/sformat.doc $(TMPDIR)/usr/doc/sformat
	install -m 644 debian/changelog \
		$(TMPDIR)/usr/doc/sformat/changelog.Debian
	gzip -9 $(TMPDIR)/usr/doc/sformat/*
	install -m 644 debian/copyright $(TMPDIR)/usr/doc/sformat
#	strip it
	strip $(TMPDIR)/usr/sbin/sformat
#	maintaner
	install -m 644 debian/conffiles $(TMPDIR)/DEBIAN/conffiles
	chown -R root:root $(TMPDIR)
	dpkg-shlibdeps -psformat $(TMPDIR)/usr/sbin/sformat
	cd $(TMPDIR);  find * -type f \
		`sed -e 's@^/\?\(.*\)$$@\! -path \1@' \
		$(TMPDIR)/DEBIAN/conffiles`\
		! -regex '^DEBIAN/.*' -print0 | xargs -0 md5sum \
	   	> $(TMPDIR)/DEBIAN/md5sums
	dpkg-gencontrol -psformat -P$(TMPDIR)
	dpkg --build $(TMPDIR) ..

clean:
	$(MAKE) distclean
#	-cd RULES; sh MKLINKS
	-rm -rf $(TMPDIR)
	-rm -f debian/files debian/substvars build
	-rmdir libs

define checkdir
	test -f debian/rules
	test -d sformat
endef

binary: binary-indep binary-arch

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

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

# Local Variables:
# mode:makefile
# end: