File: rules

package info (click to toggle)
leafnode 1.11.11-3
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 2,460 kB
  • sloc: ansic: 10,914; sh: 1,748; xml: 628; makefile: 296; perl: 84; sed: 4
file content (89 lines) | stat: -rwxr-xr-x 2,592 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
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.

include /usr/share/dpkg/architecture.mk

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
dpkg-buildflags = DEB_BUILD_MAINT_OPTIONS="hardening=+all" dpkg-buildflags

build: build-arch build-indep
build-arch: build-stamp
build-indep: build-stamp
build-stamp:
	dh_testdir
	cp FAQ.* debian
	cp t.pcre_extract debian
	./configure \
		--build=$(DEB_BUILD_GNU_TYPE) \
		--host=$(DEB_HOST_GNU_TYPE) \
		--prefix=/usr \
		--with-spooldir=/var/spool/news \
		--sysconfdir=/etc/news/leafnode \
		$(shell $(dpkg-buildflags) --export=configure)
	$(MAKE)
	$(MAKE) README-FQDN
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	$(MAKE) check
endif
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp
	if [ -f Makefile ]; then $(MAKE) -i distclean ; fi
	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_installdebconf
	dh_installcron
	dh_installchangelogs
	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 a+x debian/leafnode/etc/news/leafnode/do-fetch-news
	rm debian/leafnode/etc/news/leafnode/filters.example
	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