Initial commit of the system.
[cryptomail] / Makefile
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
12
13 crontab.stamp: crontab
14 @if [ -f really-install-crontab ]; then \
15 echo "crontab crontab"; \
16 crontab crontab; \
17 else \
18 echo "(Not installing crontab.)"; \
19 fi
20 touch crontab.stamp
21
22 install: db/keyring db/cryptomail.db
23
24 db:
25 mkdir -p -m 700 db.new
26 chown $(USER):$(USER) db.new
27 mv db.new db
28
29 db/keyring: db
30 $(ASUSER) \
31 key -k db/keyring add -abinary -b$(KEYSZ) cryptomail prp=$(PRP)
32
33 db/cryptomail.db: db
34 $(ASUSER) bin/cryptomail initdb
35
36 clean:
37 splitconf -d config
38 rm -f config.files crontab.stamp
39
40 realclean: clean
41 rm -rf db
42
43 .PHONY: clean all install