File: rules

package info (click to toggle)
cacti 0.6.7-2.2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,000 kB
  • ctags: 1,120
  • sloc: php: 5,059; sql: 922; sh: 302; perl: 81; makefile: 56
file content (86 lines) | stat: -rwxr-xr-x 2,539 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
#!/usr/bin/make -f
# Made with the aid of dh_make, by Craig Small
# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
# Some lines taken from debmake, by Cristoph Lameter.

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

build: 
	##### Nothing to do #####

clean:
	dh_testdir
	rm -f install-stamp 
	-rm -f debian/files
	-rm -f debian/substvars
	dh_clean

install: install-stamp
install-stamp: 
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	mkdir -p debian/cacti/usr/share/cacti
	# Move all file except debian directory 
	tar c -p --exclude debian -f - . | (cd debian/cacti/usr/share/cacti && tar xf -)
	# Create doc directory
	mkdir -p debian/cacti/usr/share/doc/cacti/html
	mv debian/cacti/usr/share/cacti/docs/{*.htm,*.css,images} debian/cacti/usr/share/doc/cacti/html
	mv debian/cacti/usr/share/cacti/cacti.sql debian/cacti/usr/share/doc/cacti
	mv debian/cacti/usr/share/cacti/docs/{CONTRIB,README} debian/cacti/usr/share/doc/cacti/
	mv debian/cacti/usr/share/cacti/docs/CHANGELOG debian/cacti/usr/share/doc/cacti/cacti.changelog
	rmdir debian/cacti/usr/share/cacti/docs
	
	# Create rra cache directory
	mkdir -p debian/cacti/var/cache/
	mv debian/cacti/usr/share/cacti/rra debian/cacti/var/cache/cacti
	rm -f debian/cacti/var/cache/cacti/.placeholder
	# Create log directory
	mkdir -p debian/cacti/var/log/cacti
	rm -rf debian/cacti/usr/share/cacti/log 
	# Remove obsolete files
	rm -f debian/cacti/usr/share/cacti/{LICENSE,README}
	# Move config files
	mkdir -p debian/cacti/etc/cacti
	install -m 640 -o root -g www-data \
	     debian/cacti.apache.conf debian/cacti/etc/cacti/apache.conf
	# Install lintian override file
	mkdir -p debian/cacti/usr/share/lintian/overrides
	install -m 644 debian/cacti.lintianoverrides \
	                debian/cacti/usr/share/lintian/overrides/cacti
	# Install logrotate file
	mkdir -p debian/cacti/etc/logrotate.d/
	install -m 644 debian/cacti.logrotate debian/cacti/etc/logrotate.d/

	touch install-stamp

binary-indep: install
	dh_testdir
	dh_testroot
	dh_installdebconf
	dh_installdocs 
	dh_installcron
	dh_installexamples
#	dh_undocumented  
#	dh_installmanpages
	dh_installchangelogs
	dh_link
#	dh_strip
	dh_compress 
	dh_fixperms 
	dh_installdeb
#	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 
.PHONY: build install clean binary-indep binary