3 include /usr/share/cdbs/1/rules/debhelper.mk
5 DEB_INSTALL_CHANGELOGS_ALL=CHANGELOG
7 # In order to regenerate 'debian/control' :
8 # DEB_AUTO_UPDATE_DEBIAN_CONTROL=yes fakeroot debian/rules clean
9 # Then check manually if everything's ok
11 binary-install/roundcube-core::
13 rm -rf $(CURDIR)/debian/roundcube-core/usr/share/roundcube/plugins
15 # Symlink all that is in /usr/share/roundcube to /var/lib/roundcube
16 find debian/roundcube-core/usr/share/roundcube -maxdepth 1 -mindepth 1 | \
18 if [ ! -L "$$i" ]; then \
19 dh_link -proundcube-core "`echo "$$i" | sed -e s#debian/roundcube-core/##`" \
20 "`echo "$$i" | sed -e s#debian/roundcube-core/usr/share/roundcube/#var/lib/roundcube/#`"; \
23 # Install config files
24 install -m 0640 $(CURDIR)/config/db.inc.php.dist $(CURDIR)/debian/roundcube-core/etc/roundcube/db.inc.php
25 install -m 0640 $(CURDIR)/config/main.inc.php.dist $(CURDIR)/debian/roundcube-core/usr/share/roundcube
26 install -m 0640 $(CURDIR)/.htaccess $(CURDIR)/debian/roundcube-core/etc/roundcube/htaccess
27 for c in $(CURDIR)/debian/roundcube-core/etc/roundcube/*.php; do \
28 dh_link -proundcube-core etc/roundcube/$$(basename $$c) var/lib/roundcube/config/$$(basename $$c) ; \
30 dh_link -proundcube-core etc/roundube/htaccess var/lib/roundcube/.htaccess
32 # Database related files
33 # Install empty tables and updates for each db type
34 install -m 0644 $(CURDIR)/SQL/mysql.initial.sql $(CURDIR)/debian/roundcube-core/usr/share/dbconfig-common/data/roundcube/install/mysql
35 install -m 0644 $(CURDIR)/SQL/postgres.initial.sql $(CURDIR)/debian/roundcube-core/usr/share/dbconfig-common/data/roundcube/install/pgsql
36 install -m 0644 $(CURDIR)/SQL/sqlite.initial.sql $(CURDIR)/debian/roundcube-core/usr/share/dbconfig-common/data/roundcube/install/sqlite
38 # Old database upgrades
39 cp -r $(CURDIR)/debian/sql/* $(CURDIR)/debian/roundcube-core/usr/share/dbconfig-common/data/roundcube/upgrade/.
41 # Some files are executable while not being scripts or binary...
42 find $(CURDIR)/debian/roundcube-core/usr/share/roundcube -type f -print0 | xargs -r0 chmod -x
44 rm $(CURDIR)/debian/roundcube-core/usr/share/roundcube/bin/*.sh
45 find $(CURDIR)/debian/roundcube-core -name '._*' -print0 | xargs -r0 rm
46 find $(CURDIR)/debian/roundcube-core -name '*.js.src' -print0 | xargs -r0 rm
47 # Remove files shipped in tinymce package
48 rm -rf $(CURDIR)/debian/roundcube-core/usr/share/roundcube/program/js/tiny_mce
49 dh_link -proundcube-core usr/share/tinymce/www usr/share/roundcube/program/js/tiny_mce
50 # Remove jquery as well
51 rm $(CURDIR)/debian/roundcube-core/usr/share/roundcube/program/js/jquery-1.4.min.js
52 dh_link -proundcube-core usr/share/javascript/jquery/jquery.min.js usr/share/roundcube/program/js/jquery-1.4.min.js
54 $(patsubst %,binary-install/%,$(DEB_PACKAGES)) :: binary-install/% :
55 install -d $(CURDIR)/debian/$(cdbs_curpkg)/usr/share/bug/$(cdbs_curpkg)
56 install -m 644 $(CURDIR)/debian/bug.control $(CURDIR)/debian/$(cdbs_curpkg)/usr/share/bug/$(cdbs_curpkg)/control