File: rules

package info (click to toggle)
zonecheck 2.0.4-13lenny1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 1,424 kB
  • ctags: 1,177
  • sloc: ruby: 9,582; xml: 731; sh: 574; makefile: 66
file content (76 lines) | stat: -rwxr-xr-x 2,466 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
69
70
71
72
73
74
75
76
#!/usr/bin/make -f
# -*- makefile -*-
# GNU copyright 1997 to 1999 by Joey Hess.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

include /usr/share/dpatch/dpatch.make

RUBY=/usr/bin/ruby

build: patch build-stamp
build-stamp:
	dh_testdir

	touch build-stamp

clean: unpatch
	dh_testdir
	dh_testroot
	rm -f build-stamp configure-stamp

	dh_clean 

install: build
	dh_testdir
	dh_testroot
	dh_clean -k 
	dh_installdirs

	# Add here commands to install the package into debian/zonecheck.
	$(RUBY) installer.rb -DCHROOT=$(CURDIR)/debian/zonecheck \
		-DPREFIX=/usr -DETCDIR=/etc -DETCDIST= \
		-DLIBEXEC=/usr/share -DMANDIR=/usr/share/man -DRUBY=${RUBY} \
		common cli doc
	# The installer copies the CVS directories :-(
	find $(CURDIR)/debian/zonecheck -type d -name CVS | xargs rm -rf
	# Patch the configuration file for Linux netkit ping
	$(RUBY) -p -i \
		-e "\$$_.gsub"\!"(/(<const\s+name\s*=\s*\"ping4\"\s+value\s*=\s*\")[^\"]*(\"\s*\/>)/, '\1ping  -n -q -w 5 -c 5 %s > /dev/null\2')" \
		-e "\$$_.gsub"\!"(/(<const\s+name\s*=\s*\"ping6\"\s+value\s*=\s*\")[^\"]*(\"\s*\/>)/, '\1ping6 -n -q -w 5 -c 5 %s > /dev/null\2')" \
	$(CURDIR)/debian/zonecheck/etc/zonecheck/zc.conf
	# Add here commands to install the package into debian/zonecheck-cgi.
	$(RUBY) installer.rb -DCHROOT=$(CURDIR)/debian/zonecheck-cgi \
               -DPREFIX=/usr -DETCDIR=/etc -DETCDIST= \
	       -DCGIDIR=/usr/lib/cgi-bin/ -DLIBEXEC=/usr/share \
	       -DMANDIR=/usr/share/man -DWWWDIR=/usr/share/zonecheck-cgi \
               -DWWWCGIDIR=/cgi-bin -DRUBY=${RUBY} \
		cgi
	rm -fr $(CURDIR)/debian/zonecheck-cgi/usr/share/zonecheck
	# The installer copies the CVS directories :-(
	find $(CURDIR)/debian/zonecheck-cgi -type d -name CVS | xargs rm -rf
	mv $(CURDIR)/debian/zonecheck/usr/share/zonecheck/zc/locale.rb $(CURDIR)/debian/zonecheck/usr/share/zonecheck/zc/zc-locale.rb

# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.
	dh_testdir
	dh_testroot
	dh_installchangelogs ChangeLog
	dh_installdocs -X .created # bogus empty file should not be installed
	dh_installdocs -p zonecheck-cgi debian/NEWS.Debian
	dh_installexamples
	dh_installman
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

# Build architecture-dependent files here.
binary-arch: build install

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure patch unpatch