summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 13c1316ab28f231942c8db5d8503bdbbfee7d495 (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
LUA = lua5.3

APORTS ?= $(HOME)/aports
gitbranch = $(shell git -C $(APORTS) rev-parse --abbrev-ref HEAD)
rel = v$(gitbranch:-stable=)


targets = $(rel)/main.yaml $(rel)/community.yaml

all: $(targets)

repo=$(notdir $(basename $@))

$(rel)/%.yaml:
	$(LUA) secfixes.lua --repo $(repo) --release $(rel) \
		$(APORTS)/$(repo)/*/APKBUILD > $@.tmp \
		&& $(LUA) secfixes.lua --verify $@.tmp \
		&& mv $@.tmp $@

.PHONY: clean
clean:
	rm -f $(targets)

.PHONY: depend depends
depend depends:
	sudo apk add -U --virtual .secdb-depends lua5.3 lua5.3-lyaml lua5.3-optarg