aboutsummaryrefslogtreecommitdiff
path: root/makefile
blob: 21c402482027e47e6e43f6f7c751371342e02bec (plain)
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
# SPDX-License-Identifier: LGPL-3.0-or-later

PREFIX ?= /usr/local

DATAROOTDIR ?= $(PREFIX)/share


.PHONY: all
all:
	sed -e "s:@datarootdir@:$(DATAROOTDIR):" apache2/main.conf.in >apache2/main.conf
	sed -e "s:@datarootdir@:$(DATAROOTDIR):" apache2/autoconfig.conf.in >apache2/autoconfig.conf
	sed -e "s:@datarootdir@:$(DATAROOTDIR):" apache2/autodiscover.conf.in >apache2/autodiscover.conf


.PHONY: clean
clean:
	rm -f apache2/main.conf
	rm -f apache2/autoconfig.conf
	rm -f apache2/autodiscover.conf


.PHONY: install
install: all
	install -d $(DATAROOTDIR)/emailautoconf
	
	install -d $(DATAROOTDIR)/emailautoconf/php
	install -t $(DATAROOTDIR)/emailautoconf/php php/thunderbird.php
	install -t $(DATAROOTDIR)/emailautoconf/php php/outlook.php
	
	install -d $(DATAROOTDIR)/emailautoconf/apache2
	install -t $(DATAROOTDIR)/emailautoconf/apache2 apache2/main.conf
	install -t $(DATAROOTDIR)/emailautoconf/apache2 apache2/autoconfig.conf
	install -t $(DATAROOTDIR)/emailautoconf/apache2 apache2/autodiscover.conf


.PHONY: uninstall
uninstall:
	rm -rf $(DATAROOTDIR)/emailautoconf