summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2024-04-22 22:59:06 +0200
committerErich Eckner <git@eckner.net>2024-04-22 23:06:02 +0200
commita257d9b49a61b3be5f31cf369c06531b27f164ff (patch)
tree5ae4ac2a5371899fa19021fe4270390962f9c207
parent5c829149163c51c40313aaeb1532b996d5e783e5 (diff)
downloaddebian-packages-a257d9b49a61b3be5f31cf369c06531b27f164ff.tar.xz
auto-generate part of Makefile
-rw-r--r--.gitignore1
-rw-r--r--Makefile21
-rwxr-xr-xgen-mk6
3 files changed, 11 insertions, 17 deletions
diff --git a/.gitignore b/.gitignore
index a7c5342..3cffd13 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@
*.deb
*.buildinfo
*.changes
+download-and-build.mk
diff --git a/Makefile b/Makefile
index 35372e6..fb59cf7 100644
--- a/Makefile
+++ b/Makefile
@@ -1,20 +1,7 @@
-check-kernel_%-1.deb: check-kernel-%.tar.xz check-kernel.control
- ./build-it "$@"
-
-check-kernel-%.tar.xz:
- wget -nd "https://git.eckner.net/Erich/check-kernel/snapshot/$@"
-
-update-all_%-1.deb: update-all-%.tar.xz update-all.control
- ./build-it "$@"
-
-update-all-%.tar.xz:
- wget -nd "https://git.eckner.net/Erich/update-all/snapshot/$@"
-
-update-ddns_%-1.deb: update-ddns-%.tar.xz update-ddns.control
- ./build-it "$@"
-
-update-ddns-%.tar.xz:
- wget -nd "https://git.eckner.net/Erich/update-ddns/snapshot/$@"
+include download-and-build.mk
install:
reprepro --outdir ~/ecknernet includedeb stable *.deb
+
+download-and-build.mk: gen-mk
+ ./gen-mk > "$@"
diff --git a/gen-mk b/gen-mk
new file mode 100755
index 0000000..b249654
--- /dev/null
+++ b/gen-mk
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+for pkg in check-kernel update-all update-ddns; do
+ printf '%s_%%-1.deb: %s-%%.tar.xz %s.control\n\t./build-it "$@"\n\n' "$pkg" "$pkg" "$pkg"
+ printf '%s-%%.tar.xz:\n\twget -nd "https://git.eckner.net/Erich/%s/snapshot/$@"\n\n' "$pkg" "$pkg"
+done