]> git.proxmox.com Git - pmg-api.git/blobdiff - src/Makefile
fix #2430: ruledb disclaimer: make separator configurable
[pmg-api.git] / src / Makefile
index 8891a3c905b59355f73f90f4427263410472497d..8e49a105b233be2fadf178c811f0794e66218985 100644 (file)
@@ -1,6 +1,4 @@
-# this requires package pmg-doc-generator
-export NOVIEW=1
-include /usr/share/pmg-doc-generator/pmg-doc-generator.mk
+-include /usr/share/pmg-doc-generator/pmg-doc-generator.mk
 
 DESTDIR=
 
@@ -9,7 +7,7 @@ DOCDIR=${DESTDIR}/usr/share/doc/pmg-api/
 BASHCOMPLDIR=${DESTDIR}/usr/share/bash-completion/completions/
 
 SERVICES = pmgdaemon pmgproxy pmgtunnel pmgmirror
-CLITOOLS = pmgdb pmgconfig pmgperf pmgcm pmgqm pmgreport pmgversion pmgupgrade pmgsubscription pmgbackup
+CLITOOLS = pmgdb pmgconfig pmgperf pmgcm pmgqm pmgreport pmgversion pmgupgrade pmgsubscription pmgbackup pmg7to8
 CLISCRIPTS = pmg-smtp-filter pmgsh pmgpolicy pmgbanner pmg-system-report
 CRONSCRIPTS = pmg-hourly pmg-daily
 
@@ -38,6 +36,8 @@ TEMPLATES =                           \
        local.cf.in                     \
        v310.pre.in                     \
        v320.pre.in                     \
+       v342.pre.in                     \
+       v400.pre.in                     \
        razor-agent.conf.in             \
        freshclam.conf.in               \
        clamd.conf.in                   \
@@ -55,6 +55,7 @@ LIBSOURCES =                          \
        PMG/HTMLMail.pm                 \
        PMG/ModGroup.pm                 \
        PMG/SMTPPrinter.pm              \
+       PMG/CertHelpers.pm              \
        PMG/Config.pm                   \
        PMG/Cluster.pm                  \
        PMG/ClusterConfig.pm            \
@@ -81,6 +82,7 @@ LIBSOURCES =                          \
        PMG/Quarantine.pm               \
        PMG/Report.pm                   \
        PMG/SACustom.pm                 \
+       PMG/TFAConfig.pm                \
        PMG/RuleDB/Group.pm             \
        PMG/RuleDB/Rule.pm              \
        PMG/RuleDB/Object.pm            \
@@ -116,6 +118,7 @@ LIBSOURCES =                                \
        PMG/RuleDB.pm                   \
        ${CLI_CLASSES}                  \
        ${SERVICE_CLASSES}              \
+       PMG/NodeConfig.pm               \
        PMG/API2/Subscription.pm        \
        PMG/API2/APT.pm                 \
        PMG/API2/Network.pm             \
@@ -127,6 +130,7 @@ LIBSOURCES =                                \
        PMG/API2/DKIMSignDomains.pm     \
        PMG/API2/DKIMSign.pm            \
        PMG/API2/Fetchmail.pm           \
+       PMG/API2/InboundTLSDomains.pm   \
        PMG/API2/Users.pm               \
        PMG/API2/Transport.pm           \
        PMG/API2/MyNetworks.pm          \
@@ -145,6 +149,8 @@ LIBSOURCES =                                \
        PMG/API2/Postfix.pm             \
        PMG/API2/Quarantine.pm          \
        PMG/API2/AccessControl.pm       \
+       PMG/API2/TFA.pm                 \
+       PMG/API2/TFAConfig.pm           \
        PMG/API2/ObjectGroupHelpers.pm  \
        PMG/API2/Rules.pm               \
        PMG/API2/RuleDB.pm              \
@@ -153,12 +159,18 @@ LIBSOURCES =                              \
        PMG/API2/When.pm                \
        PMG/API2/What.pm                \
        PMG/API2/Action.pm              \
+       PMG/API2/Certificates.pm        \
+       PMG/API2/ACME.pm                \
+       PMG/API2/ACMEPlugin.pm          \
+       PMG/API2/NodeConfig.pm          \
        PMG/API2.pm                     \
 
-SOURCES = ${LIBSOURCES} ${CLI_BINARIES} ${TEMPLATES_FILES} ${CONF_MANS} ${CLI_MANS} ${SERVICE_MANS} ${SERVICE_UNITS} ${TIMER_UNITS} pmg-sources.list pmg-apt.conf pmg-initramfs.conf
+SOURCES = ${LIBSOURCES} ${CLI_BINARIES} ${TEMPLATES_FILES} ${CONF_MANS} ${CLI_MANS} ${SERVICE_MANS} ${SERVICE_UNITS} ${TIMER_UNITS} pmg-sources.list pmg-initramfs.conf
 
 all: ${SOURCES}
 
+# TODO: fallbacks for version/release if not build via packaging
+REPOID ?= $(or $(shell git rev-parse --short=12 HEAD), unknown)
 PMG/pmgcfg.pm: PMG/pmgcfg.pm.in
        sed -e s/@VERSION@/${PMGVERSION}/ -e s/@PMGRELEASE@/${PMGRELEASE}/ -e s/@PACKAGE@/${PACKAGE}/ -e s/@REPOID@/${REPOID}/ $< >$@.tmp
        mv $@.tmp $@
@@ -180,7 +192,6 @@ install: ${SOURCES} $(addsuffix .service-bash-completion, ${SERVICES}) $(addsuff
        install -d -m 0755 ${DOCDIR}
        # TODO: is there a better location ?
        install -m 0644 favicon.ico ${DOCDIR}
-       install -D -m 0644 pmg-apt.conf ${DESTDIR}/etc/apt/apt.conf.d/75pmgconf
        install -D -m 0644 pmg-sources.list ${DESTDIR}/etc/apt/sources.list.d/pmg-enterprise.list
        for i in ${LIBSOURCES}; do install -D -m 0644 $$i ${PERL5DIR}/$$i; done
        for i in ${SERVICES}; do install -D -m 0644 PMG/Service/$$i.pm ${PERL5DIR}/PMG/Service/$$i.pm; done
@@ -205,13 +216,22 @@ check:
 
 .PHONY: clean
 clean:
-       make cleanup-docgen
-       make -C tests clean
+       $(MAKE) -C tests clean
+       rm -f *.xml.tmp *.1 *.5 *.8 *{synopsis,opts}.adoc docinfo.xml
        rm -f PMG/pmgcfg.pm
        rm -rf ${CONF_MANS} *.bash-completion *.service-bash-completion
        if test -d .git; then  rm -f PMG/pmgcfg.pm; fi
        find . -name '*~' -exec rm {} ';'
 
+pmg7to8.1: bin/pmg7to8
+       printf ".TH PMGTO8 1\n.SH NAME\npmg7to8 \- Proxmox Mail Gateway upgrade checker script for 7.3+ to current 8.x\n" > $@.tmp
+       printf ".SH DESCRIPTION\nThis tool will help you to detect common pitfalls and misconfguration\
+        before, and during the upgrade of a Proxmox Mail Gateway system\n" >> $@.tmp
+       printf "Any failure must be addressed before the upgrade, and any warning must be addressed, \
+        or at least carefully evaluated, if a false-positive is suspected\n" >> $@.tmp
+       printf ".SH SYNOPSIS\npmg7to8\n" >> $@.tmp
+       mv $@.tmp $@
+
 %.1: bin/%
        rm -f $@
        podselect $< |pod2man -n $(notdir $*) -s 1 -r ${PKGVER} -c"Proxmox Documentation" >$@.tmp