git.lirion.de

Of git, get, and gud

aboutsummaryrefslogtreecommitdiffstats
path: root/nfpm/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'nfpm/Makefile')
-rw-r--r--nfpm/Makefile42
1 files changed, 42 insertions, 0 deletions
diff --git a/nfpm/Makefile b/nfpm/Makefile
new file mode 100644
index 0000000..eaf4e3f
--- /dev/null
+++ b/nfpm/Makefile
@@ -0,0 +1,42 @@
+FJVER := 9.0.2
+
+all: skel chglog build
+
+skel: skel-amd64 skel-arm-6 skel-arm64
+
+skel-amd64:
+ @grep -vP '^[\t\ ]*#' nfpm.yaml.skel | tr -s '\n' | sed 's/{%FJVER%}/${FJVER}/g;s/{%FJARCH%}/amd64/g;s/forge.$$/forge.\n/' > nfpm-amd64.yaml
+skel-arm-6:
+ @grep -vP '^[\t\ ]*#' nfpm.yaml.skel | tr -s '\n' | sed 's/{%FJVER%}/${FJVER}/g;s/{%FJARCH%}/arm-6/g;s/forge.$$/forge.\n/' > nfpm-arm-6.yaml
+skel-arm64:
+ @grep -vP '^[\t\ ]*#' nfpm.yaml.skel | tr -s '\n' | sed 's/{%FJVER%}/${FJVER}/g;s/{%FJARCH%}/arm64/g;s/forge.$$/forge.\n/' > nfpm-arm64.yaml
+
+build: build-deb build-rpm build-arch
+
+build-deb: build-deb-amd64 build-deb-arm-6 build-deb-arm64
+build-deb-amd64:
+ @mkdir -pv ./build
+ @nfpm pkg -f ./nfpm-amd64.yaml --packager deb --target ./build/
+build-deb-arm-6:
+ @mkdir -pv ./build
+ @nfpm pkg -f ./nfpm-arm-6.yaml --packager deb --target ./build/
+build-deb-arm64:
+ @mkdir -pv ./build
+ @nfpm pkg -f ./nfpm-arm64.yaml --packager deb --target ./build/
+
+build-rpm: build-rpm-amd64 build-rpm-arm-6 build-rpm-arm64
+build-rpm-amd64:
+ @mkdir -pv ./build
+ @nfpm pkg -f ./nfpm-amd64.yaml --packager rpm --target ./build/
+build-rpm-arm-6:
+ @mkdir -pv ./build
+ @nfpm pkg -f ./nfpm-arm-6.yaml --packager rpm --target ./build/
+build-rpm-arm64:
+ @mkdir -pv ./build
+ @nfpm pkg -f ./nfpm-arm64.yaml --packager rpm --target ./build/
+
+chglog:
+ @chglog init
+
+clean:
+ @rm -rv ./build