#!/usr/bin/make -f export DEB_BUILD_MAINT_OPTIONS = hardening=+all PACKAGE = $(shell dh_listpackages) DEBDIR = $(CURDIR)/debian TMP = $(DEBDIR)/$(PACKAGE) UPSTREAMSTUFF = META.json sympa.spec UPSTREAMSTUFF += $(shell find po -iname 'stamp-po') UPSTREAMSTUFF += $(shell find po -type f -iname '*.po*' | sed 's/\.upstream//') override_dh_auto_configure: dh_auto_configure -- \ --enable-fhs \ --sysconfdir=/etc/sympa \ --sbindir=/usr/lib/sympa/bin \ --libexecdir=/usr/lib/sympa/bin \ --with-cgidir=/usr/lib/cgi-bin/sympa \ --with-staticdir=/usr/share/sympa/static_content \ --with-cssdir=/var/lib/sympa/css \ --with-picturesdir=/var/lib/sympa/pictures \ --datadir=/usr/share \ --localedir=/usr/share/locale \ --mandir=/usr/share/man \ --with-initdir=/etc/init.d \ --docdir=/usr/share/doc/sympa \ --with-piddir=/run/sympa \ --with-perl=/usr/bin/perl \ --with-user=sympa \ --with-group=sympa \ --with-aliases_file=/etc/mail/sympa/aliases # Backup upstream stuff for file in $(UPSTREAMSTUFF); do \ if [ -e $$file ] && [ ! -e $$file.upstream ] ; then \ cp $$file $$file.upstream ; \ fi \ done # Simulate presence of files removed from the DFSG repacked tarball mkdir -p www/js/jquery-ui/images www/js/jquery-minicolors touch \ www/js/jquery.js \ www/js/jquery-migrate.js \ www/js/jquery-ui/jquery-ui.js \ www/js/jquery-ui/jquery-ui.css \ www/js/jquery-ui/images/ui-bg_highlight-soft_75_cccccc_1x100.png \ www/js/jquery-ui/images/ui-icons_cc0000_256x240.png \ www/js/jquery-ui/images/ui-icons_ffffff_256x240.png \ www/js/jquery-ui/images/ui-icons_777620_256x240.png \ www/js/jquery-ui/images/ui-bg_glass_75_e6e6e6_1x400.png \ www/js/jquery-ui/images/ui-bg_glass_55_fbf9ee_1x400.png \ www/js/jquery-ui/images/ui-icons_444444_256x240.png \ www/js/jquery-ui/images/ui-icons_777777_256x240.png \ www/js/jquery-ui/images/ui-bg_flat_75_ffffff_40x100.png \ www/js/jquery-ui/images/ui-bg_glass_75_dadada_1x400.png \ www/js/jquery-ui/images/ui-icons_222222_256x240.png \ www/js/jquery-ui/images/ui-bg_glass_95_fef1ec_1x400.png \ www/js/jquery-ui/images/ui-icons_cd0a0a_256x240.png \ www/js/jquery-ui/images/ui-icons_888888_256x240.png \ www/js/jquery-ui/images/ui-icons_555555_256x240.png \ www/js/jquery-ui/images/ui-bg_glass_65_ffffff_1x400.png \ www/js/jquery-ui/images/ui-icons_454545_256x240.png \ www/js/jquery-ui/images/ui-icons_2e83ff_256x240.png \ www/js/jquery-ui/images/ui-bg_flat_0_aaaaaa_40x100.png \ www/js/jquery-minicolors/jquery.minicolors.css \ www/js/jquery-minicolors/jquery.minicolors.js \ www/js/jquery-minicolors/jquery.minicolors.min.js \ www/js/jquery-minicolors/jquery.minicolors.png ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) override_dh_auto_test: echo "SKIP testsuite as required" endif override_dh_auto_install: dh_auto_install rm -rf \ $(TMP)/run \ $(TMP)/etc/sympa/README \ $(TMP)/etc/sympa/sympa/sympa.conf \ $(TMP)/etc/sympa/smrsh \ $(TMP)/usr/share/sympa/default/ca-bundle.crt \ $(TMP)/usr/share/sympa/bin/create_db.Sybase \ $(TMP)/etc/sympa/data_structure.version \ $(TMP)/usr/share/sympa/bin/sympa_soap_client.pl \ $(TMP)/usr/share/sympa/static_content/js/jquery.js \ $(TMP)/usr/share/sympa/static_content/js/jquery-migrate.js \ $(TMP)/usr/share/sympa/static_content/js/jquery-ui \ $(TMP)/usr/share/sympa/static_content/fonts/font-awesome/ \ $(TMP)/usr/share/sympa/static_content/js/jquery-minicolors \ $(TMP)/usr/share/sympa/static_content/fonts/foundation-icons/preview.html \ $(TMP)/usr/share/sympa/static_content/fonts/Raleway/OFL.txt mv $(TMP)/usr/share/doc/sympa/samples $(TMP)/usr/share/doc/sympa/examples override_dh_installsystemd: dh_installsystemd --name sympa sympa.service dh_installsystemd --no-start --name sympa-bounced sympa-bounced.service dh_installsystemd --no-start --name sympa-archived sympa-archived.service dh_installsystemd --no-start --name sympa-bulk sympa-bulk.service dh_installsystemd --no-start --name sympa-task_manager sympa-task_manager.service override_dh_installinit: dh_installinit --name sympa dh_installinit --noscripts --name sympa-bounced dh_installinit --noscripts --name sympa-archived dh_installinit --noscripts --name sympa-bulk dh_installinit --noscripts --name sympa-task_manager override_dh_clean: dh_clean rm -f po/*/*.gmo rm -f po/*/stamp-po rm -f config.status.lineno rm -f debian/sympa_wizard.8 rm -rf $(DEBDIR)/dbconfig-common/install # Remove files not present in the DFSG repacked tarball rm -rf \ www/js/jquery.js \ www/js/jquery-migrate.js \ www/js/jquery-ui \ www/js/jquery-minicolors \ www/js/jquery-ui.css # Restore upstream stuff for file in $(UPSTREAMSTUFF); do \ if [ -e $$file.upstream ] ; then \ rm -f $$file; \ mv $$file.upstream $$file; \ fi \ done %: dh $@ --with autoreconf