git.lirion.de

Of git, get, and gud

aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 28264ac9211158a25b8696fd52876bfb329f73ce (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
27
28
29
30
31
32
33
34
35
36
37
38
all:

FJVER := 9.0.2

dirs: dirs-amd64 dirs-arm-6 dirs-arm64
dirs-amd64:
	@install -dvm0755 fs/{,amd64,amd64/usr,amd64/usr/bin}
dirs-arm-6:
	@install -dvm0755 fs/{,arm-6,arm-6/usr,arm-6/usr/bin}
dirs-arm64:
	@install -dvm0755 fs/{,arm64,arm64/usr,arm64/usr/bin}

download: dirs dl-amd64 dl-arm-6 dl-arm64

dl-amd64:
	@printf 'forgejo-${FJVER}-amd64:\n'
	@( cd fs/amd64/usr/bin && curl -#RLO -C - https://codeberg.org/forgejo/forgejo/releases/download/v${FJVER}/forgejo-${FJVER}-linux-amd64 )
dl-arm-6:
	@printf 'forgejo-${FJVER}-arm-6:\n'
	@( cd fs/arm-6/usr/bin && curl -#RLO -C - https://codeberg.org/forgejo/forgejo/releases/download/v${FJVER}/forgejo-${FJVER}-linux-arm-6 )
dl-arm64:
	@printf 'forgejo-${FJVER}-arm64:\n'
	@( cd fs/arm64/usr/bin && curl -#RLO -C - https://codeberg.org/forgejo/forgejo/releases/download/v${FJVER}/forgejo-${FJVER}-linux-arm64 )

clean:
	@printf 'Not clearing out the downloads, for that, use the target \033[1mclean-downloads\033[0m.\n'
	@rm -rv ./nfpm/build/

clean-downloads:
	@rm -rv ./fs/*

nfpm: nfpm-Makefile nfpm-descend

nfpm-Makefile:
	@sed -i 's/FJVER :=.*/FJVER := $"${FJVER}$"/' ./nfpm/Makefile

nfpm-descend:
	$(MAKE) -C ./nfpm