File: rules

package info (click to toggle)
ipplan 4.92a-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 7,256 kB
  • ctags: 11,121
  • sloc: php: 44,277; sh: 387; perl: 257; xml: 97; makefile: 57; sql: 32
file content (84 lines) | stat: -rwxr-xr-x 2,818 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
#!/usr/bin/make -f
# written by Jan Wagner <waja@cyconet.org>
#
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

include /usr/share/dpatch/dpatch.make

build: patch-stamp

clean: unpatch
	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 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 *.css usr/share/ipplan
	dh_install *.html usr/share/ipplan
	dh_install *.js usr/share/ipplan
	dh_install *.php usr/share/ipplan
	# 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
	# remove unneeded license file
	rm -rf debian/ipplan/usr/share/ipplan/adodb/license.txt
	# create config in /etc
	install -m 644 debian/apache.conf debian/ipplan/etc/ipplan/
	# template for local config
	install -m 644 debian/local_conf.php debian/ipplan/usr/share/ipplan/mconf/
	# secure rights for config
	chmod 640 debian/ipplan/usr/share/ipplan/config.php
	# just add checks, if constants already defined
	sed -ie 's/define(\(".*"\),/defined(\1) || define(\1,/' debian/ipplan/usr/share/ipplan/config.php
	# fix some unsecure stuff
	sed -i -e "s/\\"DNSENABLED\",\ TRUE/\\"DNSENABLED\",\ FALSE/" \
	debian/ipplan/usr/share/ipplan/config.php
	sed -i -e "s/\(\.*\"UPLOADDIRECTORY\"[^'\"]*['\"]\)[^'\"]*\(['\"].*\)/\1\/var\/spool\/ipplan\2/" \
	debian/ipplan/usr/share/ipplan/config.php
	# create symlink to libphp-phplayersmenu
	dh_link usr/share/php/libphp-phplayersmenu usr/share/ipplan/menus

# 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