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
|
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
clean:
dh_testdir
dh_testroot
rm -rf configure-*stamp
QUILT_PATCHES=debian/patches quilt pop -a -R || test $$? = 2
dh_clean
configure-stamp:
dh_testdir
QUILT_PATCHES=debian/patches quilt push -a || test $$? = 2
touch configure-stamp
install: configure-stamp
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
# copy file and remove dos newlines if necessary
sed -e 's/\r//' $(CURDIR)/include/distconfig.inc > $(CURDIR)/debian/websvn/etc/websvn/config.inc
echo '<?php' >> $(CURDIR)/debian/websvn/etc/websvn/config.inc
echo 'if ( file_exists("/etc/websvn/svn_deb_conf.inc") ) {' >> $(CURDIR)/debian/websvn/etc/websvn/config.inc
echo ' include("/etc/websvn/svn_deb_conf.inc");' >> $(CURDIR)/debian/websvn/etc/websvn/config.inc
echo '}' >> $(CURDIR)/debian/websvn/etc/websvn/config.inc
echo '?>' >> $(CURDIR)/debian/websvn/etc/websvn/config.inc
# main install
for i in *.php languages templates include; do \
cp -pr $(CURDIR)/$$i $(CURDIR)/debian/websvn/usr/share/websvn; \
done
# fix permissions
# chown -R www-data:www-data $(CURDIR)/debian/websvn/usr/share/websvn
chown www-data:www-data debian/websvn/var/cache/websvn
# wsvn.php IS a config file !
sed -e 's/\$$locwebsvnreal = .*$$/\$$locwebsvnreal = "\/usr\/share\/websvn\";/; s/\r//' < $(CURDIR)/debian/websvn/usr/share/websvn/wsvn.php > $(CURDIR)/debian/websvn/etc/websvn/wsvn.php
# Build architecture-independent files here.
binary-indep: build install
dh_testdir
dh_testroot
dh_installchangelogs changes.txt
dh_installdebconf -pwebsvn
dh_installdocs
dh_install
dh_compress
dh_fixperms -Xusr/share/websvn -Xvar/cache/websvn
dh_install -m 644 debian/apache.conf /etc/websvn/
dh_link /etc/websvn/config.inc /usr/share/websvn/include/config.inc
dh_link /var/cache/websvn /usr/share/websvn/cache
dh_link /usr/share/websvn /var/www/websvn
dh_link /etc/websvn/wsvn.php /usr/share/websvn/wsvn.php
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
build: configure-stamp
# Build architecture-dependent files here.
binary-arch: build install
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure
|