summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <egor@tensin.name>2026-09-28 13:56:40 +0500
committerEgor Tensin <egor@tensin.name>2026-09-28 13:56:40 +0500
commit22deece1d6065343d381c84276f1f5744e30a64d (patch)
tree916c242362f12335064e9952b6380907e54c1645
parentdebian: use `make install` (diff)
parentworkflows/ci: don't publish to AUR on Debian tags (diff)
downloadconfig-links-22deece1d6065343d381c84276f1f5744e30a64d.tar.gz
config-links-22deece1d6065343d381c84276f1f5744e30a64d.zip
Merge tag 'v2.1.6' into debian
v2.1.6
-rw-r--r--.github/workflows/ci.yml4
-rw-r--r--Makefile20
-rw-r--r--prelude.mk2
3 files changed, 24 insertions, 2 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index bf3671a..f70fc60 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -47,7 +47,9 @@ jobs:
- test_local
- test_docker
runs-on: ubuntu-latest
- if: startsWith(github.ref, 'refs/tags/')
+ if: |
+ startsWith(github.ref, 'refs/tags/')
+ && !startsWith(github.ref, 'refs/tags/debian/')
container:
image: archlinux:base-devel
steps:
diff --git a/Makefile b/Makefile
index fe20548..7a56499 100644
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,12 @@ include prelude.mk
.PHONY: DO
DO:
+PKG_NAME ?= config-links
+DESTDIR ?=
+
+$(eval $(call noexpand,PKG_NAME))
+$(eval $(call noexpand,DESTDIR))
+
.PHONY: all
all: test
@@ -22,3 +28,17 @@ test/docker/%: DO
# Keep the list repositories synced with the GitHub actions workflow.
.PHONY: test/docker
test/docker: test/docker/xenial test/docker/focal
+
+.PHONY: install
+install:
+ install -D -m 0644 -t '$(call escape,$(DESTDIR)/usr/share/$(PKG_NAME))' LICENSE.txt
+ install -D -m 0644 -t '$(call escape,$(DESTDIR)/usr/share/doc/$(PKG_NAME))' README.md
+
+ find bin -type f -exec install -D -m 0755 -t '$(call escape,$(DESTDIR)/usr/lib/$(PKG_NAME)/bin)' {} ';'
+ find lib -type f -exec install -D -m 0644 -t '$(call escape,$(DESTDIR)/usr/lib/$(PKG_NAME)/lib)' {} ';'
+
+ install -d '$(call escape,$(DESTDIR)/usr/bin)'
+ find '$(call escape,$(DESTDIR)/usr/lib/$(PKG_NAME)/bin)' -type f -printf '%P\0' | \
+ while IFS= read -d '' -r file; do \
+ ln -s -- '$(call escape,/usr/lib/$(PKG_NAME)/bin/)'"$$file" '$(call escape,$(DESTDIR)/usr/bin)' ; \
+ done
diff --git a/prelude.mk b/prelude.mk
index 374111e..da836d7 100644
--- a/prelude.mk
+++ b/prelude.mk
@@ -1,4 +1,4 @@
-# Please see https://egort.name/blog/notes/makefile.html
+# Please see https://tensin.name/blog/notes/makefile.html
MAKEFLAGS += --no-builtin-rules --no-builtin-variables --warn-undefined-variables
unexport MAKEFLAGS