File: rules

package info (click to toggle)
c-nocem 3.5-1
  • links: PTS
  • area: contrib
  • in suites: potato
  • size: 180 kB
  • ctags: 48
  • sloc: ansic: 541; perl: 501; sh: 152; makefile: 95
file content (58 lines) | stat: -rwxr-xr-x 1,305 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
#!/usr/bin/make -f
# Original versions Copyright by Ian Jackson.

# Rather paranoid than sorry. Make the shell exit with an error if an
# untested command fails.
SHELL+= -e

#export DH_VERBOSE=1

build:
	$(checkdir)
	test -e ../inn-1.7.2 || { echo -e "\n\nINN 1.7.2 must be unpacked \
		in the parent directory.\n\nThen it must be build or the \
		inn-dev package installed."; exit 1; }
	env - PERL=/usr/bin/perl GPG=/usr/bin/gpg ./configure -v \
		--with-inn=../inn-1.7.2
	make
	touch build

clean:
	$(checkdir)
	-rm -f build
	-make distclean
	-rm -f Makefile c-nocem
	-cd debian && rm -rf tmp files* substvars *debhelper 

binary-arch:	checkroot build
	$(checkdir)
	-rm -rf debian/tmp

	dh_installdirs usr/lib/news/bin/ var/lib/news/tmp/ etc/news/ncm/
	install --mode 755 c-nocem debian/tmp/usr/lib/news/bin/
	install --strip fastcancel groupcheck debian/tmp/usr/lib/news/bin/
	cp ncmperm debian/tmp/etc/news/ncm/
	echo '' > debian/tmp/etc/news/ncm/ncmgroups
	dh_installdocs README ncmring.asc
	dh_installchangelogs
#	dh_installexamples

	dh_strip
	dh_compress
	dh_fixperms
	dh_shlibdeps
	dh_gencontrol
#	dh_md5sums
	dh_installdeb
	dh_builddeb

define checkdir
	test -f debian/rules
endef

binary:	binary-arch

checkroot:
	test root = "`whoami`"

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