From 3c756ae46b74526eca8c47e367bc54929118d02a Mon Sep 17 00:00:00 2001 From: hanez Date: Mon, 23 Nov 2026 12:26:37 +0100 Subject: [PATCH] Move Arch and Alpine package recipes into subdirectories --- .gitignore | 4 ++++ Makefile | 35 ++++++++++++++++++++++------------- README.md | 15 +++++++++------ APKBUILD => alpine/APKBUILD | 4 ++-- PKGBUILD => arch/PKGBUILD | 4 ++-- 5 files changed, 39 insertions(+), 23 deletions(-) rename APKBUILD => alpine/APKBUILD (83%) rename PKGBUILD => arch/PKGBUILD (87%) diff --git a/.gitignore b/.gitignore index e31a02b..7757a94 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,10 @@ src/ # Packages +/alpine/* +!/alpine/APKBUILD +/arch/* +!/arch/PKGBUILD *.apk *.xz diff --git a/Makefile b/Makefile index 44ec907..b239b57 100644 --- a/Makefile +++ b/Makefile @@ -28,29 +28,38 @@ clean: rm -f murx pkgclean: - rm -rf *.apk - rm -rf *.xz + rm -f *.apk alpine/*.apk + rm -f *.xz arch/*.pkg.tar.* -pkgalpine: pkgclean - abuild checksum - abuild -r +pkgsources: + @for dir in alpine arch; do \ + for source in murx.c Makefile murx.1 README.md LICENSE AUTHORS; do \ + if [ ! -e "$$dir/$$source" ] && [ ! -L "$$dir/$$source" ]; then \ + ln -s "../$$source" "$$dir/$$source" || exit 1; \ + fi; \ + done; \ + done -pkgarch: pkgclean - updpkgsums - makepkg +pkgalpine: pkgclean pkgsources + cd alpine && abuild checksum + cd alpine && abuild -r -pkgsums: +pkgarch: pkgclean pkgsources + cd arch && updpkgsums + cd arch && makepkg + +pkgsums: pkgsources @version=$$(sed -n 's/^#define MURX_VERSION "\([^"]*\)"$$/\1/p' murx.c); \ if [ -z "$$version" ]; then \ echo "Could not read MURX_VERSION from murx.c" >&2; exit 1; \ fi; \ tmp=$$(mktemp .pkgsums.XXXXXX) || exit 1; \ trap 'rm -f "$$tmp"' 0; \ - for recipe in APKBUILD PKGBUILD; do \ + for recipe in alpine/APKBUILD arch/PKGBUILD; do \ sed "s/^pkgver=.*/pkgver=$$version/" "$$recipe" > "$$tmp" && \ cat "$$tmp" > "$$recipe" || exit 1; \ done - abuild checksum - updpkgsums + cd alpine && abuild checksum + cd arch && updpkgsums -.PHONY: all install uninstall clean pkgclean pkgalpine pkgarch pkgsums +.PHONY: all install uninstall clean pkgclean pkgsources pkgalpine pkgarch pkgsums diff --git a/README.md b/README.md index ca32a0c..7131ff1 100644 --- a/README.md +++ b/README.md @@ -445,10 +445,10 @@ that otherwise collapses pane grids to 1x1. ## Linux packages -The root directory includes [APKBUILD](APKBUILD) for Alpine Linux and -[PKGBUILD](PKGBUILD) for Arch Linux. Both build the local source files rather -than downloading a release. The package version comes from `MURX_VERSION` in -`murx.c`; adjust the package release fields separately as needed. Both recipes +The [Alpine recipe](alpine/APKBUILD) and [Arch recipe](arch/PKGBUILD) +build from the local checkout using symlinks to the source files. The package +version comes from `MURX_VERSION` in `murx.c`. Adjust the package release fields +separately as needed. Both recipes build with the default C compiler and pass distro `CFLAGS` to `make`. The packages install under `/usr`, including the manual, README, AUTHORS and license. @@ -457,7 +457,7 @@ On Alpine, install `alpine-sdk`, configure your abuild signing key with `abuild-keygen -a -i`, and run as a regular user with abuild configured: ```sh -abuild -r +make pkgalpine ``` Install the resulting `murx` package and its `murx-doc` subpackage for the @@ -468,10 +468,13 @@ package after trusting your local signing key. On Arch, install `base-devel` and run as a regular user: ```sh +make pkgsources +cd arch makepkg -si ``` -This builds the package and installs it through pacman. The recipe lists +This builds the package and installs it through pacman. To build from the +repository root, run `make pkgarch`. The recipe lists `x86_64` and `aarch64`; builds run on the current architecture. For Gentoo, copy the [`app-misc/murx` package directory](gentoo/app-misc/murx) diff --git a/APKBUILD b/alpine/APKBUILD similarity index 83% rename from APKBUILD rename to alpine/APKBUILD index d8c8cc5..ffdc049 100644 --- a/APKBUILD +++ b/alpine/APKBUILD @@ -27,9 +27,9 @@ package() { sha512sums=" 68c0e952a57d03e5c2cc6a7451cca1687341c20620634617529b6dc84f0fcdc7cb49cbc662bfad5b1fe3229c082a61480813ed5c01a1994c1b2a8e34bd421e29 murx.c -ebce5c1268253d4dbf1cc1c7d6200c3bad97cba6361d8ff3c5d4563b670565a1a70d83d7bcb2dc0b1ca9fad9ca49d2ff8366b21ac73fb26cb7b46730d0acc425 Makefile +10a353b8447ff969fa55c5445b61604471c5e7ca1e8e632e05c0f77cb01d876b9c0a260ddb1e5a9a6d880a47f725c22a1279ea8a8e38d3b08c384ded592dc837 Makefile 219082e6277ee8c226cdd61a5b17d4e3c6893adf04b2f59ea84a6b6421dbd5a6d0ff38b93d8dd8ae41ed037e77252058dacadd5ff1f0c36c7c1ff95503e1e7a8 murx.1 -8353d847c8d49c3f74956f17612528c1d20b20e7f981f352a2ca601ce93222c99ef3e0c034e14648df1a466376148cb1f06d3078f3a98bc1a9a00f0e3aa71c02 README.md +7284e0a57c11cd7b6cbc1569b95974bc87a81018d6184b6decc2b9c2b6d005cca1a407a48141687d2f2bba83c72f57e159ccd9d0c8be00e2846437c1b49a0d39 README.md 2fe33ba22c5f68e124904be594208f050be20f33d115f9a56f60cac93304102da32e6a7e78154e831d3704da7ca8bfefd7025e7b8901e65babcd83e7342f6382 LICENSE 4d32dba475e5f9818fcd008068b011cbae9fc4b8e29897c933775d6660f44a7992d08a1550320d83233af729a42b241ef1d182bf5983ef2f64deab76cab2260d AUTHORS " diff --git a/PKGBUILD b/arch/PKGBUILD similarity index 87% rename from PKGBUILD rename to arch/PKGBUILD index ff5f9a8..8b49400 100644 --- a/PKGBUILD +++ b/arch/PKGBUILD @@ -9,9 +9,9 @@ license=('Apache-2.0') depends=('glibc') source=('murx.c' 'Makefile' 'murx.1' 'README.md' 'LICENSE' 'AUTHORS') sha256sums=('358d39eed410a9657ef811892288ef407fe8f17709cb1b4b5e0405635594b70d' - '4301fe8afe6a6e7cc665d8820ec43047f6af6f3b394a3a3a4f6e52dcf32fdec2' + 'ee889dd531e7a3632032815a21ab26012a6ea882b50b56f86230bb3b9d9e5cad' '953966bfdd0b49cb26c11220e1e2bf6b5862aaa1b2d0bf002cde9d276f0ae96b' - 'a9231e00964b19553032f531832fa532f231dcedf3d6c7c0e52a1e2761bfd6c7' + '0f28defaaa7b03fd24dc87aa53a1f3c1a9ea86ec27c7e3c688248220285879b1' '31c5556be4cdd9bf52bb55f18ead0c68a4f0e793c2c2dab0a2a2c6d92407d0d4' 'dbc8a4fc569d4cd7bcd45516ccc98c1396fce0682c262103069c8f5150538cdb')