File: rules

package info (click to toggle)
ipplan 4.86a-7%2Blenny1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 6,844 kB
  • ctags: 10,979
  • sloc: php: 43,569; sh: 223; xml: 97; makefile: 60; perl: 38; sql: 32
file content (85 lines) | stat: -rwxr-xr-x 2,842 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
# written by Jan Wagner <waja@cyconet.org>
#
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

build:

clean:
	dh_testdir
	dh_testroot
	dh_clean  --exclude ./themes/default.css.orig
	debconf-updatepo

install: build
	dh_testdir
	dh_testroot
	dh_clean -k  --exclude ./themes/default.css.orig
	dh_installdirs
	install -d -m 0755 debian/ipplan/usr/share/ipplan/
	# install php scripts
	dh_install admin usr/share/ipplan
	dh_install adodb usr/share/ipplan
	dh_install images usr/share/ipplan
	dh_install layout usr/share/ipplan
	dh_install menus usr/share/ipplan
	dh_install templates usr/share/ipplan
	dh_install themes usr/share/ipplan
	dh_install user usr/share/ipplan
	dh_install IPplan.jpg usr/share/ipplan
	dh_install *.css usr/share/ipplan
	dh_install *.html usr/share/ipplan
	dh_install *.js usr/share/ipplan
	dh_install *.php usr/share/ipplan
	# secure rights for config
	chmod 640 debian/ipplan/usr/share/ipplan/config.php
	# create config in /etc
	install -d -m 0755 debian/ipplan/etc/ipplan/
	install -m 644 debian/apache.conf debian/ipplan/etc/ipplan/
	mv debian/ipplan/usr/share/ipplan/config.php debian/ipplan/etc/ipplan/
	dh_link etc/ipplan/config.php usr/share/ipplan/config.php
	# fix some unsecure stuff
	sed -i -e "s/\\"DNSENABLED\",\ TRUE/\\"DNSENABLED\",\ FALSE/" \
	debian/ipplan/etc/ipplan/config.php
	sed -i -e "s/\(\.*\"UPLOADDIRECTORY\"[^'\"]*['\"]\)[^'\"]*\(['\"].*\)/\1\/var\/spool\/ipplan\2/" \
	debian/ipplan/etc/ipplan/config.php
	# replace references to shipped libphp-phpmailer with the debian one
	rgrep "require.*class.phpmailer.php" debian/ipplan/ | awk -F: '{print $$1}' \
	| xargs sed -i -e "s/\.\.\/class.phpmailer.php/\/usr\/share\/php\/libphp-phpmailer\/class.phpmailer.php/"
	# remove local libphp-phpmailer scripts
	rm -rf debian/ipplan/usr/share/ipplan/class.phpmailer.php debian/ipplan/usr/share/ipplan/class.smtp.php
	# remove shipped libphp-phplayersmenu stuff
	rm -rf debian/ipplan/usr/share/ipplan/menus
	# create symlink to libphp-phplayersmenu
	dh_link usr/share/php/libphp-phplayersmenu usr/share/ipplan/menus
	# remove unneeded license file
	rm -rf debian/ipplan/usr/share/ipplan/adodb/license.txt
	# remove unreferenced image
	rm -rf debian/ipplan/usr/share/ipplan/IPplan.jpg

# Build architecture-independent files here.
binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs CHANGELOG
	dh_installdocs
	dh_installexamples contrib/*
	# drop +x for all files except shell scripts
	find debian/ipplan/ -type f ! -name "*.sh" | xargs chmod a-x
#	dh_install
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_installdebconf
	dh_gencontrol
	dh_md5sums
	dh_builddeb

# Build architecture-dependent files here.
binary-arch: build install

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