File: rules

package info (click to toggle)
leafnode 1.11.5-5
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 2,356 kB
  • ctags: 576
  • sloc: ansic: 10,626; sh: 4,107; xml: 637; makefile: 281; perl: 84; sed: 4
file content (85 lines) | stat: -rwxr-xr-x 2,543 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
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.

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

SHELL=/bin/bash

WITH_IPV6 = $(shell if grep -q sockaddr_in6 /usr/include/netinet/in.h; then echo --with-ipv6; fi)

build: build-stamp
build-stamp:
	dh_testdir
	cp FAQ.* debian
	cp t.pcre_extract debian
	./configure --prefix=/usr --with-spooldir=/var/spool/news \
	    --sysconfdir=/etc/news/leafnode $(WITH_IPV6)
	$(MAKE)
	$(MAKE) README-FQDN
	$(MAKE) check
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp
	-$(MAKE) -i distclean
	rm -f config.log
	-mv debian/FAQ.* .
	-mv debian/t.pcre_extract .
	rm -f debian/*~
	dh_clean

# Build architecture-independent files here.
binary-indep: build
# We have nothing to do by default.

# Build architecture-dependent files here.
binary-arch: build
	dh_testdir
	dh_testroot
	dh_clean
	dh_installdirs 
	$(MAKE) DESTDIR=debian/leafnode/ mandir=/usr/share/man install
	rm debian/leafnode/etc/news/leafnode/config.example
	rm debian/leafnode/etc/news/leafnode/*.dist
	rm debian/leafnode/etc/news/leafnode/UNINSTALL-daemontools
	cp debian/filters debian/leafnode/etc/news/leafnode/
	cp debian/touch_newsgroup debian/leafnode/usr/bin
	cp debian/touch_newsgroup.1 debian/leafnode/usr/share/man/man1
	dh_installdocs
	cp config.example debian/leafnode/usr/share/leafnode
	cp debian/debian-config debian/leafnode/usr/share/leafnode
	cp debian/do-fetch-news debian/leafnode/etc/news/leafnode/do-fetch-news
	dh_installexamples tools/archivefaq.pl filters.example
	(cd debian/leafnode/usr/share/doc/leafnode/examples ; ln -s ../../../leafnode/config.example . )
	dh_installmenu
	dh_installdebconf
	dh_installcron
	dh_installchangelogs ChangeLog
	dh_installppp
	dh_installlogcheck
	dh_installlogrotate
	dh_strip
	dh_compress
	dh_fixperms
	chown -R news.news debian/leafnode/var/spool/news
	chmod 2755 debian/leafnode/var/spool/news
	chmod 755 debian/leafnode/usr/sbin/{leafnode,fetchnews,texpire}
	chmod a+x debian/leafnode/usr/bin/touch_newsgroup
	chmod a+x debian/leafnode/etc/news/leafnode/do-fetch-news
	rm debian/leafnode/etc/news/leafnode/filters.example
#	chown news.news debian/leafnode/etc/news/leafnode/config
	dh_installdeb
	dh_perl
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

source diff:                                                                  
	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false

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