File: rules

package info (click to toggle)
qmail-tools 0.1.0
  • links: PTS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, sid, stretch, wheezy
  • size: 404 kB
  • ctags: 3
  • sloc: sh: 46; makefile: 33
file content (46 lines) | stat: -rwxr-xr-x 1,251 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
#!/usr/bin/make -f

STRIP =strip
ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
  STRIP =: nostrip
endif

DIR=$(shell pwd)/debian/qmail-tools

build: deb-checkdir build-stamp
build-stamp: 
	tar xzpf queue-repair-0.9.0.tar.gz
	touch build-stamp

clean: deb-checkdir deb-checkuid
	rm -rf queue-repair-0.9.0
	rm -f build-stamp
	rm -rf '$(DIR)'
	rm -f debian/files changelog changelog.queue-repair

install: deb-checkdir deb-checkuid build-stamp
	rm -rf '$(DIR)'
	install -d -m0755 '$(DIR)'/usr/sbin
	# queue-repair
	sed -e 's}/var/qmail}/var/lib/qmail}g' <queue-repair-0.9.0/queue_repair.py \
	  >'$(DIR)'/usr/sbin/queue-repair
	chmod 755 '$(DIR)'/usr/sbin/queue-repair
	ln -s queue-repair-0.9.0/CHANGELOG changelog.queue-repair
	install -d -m0755 '$(DIR)'/usr/share/man/man8
	install -m0644 queue-repair.8 '$(DIR)'/usr/share/man/man8/
	gzip -9 '$(DIR)'/usr/share/man/man8/queue-repair.8
	# upgrade helpers
	install -d -m0755 '$(DIR)'/usr/lib/qmail
	install -m0755 prepare-upgrade/* '$(DIR)'/usr/lib/qmail/

binary-indep: install qmail-tools.deb
	dpkg-gencontrol -isp -pqmail-tools -P'$(DIR)'
	dpkg -b '$(DIR)' ..

binary-arch: 

binary: binary-indep binary-arch

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

include debian/implicit