From 6e5d449e15a8544549b3d2c9b941f4e461f7e2e0 Mon Sep 17 00:00:00 2001 From: "Jer (on server)" Date: Wed, 30 Nov 2016 22:38:46 +0000 Subject: [PATCH 1/1] Reorganize files around subprojects. --- Makefile | 27 ++++--------------- postfix/Makefile | 21 +++++++++++++++ {configuration => postfix}/main.cf | 0 {configuration => postfix}/master.cf | 0 .../mysql/relay_domains.cf | 0 .../mysql/virtual_alias_maps.cf | 0 .../mysql/virtual_domains_maps.cf | 0 .../mysql/virtual_mailbox_limits.cf | 0 .../mysql/virtual_mailbox_maps.cf | 0 .../postgrey_whitelist_clients.local | 0 .../postgrey_whitelist_recipients | 0 {configuration => postfix}/rbl_override | 0 postfixadmin/Makefile | 2 ++ .../config.local.php | 0 .../postfixadmin.conf | 0 .../setup-postfixadmin.sh | 0 16 files changed, 28 insertions(+), 22 deletions(-) create mode 100644 postfix/Makefile rename {configuration => postfix}/main.cf (100%) rename {configuration => postfix}/master.cf (100%) rename {configuration => postfix}/mysql/relay_domains.cf (100%) rename {configuration => postfix}/mysql/virtual_alias_maps.cf (100%) rename {configuration => postfix}/mysql/virtual_domains_maps.cf (100%) rename {configuration => postfix}/mysql/virtual_mailbox_limits.cf (100%) rename {configuration => postfix}/mysql/virtual_mailbox_maps.cf (100%) rename {configuration => postfix}/postgrey_whitelist_clients.local (100%) rename {configuration => postfix}/postgrey_whitelist_recipients (100%) rename {configuration => postfix}/rbl_override (100%) create mode 100644 postfixadmin/Makefile rename config.local.php => postfixadmin/config.local.php (100%) rename postfixadmin.conf => postfixadmin/postfixadmin.conf (100%) rename setup-postfix.sh => postfixadmin/setup-postfixadmin.sh (100%) diff --git a/Makefile b/Makefile index 3e55dfa..6183414 100644 --- a/Makefile +++ b/Makefile @@ -1,24 +1,7 @@ -DST := /etc/postfix +SUBDIRS := postfix postfixadmin -INPUTS := \ - configuration/main.cf \ - configuration/master.cf \ - configuration/postgrey_whitelist_clients.local \ - configuration/postgrey_whitelist_recipients \ - configuration/rbl_override \ - configuration/mysql/relay_domains.cf \ - configuration/mysql/virtual_alias_maps.cf \ - configuration/mysql/virtual_domains_maps.cf \ - configuration/mysql/virtual_mailbox_limits.cf \ - configuration/mysql/virtual_mailbox_maps.cf +all: $(SUBDIRS) +.PHONY: $(SUBDIRS) -OUTPUTS := $(subst configuration/,$(DST)/,$(INPUTS)) - -all: $(OUTPUTS) postfixadmin - -postfixadmin: - ./setup-postfix.sh - -$(DST)/%: configuration/% - @mkdir -p $(@D) - cp $^ $@ +$(SUBDIRS): + $(MAKE) -C $@ diff --git a/postfix/Makefile b/postfix/Makefile new file mode 100644 index 0000000..fb35215 --- /dev/null +++ b/postfix/Makefile @@ -0,0 +1,21 @@ +DST := /etc/postfix + +INPUTS := \ + main.cf \ + master.cf \ + postgrey_whitelist_clients.local \ + postgrey_whitelist_recipients \ + rbl_override \ + mysql/relay_domains.cf \ + mysql/virtual_alias_maps.cf \ + mysql/virtual_domains_maps.cf \ + mysql/virtual_mailbox_limits.cf \ + mysql/virtual_mailbox_maps.cf + +OUTPUTS := $(INPUTS:%=$(DST)/%) + +all: $(OUTPUTS) + +$(DST)/%: configuration/% + @mkdir -p $(@D) + cp $^ $@ diff --git a/configuration/main.cf b/postfix/main.cf similarity index 100% rename from configuration/main.cf rename to postfix/main.cf diff --git a/configuration/master.cf b/postfix/master.cf similarity index 100% rename from configuration/master.cf rename to postfix/master.cf diff --git a/configuration/mysql/relay_domains.cf b/postfix/mysql/relay_domains.cf similarity index 100% rename from configuration/mysql/relay_domains.cf rename to postfix/mysql/relay_domains.cf diff --git a/configuration/mysql/virtual_alias_maps.cf b/postfix/mysql/virtual_alias_maps.cf similarity index 100% rename from configuration/mysql/virtual_alias_maps.cf rename to postfix/mysql/virtual_alias_maps.cf diff --git a/configuration/mysql/virtual_domains_maps.cf b/postfix/mysql/virtual_domains_maps.cf similarity index 100% rename from configuration/mysql/virtual_domains_maps.cf rename to postfix/mysql/virtual_domains_maps.cf diff --git a/configuration/mysql/virtual_mailbox_limits.cf b/postfix/mysql/virtual_mailbox_limits.cf similarity index 100% rename from configuration/mysql/virtual_mailbox_limits.cf rename to postfix/mysql/virtual_mailbox_limits.cf diff --git a/configuration/mysql/virtual_mailbox_maps.cf b/postfix/mysql/virtual_mailbox_maps.cf similarity index 100% rename from configuration/mysql/virtual_mailbox_maps.cf rename to postfix/mysql/virtual_mailbox_maps.cf diff --git a/configuration/postgrey_whitelist_clients.local b/postfix/postgrey_whitelist_clients.local similarity index 100% rename from configuration/postgrey_whitelist_clients.local rename to postfix/postgrey_whitelist_clients.local diff --git a/configuration/postgrey_whitelist_recipients b/postfix/postgrey_whitelist_recipients similarity index 100% rename from configuration/postgrey_whitelist_recipients rename to postfix/postgrey_whitelist_recipients diff --git a/configuration/rbl_override b/postfix/rbl_override similarity index 100% rename from configuration/rbl_override rename to postfix/rbl_override diff --git a/postfixadmin/Makefile b/postfixadmin/Makefile new file mode 100644 index 0000000..85487e2 --- /dev/null +++ b/postfixadmin/Makefile @@ -0,0 +1,2 @@ +all: + ./setup-postfixadmin.sh diff --git a/config.local.php b/postfixadmin/config.local.php similarity index 100% rename from config.local.php rename to postfixadmin/config.local.php diff --git a/postfixadmin.conf b/postfixadmin/postfixadmin.conf similarity index 100% rename from postfixadmin.conf rename to postfixadmin/postfixadmin.conf diff --git a/setup-postfix.sh b/postfixadmin/setup-postfixadmin.sh similarity index 100% rename from setup-postfix.sh rename to postfixadmin/setup-postfixadmin.sh -- 2.40.1