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
|
#!/usr/bin/make -f
# 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
# This is the debhelper compatability version to use.
export DH_COMPAT=3
# List all Files and directories here that should not be copied to
# /usr/share/horde2
COPY_EXCLUDE=^(COPYING|README|config|debian|docs|scripts)$
build: build-stamp
build-stamp:
touch build-stamp
clean:
dh_testdir
dh_testroot
#find locale -name "*.mo" -print0 | xargs --no-run-if-empty -0 rm
rm -f install-stamp build-stamp
dh_clean
install: install-stamp
install-stamp:
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
#### copy stuff that belongs in /usr/share/horde2 ###
for i in `ls -1 | egrep -v "$(COPY_EXCLUDE)"`; do \
cp -a $$i debian/horde2/usr/share/horde2; \
done
# Remove test.php
rm debian/horde2/usr/share/horde2/test.php
# Config
cp -a debian/horde-debian.php.*.in debian/horde2/usr/share/horde2
#### copy stuff that belongs in documentation/examples ###
cp -a scripts debian/horde2/usr/share/doc/horde2/examples
cp -a config/* debian/horde2/usr/share/doc/horde2/examples
cp -a test.php debian/horde2/usr/share/doc/horde2/examples
#### copy configuration files
for i in config/*.dist; do \
NAME=/etc/horde2/`basename $$i ".dist"`; \
cp -a $$i debian/horde2$$NAME; \
done
# Apache config file
mkdir -p debian/horde2/etc/apache2/conf.d
cp debian/apache.conf debian/horde2/etc/apache2/conf.d/horde2.conf
mkdir -p debian/horde2/etc/apache/conf.d
cp debian/apache.conf debian/horde2/etc/apache/conf.d/horde2.conf
mkdir -p debian/horde2/etc/apache-ssl/conf.d
cp debian/apache.conf debian/horde2/etc/apache-ssl/conf.d/horde2.conf
# End apache config
cp debian/horde2-logrotate debian/horde2/etc/logrotate.d/horde2
cp debian/*.sql.in debian/horde2/usr/share/horde2/scripts
#### horde expects configuration in config subdir, create a symlink
#### to comply with FHS
ln -s /etc/horde2 debian/horde2/usr/share/horde2/config
mv debian/horde2/usr/share/horde2/templates \
debian/horde2/etc/horde2/templates
ln -s /etc/horde2/templates debian/horde2/usr/share/horde2/templates
#### other items ###
touch install-stamp
# Build architecture-independent files here.
binary-indep: build install
dh_testdir
dh_testroot
dh_installdebconf
dh_installdocs
# dh_undocumented
dh_installchangelogs docs/CHANGES
dh_link
# dh_strip
dh_compress
dh_fixperms
chmod 755 debian/horde2/usr/share/doc/horde2/examples/*.sh
for i in var/lib/horde2 var/cache/horde2 var/log/horde2; do \
chmod 0770 debian/horde2/$$i; \
chown 'root:www-data' debian/horde2/$$i; \
done
# dh_suidregister
dh_installdeb
dh_perl
# dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep
.PHONY: build clean binary-indep binary install
|