File: rules

package info (click to toggle)
ntop 3:3.3-11
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 12,772 kB
  • ctags: 7,534
  • sloc: ansic: 71,427; sh: 16,772; awk: 1,504; perl: 792; makefile: 782; php: 123; python: 23; sql: 13; sed: 11
file content (114 lines) | stat: -rwxr-xr-x 2,955 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.

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

configure: configure-stamp-gdchart configure-stamp-ntop
configure-stamp-gdchart:
	dh_testdir

	touch configure-stamp-gdchart

configure-stamp-ntop:
	dh_testdir
	./autogen.sh CFLAGS=-DMAKE_WITH_IGNORE_SIGPIPE \
		--prefix=/usr --libdir=/usr/lib \
		--sysconfdir=/etc --localstatedir=/var/lib --bindir=/usr/sbin \
		--mandir=/usr/share/man --enable-tcpwrap \
		--with-zlib-lib=/usr/lib --with-zlib-include=/usr/include \
		--with-libpng-lib=/usr/lib --with-libpng-include=/usr/include \
		--with-gd-lib=/usr/lib --with-gd-include=/usr/include \
	        --enable-sslv3 --enable-i18n --disable-snmp

	touch configure-stamp-ntop

build: configure-stamp-gdchart build-stamp-gdchart configure-stamp-ntop build-stamp-ntop
build-stamp-gdchart:
	dh_testdir

	touch build-stamp-gdchart


build-stamp-ntop:
	dh_testdir

	$(MAKE)

	touch build-stamp-ntop

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp* configure-stamp*
	debconf-updatepo

	# Add here commands to clean up after the build process.
	[ ! -f Makefile ] || $(MAKE) clean
	[ ! -f Makefile ] || $(MAKE) distclean

	-rm -f config.status config.cache config.log
	find . -type d -name ".deps" | xargs rm -Rf

	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	$(MAKE) install DESTDIR=$(CURDIR)/debian/ntop
	$(MAKE) install-data-as DESTDIR=$(CURDIR)/debian/ntop
	rmdir $(CURDIR)/debian/ntop/usr/lib/plugins
	chmod 644 $(CURDIR)/debian/ntop/usr/lib/*-3.3

	cp debian/protocol.list $(CURDIR)/debian/ntop/etc/ntop
	chmod -x $(CURDIR)/debian/ntop/etc/ntop/*.*
	gunzip $(CURDIR)/debian/ntop/etc/ntop/*.gz
	cp debian/init.cfg $(CURDIR)/debian/ntop/etc/default/ntop

	# Added things for logcheck ignoring.
	cp debian/logcheck $(CURDIR)/debian/ntop/etc/logcheck/ignore.d.server/ntop
	cp debian/logcheck $(CURDIR)/debian/ntop/etc/logcheck/ignore.d.workstation/ntop
	cp debian/logcheck.paranoid $(CURDIR)/debian/ntop/etc/logcheck/ignore.d.paranoid/ntop
	# Added logrotate file.
	cp debian/logrotate $(CURDIR)/debian/ntop/etc/logrotate.d/ntop

	cp ChangeLog $(CURDIR)/debian/ntop/usr/share/doc/ntop/changelog
	find $(CURDIR)/debian/ntop/usr/share/ntop/html/ -type f \
		-exec chmod -x {} \;

# docs for dh_installdirs
DOCS=docs/FAQ docs/HACKING docs/KNOWN_BUGS \
	docs/README docs/TODO

binary-indep:

# Build architecture-dependent files here.
binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installdebconf -n
	dh_installdocs $(DOCS)
	dh_installexamples
	dh_installmenu
	dh_installinit -n
	dh_installcron
	dh_installmanpages png.5 zlib.3 libpng.3 libpngpf.3 ; \
	dh_installinfo
	dh_installchangelogs
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
	dh_makeshlibs
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-arch
.PHONY: build clean binary-arch binary install configure