INSTALLFILES=$(patsubst packaging/install/%,debian/$(OLDPACKAGE)-%.install,$(wildcard packaging/install/[a-z]*))
PINSTALLFILES=$(foreach i,$(ENABLED_PLUGINS),$(if $(wildcard plugins/$i/packaging/install/[a-z]*),debian/$(PACKAGE)-plugin-$i.install))
+PTRIGGERSFILES=$(foreach i,$(ENABLED_PLUGINS),$(if $(wildcard plugins/$i/debian/[a-z]*.triggers),debian/$(PACKAGE)-plugin-$i.triggers))
+
DOCSFILES=$(patsubst packaging/docs/%,debian/$(OLDPACKAGE)-%.docs,$(wildcard packaging/docs/[a-z]*)) \
$(patsubst packaging/docs/%,debian/$(PACKAGE)-%.docs,$(wildcard packaging/docs/[a-z]*))
PDOCSFILES=$(foreach i,$(ENABLED_PLUGINS),$(if $(wildcard plugins/$i/packaging/docs/[a-z]*),debian/$(PACKAGE)-plugin-$i.docs))
sh $(CURDIR)/deb-specific/manage-uufiles.sh clean
.PHONY: conffiles
-conffiles: $(PPOSTINST) $(PPRERM) $(CRONDFILES) $(DIRSFILES) $(LINKSFILES) $(INSTALLFILES) $(DOCSFILES) $(READMEFILES) $(PCRONDFILES) $(PDIRSFILES) $(PLINKSFILES) $(PINSTALLFILES) $(PDOCSFILES) $(PEXAMPLESFILES) debian/control
+conffiles: $(PPOSTINST) $(PPRERM) $(CRONDFILES) $(DIRSFILES) $(LINKSFILES) $(INSTALLFILES) $(DOCSFILES) $(READMEFILES) $(PCRONDFILES) $(PDIRSFILES) $(PLINKSFILES) $(PINSTALLFILES) $(PDOCSFILES) $(PTRIGGERSFILES) $(PEXAMPLESFILES) debian/control
# Construct the plugin's 'postinst' script out of a template in debian/dsf-in/plugin.postinst
debian/$(PACKAGE)-plugin-%.postinst:
export PLUGLONGNAME="`cat $(CURDIR)/plugins/$*/NAME`"; \
- $(SED_REPLACE) -e 's/@PLUGSHORTNAME@/$*/g' -e "s/@PLUGLONGNAME@/$$PLUGLONGNAME/g" $(CURDIR)/debian/dsf-in/plugin.postinst > $@
+ [ -e $(CURDIR)/plugins/$*/debian/plugin-$*.postinst ] \
+ && $(SED_REPLACE) -e 's/@PLUGSHORTNAME@/$*/g' -e "s/@PLUGLONGNAME@/$$PLUGLONGNAME/g" $(CURDIR)/plugins/$*/debian/plugin-$*.postinst > $@ \
+ || $(SED_REPLACE) -e 's/@PLUGSHORTNAME@/$*/g' -e "s/@PLUGLONGNAME@/$$PLUGLONGNAME/g" $(CURDIR)/debian/dsf-in/plugin.postinst > $@
# Construct the plugin's 'prerm' script out of a template in debian/dsf-in/plugin.prerm
debian/$(PACKAGE)-plugin-%.prerm:
export PLUGLONGNAME="`cat $(CURDIR)/plugins/$*/NAME`"; \
- $(SED_REPLACE) -e 's/@PLUGSHORTNAME@/$*/g' -e "s/@PLUGLONGNAME@/$$PLUGLONGNAME/g" $(CURDIR)/debian/dsf-in/plugin.prerm > $@
+ [ -e $(CURDIR)/plugins/$*/debian/plugin-$*.prerm ] \
+ && $(SED_REPLACE) -e 's/@PLUGSHORTNAME@/$*/g' -e "s/@PLUGLONGNAME@/$$PLUGLONGNAME/g" $(CURDIR)/plugins/$*/debian/plugin-$*.prerm > $@ \
+ || $(SED_REPLACE) -e 's/@PLUGSHORTNAME@/$*/g' -e "s/@PLUGLONGNAME@/$$PLUGLONGNAME/g" $(CURDIR)/debian/dsf-in/plugin.prerm > $@
# Perform substitutions in plugin's cron.d file
debian/$(PACKAGE)-plugin-%.cron.d:
debian/$(OLDPACKAGE)-%.cron.d:
(cat $(CURDIR)/packaging/cron.d/00phpcron ; $(SED_REPLACE) -e 's/\$$FFUSER/$(OLDPACKAGE)/g' $(CURDIR)/packaging/cron.d/$*) | $(SED_REPLACE) > $@
-# Perform subsitutions on 'dirs', 'links', 'install', 'docs' files
+# Perform subsitutions on 'dirs', 'links', 'install', 'docs', 'triggers' files
debian/$(PACKAGE)-plugin-%.dirs:
$(SED_REPLACE) $(CURDIR)/plugins/$*/packaging/dirs/plugin-$* > $@
debian/$(PACKAGE)-plugin-%.install:
$(SED_REPLACE) $(CURDIR)/plugins/$*/packaging/install/plugin-$* > $@
+debian/$(PACKAGE)-plugin-%.triggers:
+ $(SED_REPLACE) $(CURDIR)/plugins/$*/debian/plugin-$*.triggers > $@
+
debian/$(OLDPACKAGE)-%.install:
$(SED_REPLACE) $(CURDIR)/packaging/install/$* > $@
debian/po/%:
cat $(patsubst debian/po/%, debian/dsf-po/%, $@) | $(SED_REPLACE) > $@
+override_dh_auto_build:
+
build: remove-binary-files debian/po/templates.pot conffiles
$(DH) $@
# Build FHS-compatible Apache config files (generates contents of etc/httpd.conf.d-fhs/ etc.)
utils/manage-apache-config.sh build
+# Update SQL for list of country codes
+ utils/ffcountries.pl > 200403251.sql
+
# Preprocess files with DSF-Helper
perl $(CURDIR)/deb-specific/dsf-helper.pl
rm -f $(CURDIR)/debian/*.README.Debian
rm -f $(CURDIR)/debian/$(PACKAGE)-config.sgml
rm -f $(CURDIR)/debian/$(OLDPACKAGE)-common.manpages
- rm -f cvssh.1 $(PACKAGE)-config.1
+ rm -f cvssh.1 $(PACKAGE)-config.1 200403251.sql
rm -f $(CURDIR)/debian/README.Debian
rm -rf locales