File: rules

package info (click to toggle)
cgiwrap 3.5-3
  • links: PTS
  • area: non-free
  • in suites: hamm
  • size: 356 kB
  • ctags: 115
  • sloc: sh: 3,954; ansic: 1,036; perl: 104; makefile: 86
file content (90 lines) | stat: -rwxr-xr-x 2,240 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#!/usr/bin/make -f
# Made with the aid of debmake, by Christoph Lameter,
# based on the sample debian/rules file for GNU hello by Ian Jackson.

package=cgiwrap

tmp = debian/tmp
man1 = ${tmp}/usr/man/man1
doc = ${tmp}/usr/doc/cgiwrap
cgibin = ${tmp}/usr/lib/cgi-bin
etc = ${tmp}/etc

build:
	$(checkdir)
	make
	touch build

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

binary-indep:	checkroot build
	$(checkdir)
# There are no architecture-independent files to be uploaded
# generated by this package.  If there were any they would be
# made here.

binary-arch:	checkroot build
	$(checkdir)
	-rm -rf ${tmp}
	install -d ${tmp}
	pushd ${tmp}			;\
	  install -d `cat ../dirs`	;\
	popd
	install --owner root --group www-data --mode u=rwxs,g=rx,o= \
		  --strip cgiwrap ${cgibin}
	pushd ${cgibin}				;\
	  ln -s cgiwrap cgiwrapd		;\
	  ln -s cgiwrap nph-cgiwrap		;\
	  ln -s cgiwrap nph-cgiwrapd		;\
	popd
	install --owner root --group root --mode u=rw,go=r \
		debian/cgiwrap.allow ${etc}
	install --owner root --group root --mode u=rw,go=r \
		debian/cgiwrap.deny ${etc}
	install --owner root --group root --mode u=rw,go=r \
		debian/cgiwrap.userdir ${etc}
	install --owner root --group root --mode u=rw,go=r \
		debian/cgiwrap.allow ${doc}/examples
	install --owner root --group root --mode u=rw,go=r \
		debian/cgiwrap.deny ${doc}/examples
	install --owner root --group root --mode u=rw,go=r \
		debian/cgiwrap.userdir ${doc}/examples
	for f in htdocs/*;					\
	  do							\
	    install --owner root --group root --mode u=rw,go=r 	\
			$$f ${doc}/htdocs/;			\
	  done
	install --owner root --group root --mode u=rw,go=r \
		debian/cgiwrap.1 ${man1}
	gzip -9 ${man1}/cgiwrap.1
	pushd ${man1}		;\
	  ln -s cgiwrap.1.gz cgiwrapd.1.gz	;\
	  ln -s cgiwrap.1.gz nph-cgiwrap.1.gz	;\
	  ln -s cgiwrap.1.gz nph-cgiwrapd.1.gz	;\
	popd
	debstd -m README
	dpkg-gencontrol
	dpkg --build ${tmp} ..

define checkdir
	test -f debian/rules
endef

# Below here is fairly generic really

binary:		binary-indep binary-arch

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

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

# Local Variables:
# mode: makefile
# End: