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 115 116 117 118 119 120 121 122 123 124 125
|
#!/usr/bin/make -f
#export DH_VERBOSE=1
export DH_OPTIONS
include /usr/share/quilt/quilt.make
pkg:=auth2db
CommonPKG:=$(pkg)-common
FrontEndPKG:=$(pkg)-frontend
DaemonPKG:=$(pkg)
FiltersPKG:=$(pkg)-filters
uglytar:
tar zxf www/graph.tar.gz -C www/
tar zxf www/icons.tar.gz -C www/
tar zxf www/images.tar.gz -C www/
tar zxf www/banderas.tar.gz -C www/
rm -rf www/graph/fonts
clean-uglytar:
rm -rf www/graph/ www/icons/ www/images/ www/banderas/
configure: configure-stamp
configure-stamp:
dh_testdir
touch configure-stamp
#Architecture
build: build-indep
build-arch: build-arch-stamp
build-arch-stamp: configure-stamp
touch $@
build-indep: build-indep-stamp uglytar $(QUILT_STAMPFN)
build-indep-stamp: configure-stamp
touch $@
clean: unpatch clean-uglytar
dh_testdir
dh_testroot
rm -f build-arch-stamp build-indep-stamp configure-stamp
dh_clean
install: install-indep install-arch
install-indep:
dh_testdir
dh_testroot
dh_installdirs -i
#Building Daemon package
dh_installdirs -p$(DaemonPKG) usr/sbin etc/init.d var/log/$(pkg)/error.d \
var/lib/$(pkg)/flag.d var/lib/$(pkg)/tmp
dh_install -p$(DaemonPKG) auth2db auth2db-alert daemon/auth2db-daemon usr/sbin
dh_install -p$(DaemonPKG) config/flag.d/flag.dat var/lib/$(pkg)/flag.d
#Building Common configuration package
dh_installdirs -p$(CommonPKG) etc/$(pkg) usr/share/dbconfig-common/data/$(pkg)/install \
usr/share/dbconfig-common/data/$(pkg)/upgrade
dh_install -p$(CommonPKG) debian/dbconfig-common/data/install/mysql/mysql \
usr/share/dbconfig-common/data/$(pkg)/install
# 0.2.4 release added DB-scheme changes -> upgrade needed
dh_install -p$(CommonPKG) debian/dbconfig-common/data/upgrade/mysql/* \
usr/share/dbconfig-common/data/$(pkg)/upgrade/mysql
#Building Frontend package
dh_installdirs -p$(FrontEndPKG) usr/share/$(FrontEndPKG)/www \
usr/share/$(FrontEndPKG)/www etc/apache2/sites-available \
var/lib/$(FrontEndPKG)/images
# Already specified on debian/copyright
rm www/images/LICENCE-CC-BY-SA
# Now it's time to install whats done on 'uglytar' target
dh_install -p$(FrontEndPKG) www/*.htm usr/share/$(FrontEndPKG)/www
dh_install -p$(FrontEndPKG) www/*.php usr/share/$(FrontEndPKG)/www
dh_install -p$(FrontEndPKG) www/*.css usr/share/$(FrontEndPKG)/www
dh_install -p$(FrontEndPKG) www/graph www/icons www/images www/banderas usr/share/$(FrontEndPKG)/www
# Crappy 'uglytar'...
find $(CURDIR)/debian/$(FrontEndPKG)/usr/share/$(FrontEndPKG)/www -type f -exec chmod 0644 {} \;
# For future use -> Don't delete
# When available more JavaScripts than prototype.js
#dh_install -p$(FrontEndPKG) www/*.js usr/share/$(FrontEndPKG)/www
# Provided by libjs-prototype (recent upload (04-2008)
#rm $(CURDIR)/debian/$(FrontEndPKG)/usr/share/$(FrontEndPKG)/www/prototype.js
install -o root -g root -m 0644 debian/auth2db.apache2 \
debian/$(FrontEndPKG)/etc/apache2/sites-available/auth2db
#Building Filter rules package
dh_installdirs -p$(FiltersPKG) etc/$(pkg)
dh_install -p$(FiltersPKG) config/filters.conf etc/$(pkg)
install-arch:
# dh_install -s
# Must not depend on anything. This is to be called by
# binary-arch/binary-indep
# in another 'make' thread.
binary-common:
dh_testdir
dh_testroot
dh_installchangelogs CHANGELOG
dh_installdocs debian/README.Debian CONTRIBUTORS TODO README
dh_installdebconf
dh_installinit -p$(DaemonPKG)
dh_installman
dh_link
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary-indep: install-indep
$(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
binary-arch: build-arch install-arch
binary: binary-indep
.PHONY: clean build binary install install-indep configure
|