]> git.donarmstrong.com Git - roundcube.git/blob - debian/rules
49ef123b5624e3fd7fa87998910e8a2f7ff44775
[roundcube.git] / debian / rules
1 #!/usr/bin/make -f
2
3 include /usr/share/cdbs/1/rules/debhelper.mk
4
5 DEB_INSTALL_CHANGELOGS_ALL=CHANGELOG
6
7 binary-install/roundcube-core::
8         # Install config files
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) ; \
14         done
15         dh_link -proundcube-core etc/roundcube/htaccess var/lib/roundcube/.htaccess
16
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
22
23         # Old database upgrades
24         cp -r $(CURDIR)/debian/sql/* $(CURDIR)/debian/roundcube-core/usr/share/dbconfig-common/data/roundcube/upgrade/.
25
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
28         # Remove useless file
29         rm -rf $(CURDIR)/debian/roundcube-core/usr/share/roundcube/bin
30         find $(CURDIR)/debian/roundcube-core -name '._*' -print0 | xargs -r0 rm
31         find $(CURDIR)/debian/roundcube-core -name '*.js.src' -print0 | xargs -r0 rm
32         # Remove files shipped in tinymce package
33         rm -rf $(CURDIR)/debian/roundcube-core/usr/share/roundcube/program/js/tiny_mce
34         dh_link -proundcube-core usr/share/tinymce/www usr/share/roundcube/program/js/tiny_mce
35         # Remove jquery as well
36         rm $(CURDIR)/debian/roundcube-core/usr/share/roundcube/program/js/jquery-1.4.min.js
37         dh_link -proundcube-core usr/share/javascript/jquery/jquery.min.js usr/share/roundcube/program/js/jquery-1.4.min.js
38
39 $(patsubst %,binary-install/%,$(DEB_PACKAGES)) :: binary-install/% :
40         install -d $(CURDIR)/debian/$(cdbs_curpkg)/usr/share/bug/$(cdbs_curpkg)
41         install -m 644 $(CURDIR)/debian/bug.control $(CURDIR)/debian/$(cdbs_curpkg)/usr/share/bug/$(cdbs_curpkg)/control
42
43 clean::
44         debconf-updatepo