1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
|
#!/usr/bin/make -f
INSTALL_PLUGIN_DIR = debian/roundcube-plugins-extra/usr/share/roundcube/plugins
extract-tarballs:
dh_testdir
$(CURDIR)/debian/scripts/extract-tarballs
get-orig-tarballs:
dh_testdir
$(CURDIR)/debian/scripts/get-orig-tarballs
%:
dh $@
override_dh_fixperms:
dh_fixperms
find $(CURDIR)/$(INSTALL_PLUGIN_DIR) \
-type f -print0 | xargs -0 chmod -x
override_dh_auto_test:
dh_auto_test
$(CURDIR)/debian/scripts/check-long-description
override_dh_install:
# Install plugins
. $(CURDIR)/debian/scripts/plugin-functions.sh; \
for plugin in $$(get_plugins); do \
extra_excludes=$$(get_plugin_field $$plugin Exclude-patterns 2>/dev/null | \
awk '{ print "--exclude=" $$0 }'); \
dh_install --exclude=LICENSE --exclude=INSTALL $$extra_excludes \
"$$(get_plugin_dir $$plugin)/*" usr/share/roundcube/plugins/$$plugin; \
done
# 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.
. $(CURDIR)/debian/scripts/plugin-functions.sh; \
for plugin in $$(get_plugins); do \
dh_link usr/share/roundcube/plugins/$$plugin \
var/lib/roundcube/plugins/$$plugin ; \
if [ ! -f $(INSTALL_PLUGIN_DIR)/$$plugin/config.inc.php.dist ]; then continue; fi ; \
dh_installdirs etc/roundcube/plugins/$$plugin ; \
(echo "<?php" ; \
echo "// Empty configuration for $$plugin" ; \
echo "// See /usr/share/roundcube/plugins/$$plugin/config.inc.php.dist for instructions") > \
$(CURDIR)/debian/roundcube-plugins-extra/etc/roundcube/plugins/$$plugin/config.inc.php ; \
dh_link etc/roundcube/plugins/$$plugin/config.inc.php \
usr/share/roundcube/plugins/$$plugin/config.inc.php ; \
done
dh_install
override_dh_installdocs:
dh_installdocs
. $(CURDIR)/debian/scripts/plugin-functions.sh; \
for plugin in $$(get_plugins); do \
for file in CHANGELOG CHANGES; do \
if [ -f "$(CURDIR)/$(INSTALL_PLUGIN_DIR)/$$plugin/$$file" ]; then \
mv "$(CURDIR)/$(INSTALL_PLUGIN_DIR)/$$plugin/$$file" "$(CURDIR)/debian/roundcube-plugins-extra/usr/share/doc/roundcube-plugins-extra/changelog.$$plugin"; \
fi; \
done; \
for file in README README.md; do \
if [ -f "$(CURDIR)/$(INSTALL_PLUGIN_DIR)/$$plugin/$$file" ]; then \
mv "$(CURDIR)/$(INSTALL_PLUGIN_DIR)/$$plugin/$$file" "$(CURDIR)/debian/roundcube-plugins-extra/usr/share/doc/roundcube-plugins-extra/$$plugin.$$file"; \
fi; \
done; \
done
|