File: Dir.sd.mk

package info (click to toggle)
secnet 0.6.8
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 1,956 kB
  • sloc: ansic: 15,234; python: 1,057; perl: 966; sh: 596; tcl: 484; java: 231; asm: 114; yacc: 89; php: 64; makefile: 48; awk: 40
file content (39 lines) | stat: -rw-r--r-- 1,017 bytes parent folder | download | duplicates (2)
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
# This file is part of secnet.
# See LICENCE and this file CREDITS for full list of copyright holders.
# SPDX-License-Identifier: GPL-3.0-or-later
# There is NO WARRANTY.

&TARGETS += & sites.conf sites-nonego.conf

include common.make

&/%.key: &^/%.key.b64
	base64 -d <$< >$@.new && mv -f $@.new $@

&sites-nonego.conf: $(src)/make-secnet-sites &^/sites &/Dir.mk
	$(src)/make-secnet-sites --output-version=1 &^/sites $@

&sites.conf: $(src)/make-secnet-sites &^/sites &/Dir.mk
	mkdir -p &pubkeys
	&~/make-secnet-sites --pubkeys-dir=&pubkeys --pubkeys-install \
		&^/sites $@.tmp && mv -f $@.tmp $@

&clean::
	rm -rf &pubkeys

&:macro &privkey
&/&$1.privkeys/priv.&$2: &/&$3
	mkdir -p $(dir $@) && cp $< $@.tmp && mv -f $@.tmp $@
&PRIVKEYS += &/&$3 &/&$1.privkeys/priv.&$2
&clean::
	rm -rf &/&$1.privkeys
&:endm

&{&privkey,outside,5dc36a4700,rsa1-sites2.key}
&{&privkey,outside,0000000000,outside.key}
&{&privkey,inside,0000000000,inside.key}

&all-privkeys:: $(&PRIVKEYS)

&TARGETS += $(&PRIVKEYS)
&CLEAN += *.new