Commit | Line | Data |
---|---|---|
71074336 MW |
1 | ### Makefile for cryptomail |
2 | ||
3 | PRP = twofish | |
4 | KEYSZ = 256 | |
5 | USER = cryptomail | |
6 | ASUSER = become $(USER) -g$(USER) -- | |
7 | ||
8 | all: config.files crontab.stamp | |
9 | ||
10 | config.files: config | |
11 | splitconf config | |
aeec1a4e | 12 | update-addrcheck |
71074336 MW |
13 | |
14 | crontab.stamp: crontab | |
15 | @if [ -f really-install-crontab ]; then \ | |
aeec1a4e MW |
16 | echo "crontab -u $(USER) crontab"; \ |
17 | crontab -u $(USER) crontab; \ | |
71074336 MW |
18 | else \ |
19 | echo "(Not installing crontab.)"; \ | |
20 | fi | |
21 | touch crontab.stamp | |
22 | ||
aeec1a4e | 23 | install: all db/keyring db/cryptomail.db |
71074336 MW |
24 | |
25 | db: | |
26 | mkdir -p -m 700 db.new | |
27 | chown $(USER):$(USER) db.new | |
28 | mv db.new db | |
29 | ||
30 | db/keyring: db | |
31 | $(ASUSER) \ | |
aeec1a4e MW |
32 | key -k db/keyring add -abinary -b$(KEYSZ) -eforever \ |
33 | cryptomail prp=$(PRP) | |
71074336 MW |
34 | |
35 | db/cryptomail.db: db | |
36 | $(ASUSER) bin/cryptomail initdb | |
37 | ||
38 | clean: | |
39 | splitconf -d config | |
40 | rm -f config.files crontab.stamp | |
41 | ||
42 | realclean: clean | |
43 | rm -rf db | |
44 | ||
45 | .PHONY: clean all install |