X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=debian%2Frules;h=e3452ee1245d2bf1d9eb2d638cc8fdb3b44d25b0;hb=bb0f03620c04bdb10e725f3220fa1e2f40166540;hp=e7322f5d708077c22450870791aa8f8b3474c539;hpb=a9f6cf37c998b03d025f94ae1f14c60a9971924d;p=roundcube.git diff --git a/debian/rules b/debian/rules index e7322f5..e3452ee 100755 --- a/debian/rules +++ b/debian/rules @@ -4,18 +4,12 @@ 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:: - # Remove plugins - rm -rf $(CURDIR)/debian/roundcube-core/usr/share/roundcube/plugins - - # Symlink all that is in /usr/share/roundcube to /var/lib/roundcube - find debian/roundcube-core/usr/share/roundcube -maxdepth 1 -mindepth 1 | \ - while read i; do \ - if [ ! -L "$$i" ]; then \ - dh_link -proundcube-core "`echo "$$i" | sed -e s#debian/roundcube-core/##`" \ - "`echo "$$i" | sed -e s#debian/roundcube-core/usr/share/roundcube/#var/lib/roundcube/#`"; \ - fi \ - done # 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 @@ -39,7 +33,11 @@ binary-install/roundcube-core:: # Remove useless file rm -rf $(CURDIR)/debian/roundcube-core/usr/share/roundcube/bin find $(CURDIR)/debian/roundcube-core -name '._*' -print0 | xargs -r0 rm - find $(CURDIR)/debian/roundcube-core -name '*.js.src' -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 @@ -47,6 +45,23 @@ binary-install/roundcube-core:: rm $(CURDIR)/debian/roundcube-core/usr/share/roundcube/program/js/jquery-1.4.min.js dh_link -proundcube-core usr/share/javascript/jquery/jquery.min.js usr/share/roundcube/program/js/jquery-1.4.min.js +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 " \ + $(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