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
|
#!/usr/bin/make -f
include /usr/share/cdbs/1/rules/debhelper.mk
DEB_INSTALL_CHANGELOGS_ALL=CHANGELOG
DEB_DH_INSTALL_ARGS = \
--exclude=chgsaslpasswd.c \
--exclude=chgvirtualminpasswd.c \
--exclude=chpass-wrapper.py
binary-install/roundcube-core::
# Install config files
install -m 0640 $(CURDIR)/config/db.inc.php.dist $(CURDIR)/debian/roundcube-core/etc/roundcube/db.inc.php
install -m 0640 $(CURDIR)/config/main.inc.php.dist $(CURDIR)/debian/roundcube-core/usr/share/roundcube
install -m 0640 $(CURDIR)/.htaccess $(CURDIR)/debian/roundcube-core/etc/roundcube/htaccess
for c in $(CURDIR)/debian/roundcube-core/etc/roundcube/*.php; do \
dh_link -proundcube-core etc/roundcube/$$(basename $$c) var/lib/roundcube/config/$$(basename $$c) ; \
done
dh_link -proundcube-core etc/roundcube/htaccess var/lib/roundcube/.htaccess
# Database related files
# Install empty tables and updates for each db type
install -m 0644 $(CURDIR)/SQL/mysql.initial.sql $(CURDIR)/debian/roundcube-core/usr/share/dbconfig-common/data/roundcube/install/mysql
install -m 0644 $(CURDIR)/SQL/postgres.initial.sql $(CURDIR)/debian/roundcube-core/usr/share/dbconfig-common/data/roundcube/install/pgsql
# Old database upgrades
cp -r $(CURDIR)/debian/sql/* $(CURDIR)/debian/roundcube-core/usr/share/dbconfig-common/data/roundcube/upgrade/.
# Some files are executable while not being scripts or binary...
find $(CURDIR)/debian/roundcube-core/usr/share/roundcube -type f -print0 | xargs -r0 chmod -x
# Remove useless file
rm -rf $(CURDIR)/debian/roundcube-core/usr/share/roundcube/bin
find $(CURDIR)/debian/roundcube-core -name '._*' -print0 | xargs -r0 rm
# Convert .js.src back to js
for js in $$(find $(CURDIR)/debian/roundcube-core -name '*.js.src' -print); do \
yui-compressor --type js "$$js" -o "$${js%.*}" ; \
rm "$$js" ; \
done
# Remove files shipped in tinymce package
rm -rf $(CURDIR)/debian/roundcube-core/usr/share/roundcube/program/js/tiny_mce
dh_link -proundcube-core usr/share/tinymce/www usr/share/roundcube/program/js/tiny_mce
# Remove jquery as well
rm $(CURDIR)/debian/roundcube-core/usr/share/roundcube/program/js/jquery.min.js
dh_link -proundcube-core usr/share/javascript/jquery/jquery.min.js usr/share/roundcube/program/js/jquery.min.js
# Remove GnuPG PEAR module
rm -rf $(CURDIR)/debian/roundcube-plugins/usr/share/roundcube/plugins/enigma/lib/Crypt
binary-install/roundcube-plugins::
# Plugins are in usr/share/roundcube/plugins, for each plugin
# if there is config.inc.php.dist, we symlink a config.inc.php
# in /etc/roundcube/plugins with some dummy content.
for plugin in $(CURDIR)/debian/roundcube-plugins/usr/share/roundcube/plugins/*; do \
dh_link -proundcube-plugins usr/share/roundcube/plugins/$${plugin##*/} \
var/lib/roundcube/plugins/$${plugin##*/} ; \
if [ ! -f $${plugin}/config.inc.php.dist ]; then continue; fi ; \
dh_installdirs -proundcube-plugins etc/roundcube/plugins/$${plugin##*/} ; \
(echo "<?php" ; \
echo "// Empty configuration for $${plugin##*/}" ; \
echo "// See /usr/share/roundcube/plugins/$${plugin##*/}/config.inc.php.dist for instructions" ; \
echo "?>") > \
$(CURDIR)/debian/roundcube-plugins/etc/roundcube/plugins/$${plugin##*/}/config.inc.php ; \
dh_link -proundcube-plugins etc/roundcube/plugins/$${plugin##*/}/config.inc.php \
usr/share/roundcube/plugins/$${plugin##*/}/config.inc.php ; \
done
$(patsubst %,binary-install/%,$(DEB_PACKAGES)) :: binary-install/% :
install -d $(CURDIR)/debian/$(cdbs_curpkg)/usr/share/bug/$(cdbs_curpkg)
install -m 644 $(CURDIR)/debian/bug.control $(CURDIR)/debian/$(cdbs_curpkg)/usr/share/bug/$(cdbs_curpkg)/control
clean::
debconf-updatepo
|