From 1b0ee92e8a114daf1194caa46950a32f6518e9ea Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Mon, 28 Sep 2026 13:34:53 +0500 Subject: Makefile: add install: target --- Makefile | 20 ++++++++++++++++++++ prelude.mk | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) 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 -- cgit v1.3 From 3f64368493e84586691aa3e8d41b4786df63fdf5 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Mon, 28 Sep 2026 13:35:30 +0500 Subject: workflows/ci: don't publish to AUR on Debian tags --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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: -- cgit v1.3