From 79e4bcdd683f7b257a288ccc853185ec9c97ba86 Mon Sep 17 00:00:00 2001 From: hanez Date: Mon, 23 Nov 2026 13:06:31 +0100 Subject: [PATCH] Move OS packaging directories under os --- .gitignore | 29 ++++++++-------- Makefile | 34 ++++++++++++------- README.md | 12 +++---- {alpine => os/alpine}/APKBUILD | 4 +-- {alpine => os/alpine}/README.md | 0 {arch => os/arch}/PKGBUILD | 4 +-- {arch => os/arch}/README.md | 4 +-- {debian => os/debian}/README.md | 5 +-- {debian => os/debian}/changelog | 0 {debian => os/debian}/control | 0 {debian => os/debian}/copyright | 0 {debian => os/debian}/docs | 0 {debian => os/debian}/rules | 0 {debian => os/debian}/source/format | 0 {freebsd => os/freebsd}/README.md | 0 .../freebsd}/sysutils/murx/Makefile | 0 .../freebsd}/sysutils/murx/distinfo | 0 .../freebsd}/sysutils/murx/pkg-descr | 0 {gentoo => os/gentoo}/README.md | 0 {gentoo => os/gentoo}/app-misc/murx/Manifest | 0 .../gentoo}/app-misc/murx/murx-1.0.3.ebuild | 0 {openbsd => os/openbsd}/README.md | 0 .../openbsd}/sysutils/murx/Makefile | 0 .../openbsd}/sysutils/murx/distinfo | 0 .../openbsd}/sysutils/murx/pkg/DESCR | 0 .../openbsd}/sysutils/murx/pkg/PLIST | 0 26 files changed, 51 insertions(+), 41 deletions(-) rename {alpine => os/alpine}/APKBUILD (83%) rename {alpine => os/alpine}/README.md (100%) rename {arch => os/arch}/PKGBUILD (87%) rename {arch => os/arch}/README.md (84%) rename {debian => os/debian}/README.md (67%) rename {debian => os/debian}/changelog (100%) rename {debian => os/debian}/control (100%) rename {debian => os/debian}/copyright (100%) rename {debian => os/debian}/docs (100%) rename {debian => os/debian}/rules (100%) rename {debian => os/debian}/source/format (100%) rename {freebsd => os/freebsd}/README.md (100%) rename {freebsd => os/freebsd}/sysutils/murx/Makefile (100%) rename {freebsd => os/freebsd}/sysutils/murx/distinfo (100%) rename {freebsd => os/freebsd}/sysutils/murx/pkg-descr (100%) rename {gentoo => os/gentoo}/README.md (100%) rename {gentoo => os/gentoo}/app-misc/murx/Manifest (100%) rename {gentoo => os/gentoo}/app-misc/murx/murx-1.0.3.ebuild (100%) rename {openbsd => os/openbsd}/README.md (100%) rename {openbsd => os/openbsd}/sysutils/murx/Makefile (100%) rename {openbsd => os/openbsd}/sysutils/murx/distinfo (100%) rename {openbsd => os/openbsd}/sysutils/murx/pkg/DESCR (100%) rename {openbsd => os/openbsd}/sysutils/murx/pkg/PLIST (100%) diff --git a/.gitignore b/.gitignore index f88a524..e831ec5 100644 --- a/.gitignore +++ b/.gitignore @@ -4,12 +4,12 @@ src/ # Packages -/alpine/* -!/alpine/APKBUILD -!/alpine/README.md -/arch/* -!/arch/PKGBUILD -!/arch/README.md +/os/alpine/* +!/os/alpine/APKBUILD +!/os/alpine/README.md +/os/arch/* +!/os/arch/PKGBUILD +!/os/arch/README.md *.apk *.xz @@ -29,15 +29,16 @@ compile_commands.json .cache/ # Debian build outputs -/debian/.debhelper/ -/debian/debhelper-build-stamp -/debian/files -/debian/murx/ -/debian/*.debhelper.log -/debian/*.substvars +/debian +/os/debian/.debhelper/ +/os/debian/debhelper-build-stamp +/os/debian/files +/os/debian/murx/ +/os/debian/*.debhelper.log +/os/debian/*.substvars # FreeBSD port build outputs -/freebsd/sysutils/murx/work/ +/os/freebsd/sysutils/murx/work/ # OpenBSD port build outputs -/openbsd/sysutils/murx/w-*/ +/os/openbsd/sysutils/murx/w-*/ diff --git a/Makefile b/Makefile index 6fd84b6..6d29332 100644 --- a/Makefile +++ b/Makefile @@ -28,28 +28,36 @@ clean: rm -f murx pkgclean: - rm -f *.apk alpine/*.apk - rm -f *.xz arch/*.pkg.tar.* + rm -f *.apk os/alpine/*.apk + rm -f *.xz os/arch/*.pkg.tar.* pkgsources: - @for dir in alpine arch; do \ + @for dir in os/alpine os/arch; do \ for source in murx.c Makefile murx.1 LICENSE AUTHORS; do \ if [ ! -e "$$dir/$$source" ] && [ ! -L "$$dir/$$source" ]; then \ - ln -s "../$$source" "$$dir/$$source" || exit 1; \ + ln -s "../../$$source" "$$dir/$$source" || exit 1; \ fi; \ done; \ if [ ! -e "$$dir/MURX-README.md" ] && [ ! -L "$$dir/MURX-README.md" ]; then \ - ln -s ../README.md "$$dir/MURX-README.md" || exit 1; \ + ln -s ../../README.md "$$dir/MURX-README.md" || exit 1; \ fi; \ done pkgalpine: pkgclean pkgsources - cd alpine && abuild checksum - cd alpine && abuild -r + cd os/alpine && abuild checksum + cd os/alpine && abuild -r pkgarch: pkgclean pkgsources - cd arch && updpkgsums - cd arch && makepkg + cd os/arch && updpkgsums + cd os/arch && makepkg + +pkgdebian: + @if [ -e debian ] || [ -L debian ]; then \ + echo "debian already exists at the repository root" >&2; exit 1; \ + fi; \ + ln -s os/debian debian || exit 1; \ + trap 'unlink debian' 0; \ + dpkg-buildpackage -b -us -uc pkgsums: pkgsources @version=$$(sed -n 's/^#define MURX_VERSION "\([^"]*\)"$$/\1/p' murx.c); \ @@ -58,11 +66,11 @@ pkgsums: pkgsources fi; \ tmp=$$(mktemp .pkgsums.XXXXXX) || exit 1; \ trap 'rm -f "$$tmp"' 0; \ - for recipe in alpine/APKBUILD arch/PKGBUILD; do \ + for recipe in os/alpine/APKBUILD os/arch/PKGBUILD; do \ sed "s/^pkgver=.*/pkgver=$$version/" "$$recipe" > "$$tmp" && \ cat "$$tmp" > "$$recipe" || exit 1; \ done - cd alpine && abuild checksum - cd arch && updpkgsums + cd os/alpine && abuild checksum + cd os/arch && updpkgsums -.PHONY: all install uninstall clean pkgclean pkgsources pkgalpine pkgarch pkgsums +.PHONY: all install uninstall clean pkgclean pkgsources pkgalpine pkgarch pkgdebian pkgsums diff --git a/README.md b/README.md index 18f9b44..c81181f 100644 --- a/README.md +++ b/README.md @@ -445,12 +445,12 @@ that otherwise collapses pane grids to 1x1. ## Packages -- [Alpine Linux](alpine/README.md) -- [Arch Linux](arch/README.md) -- [Debian](debian/README.md) -- [Gentoo](gentoo/README.md) -- [FreeBSD](freebsd/README.md) -- [OpenBSD](openbsd/README.md) +- [Alpine Linux](os/alpine/README.md) +- [Arch Linux](os/arch/README.md) +- [Debian](os/debian/README.md) +- [Gentoo](os/gentoo/README.md) +- [FreeBSD](os/freebsd/README.md) +- [OpenBSD](os/openbsd/README.md) The Alpine and Arch recipes build from the local checkout. After changing packaged source files, run `make pkgsums` to sync their versions with diff --git a/alpine/APKBUILD b/os/alpine/APKBUILD similarity index 83% rename from alpine/APKBUILD rename to os/alpine/APKBUILD index 64b6f6a..9c329a8 100644 --- a/alpine/APKBUILD +++ b/os/alpine/APKBUILD @@ -27,9 +27,9 @@ package() { sha512sums=" 68c0e952a57d03e5c2cc6a7451cca1687341c20620634617529b6dc84f0fcdc7cb49cbc662bfad5b1fe3229c082a61480813ed5c01a1994c1b2a8e34bd421e29 murx.c -090b3755edac7de08fe7951f05808cb3f86f845a0a968b382c01f5c634a3ba82dbb8cd0a78d68409a2d3062608a668d40287fa7dd37953319abb31c6fdb812e1 Makefile +ac75bfe596fae665ba882a10f5d16551bdd02cd601b786364763ac74dbc651c386d3a464eb63e0344354b953611629135190633e3b8ff3a8ef0f0849d60a3f7b Makefile 219082e6277ee8c226cdd61a5b17d4e3c6893adf04b2f59ea84a6b6421dbd5a6d0ff38b93d8dd8ae41ed037e77252058dacadd5ff1f0c36c7c1ff95503e1e7a8 murx.1 -ae46b4ffcca738c9692746c678cd969b4de709e5a5a5306214242eb17c15e04b827fcb692d099387a27cbdffb71b9d2853d4ddffeb01257c22a445140dde610a MURX-README.md +1b98d82dc3c41c376827cfd3883ee8918f24e82eab138fbb0e62bc5c2b0ba9498eb3abe59dc96b3f3d67a20fbdb331ed113d1898297c4f3c904e6341364cfdc9 MURX-README.md 2fe33ba22c5f68e124904be594208f050be20f33d115f9a56f60cac93304102da32e6a7e78154e831d3704da7ca8bfefd7025e7b8901e65babcd83e7342f6382 LICENSE 4d32dba475e5f9818fcd008068b011cbae9fc4b8e29897c933775d6660f44a7992d08a1550320d83233af729a42b241ef1d182bf5983ef2f64deab76cab2260d AUTHORS " diff --git a/alpine/README.md b/os/alpine/README.md similarity index 100% rename from alpine/README.md rename to os/alpine/README.md diff --git a/arch/PKGBUILD b/os/arch/PKGBUILD similarity index 87% rename from arch/PKGBUILD rename to os/arch/PKGBUILD index 2061302..a036fb1 100644 --- a/arch/PKGBUILD +++ b/os/arch/PKGBUILD @@ -9,9 +9,9 @@ license=('Apache-2.0') depends=('glibc') source=('murx.c' 'Makefile' 'murx.1' 'MURX-README.md' 'LICENSE' 'AUTHORS') sha256sums=('358d39eed410a9657ef811892288ef407fe8f17709cb1b4b5e0405635594b70d' - '7fee28fdd2016230d02cc7fee8a4cc759083d8dbe3d82b42a7353f883dd1774c' + '78a9c19c212e8038422e1bb4bb96d9b25eb19ad1359489cd32edf9e1a76638b2' '953966bfdd0b49cb26c11220e1e2bf6b5862aaa1b2d0bf002cde9d276f0ae96b' - 'e2056cacb32df2fd2e49990d0db5900e777128792a55f382565b5b50da160b94' + '1a9c479723f74cdc3a2af6cf7a4ad52388681b11a5ba3f4cfb73d28af631e036' '31c5556be4cdd9bf52bb55f18ead0c68a4f0e793c2c2dab0a2a2c6d92407d0d4' 'dbc8a4fc569d4cd7bcd45516ccc98c1396fce0682c262103069c8f5150538cdb') diff --git a/arch/README.md b/os/arch/README.md similarity index 84% rename from arch/README.md rename to os/arch/README.md index 5b95891..b41eaed 100644 --- a/arch/README.md +++ b/os/arch/README.md @@ -8,7 +8,7 @@ make pkgarch ``` The target prepares local sources for [PKGBUILD](PKGBUILD), updates their -checksums, and runs `makepkg`. The package is written to `arch/` unless you +checksums, and runs `makepkg`. The package is written to `os/arch/` unless you configured a different `PKGDEST`. Install it with `pacman -U` and the package path. @@ -16,7 +16,7 @@ To build and install in one step, run these commands from the checkout root: ```sh make pkgsources -cd arch +cd os/arch updpkgsums makepkg -si ``` diff --git a/debian/README.md b/os/debian/README.md similarity index 67% rename from debian/README.md rename to os/debian/README.md index f53dbb8..142348b 100644 --- a/debian/README.md +++ b/os/debian/README.md @@ -4,10 +4,11 @@ Install `build-essential`, `dpkg-dev`, and `debhelper` with compatibility level 13 available. From the murx checkout root, run: ```sh -dpkg-buildpackage -b -us -uc +make pkgdebian ``` -This builds an unsigned binary package from the checkout. Find its version +The target temporarily links `os/debian` at the checkout root for +`dpkg-buildpackage` and builds an unsigned binary package. Find its version in the [Debian changelog](changelog). The `.deb` is written to the checkout's parent directory. Install the package with `apt install` and the path to the `.deb`. diff --git a/debian/changelog b/os/debian/changelog similarity index 100% rename from debian/changelog rename to os/debian/changelog diff --git a/debian/control b/os/debian/control similarity index 100% rename from debian/control rename to os/debian/control diff --git a/debian/copyright b/os/debian/copyright similarity index 100% rename from debian/copyright rename to os/debian/copyright diff --git a/debian/docs b/os/debian/docs similarity index 100% rename from debian/docs rename to os/debian/docs diff --git a/debian/rules b/os/debian/rules similarity index 100% rename from debian/rules rename to os/debian/rules diff --git a/debian/source/format b/os/debian/source/format similarity index 100% rename from debian/source/format rename to os/debian/source/format diff --git a/freebsd/README.md b/os/freebsd/README.md similarity index 100% rename from freebsd/README.md rename to os/freebsd/README.md diff --git a/freebsd/sysutils/murx/Makefile b/os/freebsd/sysutils/murx/Makefile similarity index 100% rename from freebsd/sysutils/murx/Makefile rename to os/freebsd/sysutils/murx/Makefile diff --git a/freebsd/sysutils/murx/distinfo b/os/freebsd/sysutils/murx/distinfo similarity index 100% rename from freebsd/sysutils/murx/distinfo rename to os/freebsd/sysutils/murx/distinfo diff --git a/freebsd/sysutils/murx/pkg-descr b/os/freebsd/sysutils/murx/pkg-descr similarity index 100% rename from freebsd/sysutils/murx/pkg-descr rename to os/freebsd/sysutils/murx/pkg-descr diff --git a/gentoo/README.md b/os/gentoo/README.md similarity index 100% rename from gentoo/README.md rename to os/gentoo/README.md diff --git a/gentoo/app-misc/murx/Manifest b/os/gentoo/app-misc/murx/Manifest similarity index 100% rename from gentoo/app-misc/murx/Manifest rename to os/gentoo/app-misc/murx/Manifest diff --git a/gentoo/app-misc/murx/murx-1.0.3.ebuild b/os/gentoo/app-misc/murx/murx-1.0.3.ebuild similarity index 100% rename from gentoo/app-misc/murx/murx-1.0.3.ebuild rename to os/gentoo/app-misc/murx/murx-1.0.3.ebuild diff --git a/openbsd/README.md b/os/openbsd/README.md similarity index 100% rename from openbsd/README.md rename to os/openbsd/README.md diff --git a/openbsd/sysutils/murx/Makefile b/os/openbsd/sysutils/murx/Makefile similarity index 100% rename from openbsd/sysutils/murx/Makefile rename to os/openbsd/sysutils/murx/Makefile diff --git a/openbsd/sysutils/murx/distinfo b/os/openbsd/sysutils/murx/distinfo similarity index 100% rename from openbsd/sysutils/murx/distinfo rename to os/openbsd/sysutils/murx/distinfo diff --git a/openbsd/sysutils/murx/pkg/DESCR b/os/openbsd/sysutils/murx/pkg/DESCR similarity index 100% rename from openbsd/sysutils/murx/pkg/DESCR rename to os/openbsd/sysutils/murx/pkg/DESCR diff --git a/openbsd/sysutils/murx/pkg/PLIST b/os/openbsd/sysutils/murx/pkg/PLIST similarity index 100% rename from openbsd/sysutils/murx/pkg/PLIST rename to os/openbsd/sysutils/murx/pkg/PLIST