chiark / gitweb /
userv: Tidy up a bit. Require file descriptors to be right.
[cryptomail] / Makefile
CommitLineData
71074336
MW
1### Makefile for cryptomail
2
3PRP = twofish
4KEYSZ = 256
5USER = cryptomail
6ASUSER = become $(USER) -g$(USER) --
7
8all: config.files crontab.stamp
9
10config.files: config
11 splitconf config
aeec1a4e 12 update-addrcheck
71074336
MW
13
14crontab.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 23install: all db/keyring db/cryptomail.db
71074336
MW
24
25db:
26 mkdir -p -m 700 db.new
27 chown $(USER):$(USER) db.new
28 mv db.new db
29
30db/keyring: db
31 $(ASUSER) \
aeec1a4e
MW
32 key -k db/keyring add -abinary -b$(KEYSZ) -eforever \
33 cryptomail prp=$(PRP)
71074336
MW
34
35db/cryptomail.db: db
36 $(ASUSER) bin/cryptomail initdb
37
38clean:
39 splitconf -d config
40 rm -f config.files crontab.stamp
41
42realclean: clean
43 rm -rf db
44
45.PHONY: clean all install