3 include /usr/share/cdbs/1/rules/debhelper.mk
5 DEB_INSTALL_CHANGELOGS_ALL=CHANGELOG
7 DEB_DH_INSTALL_ARGS = \
8 --exclude=chgsaslpasswd.c \
9 --exclude=chgvirtualminpasswd.c \
10 --exclude=chpass-wrapper.py
12 binary-install/roundcube-core::
13 # Install config files
14 install -m 0640 $(CURDIR)/config/db.inc.php.dist $(CURDIR)/debian/roundcube-core/etc/roundcube/db.inc.php
15 install -m 0640 $(CURDIR)/config/main.inc.php.dist $(CURDIR)/debian/roundcube-core/usr/share/roundcube
16 install -m 0640 $(CURDIR)/.htaccess $(CURDIR)/debian/roundcube-core/etc/roundcube/htaccess
17 for c in $(CURDIR)/debian/roundcube-core/etc/roundcube/*.php; do \
18 dh_link -proundcube-core etc/roundcube/$$(basename $$c) var/lib/roundcube/config/$$(basename $$c) ; \
20 dh_link -proundcube-core etc/roundcube/htaccess var/lib/roundcube/.htaccess
22 # Database related files
23 # Install empty tables and updates for each db type
24 install -m 0644 $(CURDIR)/SQL/mysql.initial.sql $(CURDIR)/debian/roundcube-core/usr/share/dbconfig-common/data/roundcube/install/mysql
25 install -m 0644 $(CURDIR)/SQL/postgres.initial.sql $(CURDIR)/debian/roundcube-core/usr/share/dbconfig-common/data/roundcube/install/pgsql
27 # Old database upgrades
28 cp -r $(CURDIR)/debian/sql/* $(CURDIR)/debian/roundcube-core/usr/share/dbconfig-common/data/roundcube/upgrade/.
30 # Some files are executable while not being scripts or binary...
31 find $(CURDIR)/debian/roundcube-core/usr/share/roundcube -type f -print0 | xargs -r0 chmod -x
33 rm -rf $(CURDIR)/debian/roundcube-core/usr/share/roundcube/bin
34 find $(CURDIR)/debian/roundcube-core -name '._*' -print0 | xargs -r0 rm
35 # Convert .js.src back to js
36 for js in $$(find $(CURDIR)/debian/roundcube-core -name '*.js.src' -print); do \
37 yui-compressor --type js "$$js" -o "$${js%.*}" ; \
40 # Remove files shipped in tinymce package
41 rm -rf $(CURDIR)/debian/roundcube-core/usr/share/roundcube/program/js/tiny_mce
42 dh_link -proundcube-core usr/share/tinymce/www usr/share/roundcube/program/js/tiny_mce
43 # Remove jquery as well
44 rm $(CURDIR)/debian/roundcube-core/usr/share/roundcube/program/js/jquery.min.js
45 dh_link -proundcube-core usr/share/javascript/jquery/jquery.min.js usr/share/roundcube/program/js/jquery.min.js
46 # Remove GnuPG PEAR module
47 rm -rf $(CURDIR)/debian/roundcube-plugins/usr/share/roundcube/plugins/enigma/lib/Crypt
49 binary-install/roundcube-plugins::
50 # Plugins are in usr/share/roundcube/plugins, for each plugin
51 # if there is config.inc.php.dist, we symlink a config.inc.php
52 # in /etc/roundcube/plugins with some dummy content.
53 for plugin in $(CURDIR)/debian/roundcube-plugins/usr/share/roundcube/plugins/*; do \
54 dh_link -proundcube-plugins usr/share/roundcube/plugins/$${plugin##*/} \
55 var/lib/roundcube/plugins/$${plugin##*/} ; \
56 if [ ! -f $${plugin}/config.inc.php.dist ]; then continue; fi ; \
57 dh_installdirs -proundcube-plugins etc/roundcube/plugins/$${plugin##*/} ; \
59 echo "// Empty configuration for $${plugin##*/}" ; \
60 echo "// See /usr/share/roundcube/plugins/$${plugin##*/}/config.inc.php.dist for instructions" ; \
62 $(CURDIR)/debian/roundcube-plugins/etc/roundcube/plugins/$${plugin##*/}/config.inc.php ; \
63 dh_link -proundcube-plugins etc/roundcube/plugins/$${plugin##*/}/config.inc.php \
64 usr/share/roundcube/plugins/$${plugin##*/}/config.inc.php ; \
67 $(patsubst %,binary-install/%,$(DEB_PACKAGES)) :: binary-install/% :
68 install -d $(CURDIR)/debian/$(cdbs_curpkg)/usr/share/bug/$(cdbs_curpkg)
69 install -m 644 $(CURDIR)/debian/bug.control $(CURDIR)/debian/$(cdbs_curpkg)/usr/share/bug/$(cdbs_curpkg)/control