File: rules

package info (click to toggle)
postfixadmin 3.3.13-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 7,600 kB
  • sloc: php: 28,540; javascript: 5,222; perl: 1,069; sh: 646; python: 169; makefile: 89; xml: 62; sql: 3
file content (63 lines) | stat: -rwxr-xr-x 1,932 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
#!/usr/bin/make -f
# debian/rules makefile for postfixadmin

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

export VERSION 		= $(shell grep -E "version = '.*';" functions.inc.php |sed -e "s/.version = '//" |sed -e "s/';.*//" |sed -e "s/ /-/g")
export DEBVERSION	= $(shell grep -E "postfixadmin .([0-9]+|\.)+" debian/changelog |head -1 |sed -e "s/postfixadmin .//" |sed -e "s/-.*//")


# Create a needed tar.gz file to build a non-nativ .dpkg
prep:
	rm -f ../postfixadmin_*orig.tar.gz
	cd ..; tar --exclude-vcs --exclude=$(notdir ${CURDIR})/debian  --exclude=$(notdir ${CURDIR})/.pc -cvzf postfixadmin_${DEBVERSION}.orig.tar.gz $(notdir ${CURDIR})

build: build-arch build-indep
build-arch: build-stamp
build-indep: build-stamp
build-stamp:
	dh_testdir
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs
	dh_install
	dh_apache2
	mv debian/postfixadmin/usr/share/postfixadmin/config.inc.php debian/postfixadmin/etc/postfixadmin/config.inc.php
	ln -s /etc/postfixadmin/config.local.php debian/postfixadmin/usr/share/postfixadmin/config.local.php
	find debian/postfixadmin -name .svn | xargs -r rm -r
	ln -s ../share/postfixadmin/scripts/postfixadmin-cli debian/postfixadmin/usr/bin/
	ln -s /var/cache/postfixadmin/templates_c debian/postfixadmin/usr/share/postfixadmin/

# Build architecture-independent files here.
binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs
	dh_installdebconf
	dh_installdocs -X.svn
	dh_installexamples -X.svn
	dh_link
	dh_compress
	dh_fixperms
	chown www-data debian/postfixadmin/var/cache/postfixadmin/templates_c -R
	chmod 700 debian/postfixadmin/var/cache/postfixadmin/templates_c
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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

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