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
|
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
CFLAGS = -Wall -g
TDIR:=debian/cacti
SHAREDIR:=${TDIR}/usr/share/cacti
SITEDIR:=${SHAREDIR}/site
RRADIR:=${TDIR}/var/lib/cacti/rra
configure: configure-stamp
configure-stamp:
dh_testdir
touch configure-stamp
build: build-stamp
build-stamp: patch configure-stamp
dh_testdir
touch build-stamp
patch: patch-stamp
patch-stamp:
dpatch apply-all
dpatch cat-all > patch-stamp
clean: unpatch
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
dh_clean
debconf-updatepo
unpatch:
dpatch deapply-all
rm -rf patch-stamp debian/patched
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
install -p *.php ${SITEDIR}/
cp -pr scripts images include install lib ${SITEDIR}/
cp -pr resource ${SHAREDIR}/
# place the sql script where dbconfig-common wants it
cp cacti.sql ${TDIR}/usr/share/dbconfig-common/data/cacti/install/mysql
# normalize permissions in the site directory
find ${RRADIR} ${SITEDIR}/ -exec chown root:www-data {} \;
find ${SITEDIR}/ -type f -exec chmod 640 {} \;
find ${SITEDIR}/ -type d -exec chmod 750 {} \;
# and then fix the special case files
find ${SITEDIR}/scripts -type f -name '*.php' -exec chmod 640 {} \;
for f in cmd.php poller.php lib/ping.php; do \
chmod ug+x ${SITEDIR}/$$f; \
done
chmod 770 ${RRADIR}
# remove all adodb code at build time, as we get this from libphp-adodb
rm -rf ${SITEDIR}/lib/adodb
# plop in our lintian override file
cp debian/cacti.lintian-overrides ${TDIR}/usr/share/lintian/overrides/cacti
binary-arch:
# Build architecture-dependent files here.
binary-indep: build install
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
dh_installexamples
dh_installdebconf
dh_installlogrotate
dh_installcron
dh_installman
dh_usrlocal
dh_link
dh_strip
dh_compress
dh_fixperms -X/var/lib/cacti/rra
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep
.PHONY: build clean binary-arch binary-indep binary install configure patch unpatch
|