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