diff --git a/.gitignore b/.gitignore index 4673c72..e831ec5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,15 @@ # Build files -murx +/murx *.o src/ # Packages +/os/alpine/* +!/os/alpine/APKBUILD +!/os/alpine/README.md +/os/arch/* +!/os/arch/PKGBUILD +!/os/arch/README.md *.apk *.xz @@ -21,3 +27,18 @@ src/ # Tooling compile_commands.json .cache/ + +# Debian build outputs +/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 +/os/freebsd/sysutils/murx/work/ + +# OpenBSD port build outputs +/os/openbsd/sysutils/murx/w-*/ diff --git a/Makefile b/Makefile index 44ec907..6d29332 100644 --- a/Makefile +++ b/Makefile @@ -28,29 +28,49 @@ clean: rm -f murx pkgclean: - rm -rf *.apk - rm -rf *.xz + rm -f *.apk os/alpine/*.apk + rm -f *.xz os/arch/*.pkg.tar.* -pkgalpine: pkgclean - abuild checksum - abuild -r +pkgsources: + @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; \ + fi; \ + done; \ + if [ ! -e "$$dir/MURX-README.md" ] && [ ! -L "$$dir/MURX-README.md" ]; then \ + ln -s ../../README.md "$$dir/MURX-README.md" || exit 1; \ + fi; \ + done -pkgarch: pkgclean - updpkgsums - makepkg +pkgalpine: pkgclean pkgsources + cd os/alpine && abuild checksum + cd os/alpine && abuild -r -pkgsums: +pkgarch: pkgclean pkgsources + 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); \ 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 os/alpine/APKBUILD os/arch/PKGBUILD; do \ sed "s/^pkgver=.*/pkgver=$$version/" "$$recipe" > "$$tmp" && \ cat "$$tmp" > "$$recipe" || exit 1; \ done - abuild checksum - updpkgsums + cd os/alpine && abuild checksum + cd os/arch && updpkgsums -.PHONY: all install uninstall clean pkgclean pkgalpine pkgarch pkgsums +.PHONY: all install uninstall clean pkgclean pkgsources pkgalpine pkgarch pkgdebian pkgsums diff --git a/README.md b/README.md index 093d0cc..c81181f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # murx -murx logo +![murx](murx.png) A deliberately small terminal multiplexer. One C file, no config file, no dependencies. @@ -328,7 +328,8 @@ scrollback, forced resize and kill server. `Configuration...` contains: titles. - `Reset display/status defaults`. -Settings changes apply immediately. Session settings affect all attached +Press Enter on a toggle to turn it on or off. Settings changes apply +immediately. Session settings affect all attached clients; the prefix is per-client. Nothing is written to disk, so changes last until the session ends or you change them again. The command-line options still decide the initial values when a session starts. @@ -442,41 +443,19 @@ automatically on the BSDs where it is needed). Tested with Clang and GCC 16; `grid_resize()` carries a guarded workaround for a GCC 16 optimizer bug that otherwise collapses pane grids to 1x1. -## Linux packages +## 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 -build with the default C compiler and pass distro `CFLAGS` to `make`. The -packages install under `/usr`, including the manual, README, AUTHORS and -license. +- [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) -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 -``` - -Install the resulting `murx` package and its `murx-doc` subpackage for the -manual. abuild writes packages beneath its configured repository destination -(normally `~/packages`); use `apk add /path/to/package.apk` for each signed -package after trusting your local signing key. - -On Arch, install `base-devel` and run as a regular user: - -```sh -makepkg -si -``` - -This builds the package and installs it through pacman. The recipe lists -`x86_64` and `aarch64`; builds run on the current architecture. - -After changing a packaged source file, run `make pkgsums` to sync both package -versions and refresh both sets of checksums. This target requires `abuild` -and `updpkgsums` (from `pacman-contrib`). Neither recipe -requires a test suite; its check step runs `murx --help` as a smoke check. +The Alpine and Arch recipes build from the local checkout. After changing +packaged source files, run `make pkgsums` to sync their versions with +`MURX_VERSION` in `murx.c` and refresh their checksums. This target requires +`abuild` and `updpkgsums` (from `pacman-contrib`). ## Authors diff --git a/RELEASES.md b/RELEASES.md index ef5af9e..7eb06ff 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1,3 +1,11 @@ +# murx 1.0.3 released + +**November 23, 2026** + +- Fixed the Configuration menu (`Ctrl-A m` → Configuration). Pressing Enter + now turns display settings on or off. Previously, an enabled setting could + not be turned off from its menu entry. + # murx 1.0.2 released **November 23, 2026** diff --git a/murx.c b/murx.c index 2fd8a6e..bb701db 100644 --- a/murx.c +++ b/murx.c @@ -87,7 +87,7 @@ #define MURX_NOIPA #endif -#define MURX_VERSION "1.0.2" +#define MURX_VERSION "1.0.3" #define DEFAULT_PREFIX 0x01 /* client -> server */ @@ -3502,27 +3502,28 @@ static void fit_session_to_client(Client *c, Session *s) { } static void menu_apply_setting(Client *c, Session *s, const MenuItem *it) { + int value = it->type == MI_TOGGLE ? !menu_setting_on(s, c, it) : it->arg; switch (it->id) { case SET_STATUS_BOTTOM: - s->status_bottom = it->arg ? 1 : 0; + s->status_bottom = value; session_layout(s); s->redraw = 1; break; case SET_STATUS_BG: - s->status_bg = it->arg == 1 ? (int32_t)RGB_FLAG : - it->arg == 2 ? (int32_t)(RGB_FLAG | 0x191a1c) : 0; + s->status_bg = value == 1 ? (int32_t)RGB_FLAG : + value == 2 ? (int32_t)(RGB_FLAG | 0x191a1c) : 0; s->redraw = 1; break; - case SET_SHOW_CWD: s->display.show_cwd = it->arg ? 1 : 0; break; - case SET_SHOW_CLOCK: s->display.show_clock = it->arg ? 1 : 0; break; - case SET_SHOW_MURX: s->display.show_murx = it->arg ? 1 : 0; break; - case SET_SHOW_HOSTNAME: s->display.show_hostname = it->arg ? 1 : 0; break; + case SET_SHOW_CWD: s->display.show_cwd = value; break; + case SET_SHOW_CLOCK: s->display.show_clock = value; break; + case SET_SHOW_MURX: s->display.show_murx = value; break; + case SET_SHOW_HOSTNAME: s->display.show_hostname = value; break; case SET_SHOW_PANE_TITLES: - s->display.show_pane_titles = it->arg ? 1 : 0; + s->display.show_pane_titles = value; session_layout(s); s->redraw = 1; break; - case SET_PREFIX: c->prefix = (unsigned char)it->arg; break; + case SET_PREFIX: c->prefix = (unsigned char)value; break; default: return; } /* Window names carry the hostname setting, so refresh them at once. */ diff --git a/APKBUILD b/os/alpine/APKBUILD similarity index 64% rename from APKBUILD rename to os/alpine/APKBUILD index 6805ec5..9c329a8 100644 --- a/APKBUILD +++ b/os/alpine/APKBUILD @@ -1,13 +1,13 @@ # Local source snapshot; refresh version and checksums with `make pkgsums`. pkgname=murx -pkgver=1.0.2 +pkgver=1.0.3 pkgrel=0 pkgdesc="Small persistent terminal multiplexer" url="https://codeberg.org/armin/murx" arch="all" license="Apache-2.0" subpackages="$pkgname-doc" -source="murx.c Makefile murx.1 README.md LICENSE AUTHORS" +source="murx.c Makefile murx.1 MURX-README.md LICENSE AUTHORS" builddir="$srcdir" build() { @@ -20,16 +20,16 @@ check() { package() { make DESTDIR="$pkgdir" PREFIX=/usr install - install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md" + install -Dm644 MURX-README.md "$pkgdir/usr/share/doc/$pkgname/README.md" install -Dm644 AUTHORS "$pkgdir/usr/share/doc/$pkgname/AUTHORS" install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" } sha512sums=" -275a6a517689726858f106f27a921aab726d21260b876ef7d228d62f38800dd549dbeccea680b1f9261b01dda1c72860bb147e95270d66a8aa08a7b3a2e9823e murx.c -ebce5c1268253d4dbf1cc1c7d6200c3bad97cba6361d8ff3c5d4563b670565a1a70d83d7bcb2dc0b1ca9fad9ca49d2ff8366b21ac73fb26cb7b46730d0acc425 Makefile +68c0e952a57d03e5c2cc6a7451cca1687341c20620634617529b6dc84f0fcdc7cb49cbc662bfad5b1fe3229c082a61480813ed5c01a1994c1b2a8e34bd421e29 murx.c +ac75bfe596fae665ba882a10f5d16551bdd02cd601b786364763ac74dbc651c386d3a464eb63e0344354b953611629135190633e3b8ff3a8ef0f0849d60a3f7b Makefile 219082e6277ee8c226cdd61a5b17d4e3c6893adf04b2f59ea84a6b6421dbd5a6d0ff38b93d8dd8ae41ed037e77252058dacadd5ff1f0c36c7c1ff95503e1e7a8 murx.1 -11c39781332eab62dc36125ed4b72df12208b73f3d9201a8a3f16b8b9c09f9e32069597f15160efd52d97609e7d322a09db7ce249361c0c84f7e22dc013e55d8 README.md +1b98d82dc3c41c376827cfd3883ee8918f24e82eab138fbb0e62bc5c2b0ba9498eb3abe59dc96b3f3d67a20fbdb331ed113d1898297c4f3c904e6341364cfdc9 MURX-README.md 2fe33ba22c5f68e124904be594208f050be20f33d115f9a56f60cac93304102da32e6a7e78154e831d3704da7ca8bfefd7025e7b8901e65babcd83e7342f6382 LICENSE 4d32dba475e5f9818fcd008068b011cbae9fc4b8e29897c933775d6660f44a7992d08a1550320d83233af729a42b241ef1d182bf5983ef2f64deab76cab2260d AUTHORS " diff --git a/os/alpine/README.md b/os/alpine/README.md new file mode 100644 index 0000000..78adbd9 --- /dev/null +++ b/os/alpine/README.md @@ -0,0 +1,18 @@ +# Build the Alpine packages + +Install `alpine-sdk` and configure abuild for your regular user. Generate and +install a signing key with `abuild-keygen -a -i` if you need one. + +From the murx checkout root, run: + +```sh +make pkgalpine +``` + +The target prepares local sources for [APKBUILD](APKBUILD), refreshes their +checksums, and invokes `abuild -r`. The packages are written to abuild's +configured repository destination, typically `~/packages`. + +Install the resulting `murx` and `murx-doc` APKs with `apk add` and their +respective file paths. Trust your local signing key first. The `murx-doc` +subpackage contains the manual. diff --git a/PKGBUILD b/os/arch/PKGBUILD similarity index 67% rename from PKGBUILD rename to os/arch/PKGBUILD index acee6bb..a036fb1 100644 --- a/PKGBUILD +++ b/os/arch/PKGBUILD @@ -1,17 +1,17 @@ # Local source snapshot; refresh version and checksums with `make pkgsums`. pkgname=murx -pkgver=1.0.2 +pkgver=1.0.3 pkgrel=1 pkgdesc='Small persistent terminal multiplexer' arch=('x86_64' 'aarch64') url='https://codeberg.org/armin/murx' license=('Apache-2.0') depends=('glibc') -source=('murx.c' 'Makefile' 'murx.1' 'README.md' 'LICENSE' 'AUTHORS') -sha256sums=('a13edd7ca2da2d431ecd9e8fa1a4cae0a6e99a6a074893df204a73e8b3b19fc0' - '4301fe8afe6a6e7cc665d8820ec43047f6af6f3b394a3a3a4f6e52dcf32fdec2' +source=('murx.c' 'Makefile' 'murx.1' 'MURX-README.md' 'LICENSE' 'AUTHORS') +sha256sums=('358d39eed410a9657ef811892288ef407fe8f17709cb1b4b5e0405635594b70d' + '78a9c19c212e8038422e1bb4bb96d9b25eb19ad1359489cd32edf9e1a76638b2' '953966bfdd0b49cb26c11220e1e2bf6b5862aaa1b2d0bf002cde9d276f0ae96b' - '6411f0a1129e0436fd2b86372ac58adb6336eb4b7eacff268650d5188626e8ff' + '1a9c479723f74cdc3a2af6cf7a4ad52388681b11a5ba3f4cfb73d28af631e036' '31c5556be4cdd9bf52bb55f18ead0c68a4f0e793c2c2dab0a2a2c6d92407d0d4' 'dbc8a4fc569d4cd7bcd45516ccc98c1396fce0682c262103069c8f5150538cdb') @@ -28,7 +28,7 @@ check() { package() { cd "$srcdir" make DESTDIR="$pkgdir" PREFIX=/usr install - install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md" + install -Dm644 MURX-README.md "$pkgdir/usr/share/doc/$pkgname/README.md" install -Dm644 AUTHORS "$pkgdir/usr/share/doc/$pkgname/AUTHORS" install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" } diff --git a/os/arch/README.md b/os/arch/README.md new file mode 100644 index 0000000..b41eaed --- /dev/null +++ b/os/arch/README.md @@ -0,0 +1,24 @@ +# Build the Arch Linux package + +Install `base-devel` and `pacman-contrib`. As a regular user, run this from +the murx checkout root: + +```sh +make pkgarch +``` + +The target prepares local sources for [PKGBUILD](PKGBUILD), updates their +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. + +To build and install in one step, run these commands from the checkout root: + +```sh +make pkgsources +cd os/arch +updpkgsums +makepkg -si +``` + +The recipe supports x86_64 and aarch64. diff --git a/os/debian/README.md b/os/debian/README.md new file mode 100644 index 0000000..142348b --- /dev/null +++ b/os/debian/README.md @@ -0,0 +1,14 @@ +# Build the Debian package + +Install `build-essential`, `dpkg-dev`, and `debhelper` with compatibility +level 13 available. From the murx checkout root, run: + +```sh +make pkgdebian +``` + +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/os/debian/changelog b/os/debian/changelog new file mode 100644 index 0000000..4ee4e82 --- /dev/null +++ b/os/debian/changelog @@ -0,0 +1,5 @@ +murx (1.0.3-1) unstable; urgency=medium + + * Add Debian packaging for murx 1.0.3. + + -- Johannes Findeisen Mon, 23 Nov 2026 12:00:00 +0100 diff --git a/os/debian/control b/os/debian/control new file mode 100644 index 0000000..3b10df3 --- /dev/null +++ b/os/debian/control @@ -0,0 +1,16 @@ +Source: murx +Section: utils +Priority: optional +Maintainer: Johannes Findeisen +Build-Depends: debhelper-compat (= 13) +Standards-Version: 4.7.0 +Rules-Requires-Root: no +Homepage: https://codeberg.org/armin/murx + +Package: murx +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: small persistent terminal multiplexer + murx runs shells and terminal applications in named sessions with windows + and split panes. Sessions keep running when clients detach, and several + clients can attach to the same session. diff --git a/os/debian/copyright b/os/debian/copyright new file mode 100644 index 0000000..f3f9fa7 --- /dev/null +++ b/os/debian/copyright @@ -0,0 +1,15 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: murx +Source: https://codeberg.org/armin/murx + +Files: * +Copyright: 2026 Armin Jenewein +License: Apache-2.0 + +Files: debian/* +Copyright: 2026 Johannes Findeisen +License: Apache-2.0 + +License: Apache-2.0 + On Debian systems, the full text of the Apache License, Version 2.0 + is available at /usr/share/common-licenses/Apache-2.0. diff --git a/os/debian/docs b/os/debian/docs new file mode 100644 index 0000000..dc9a571 --- /dev/null +++ b/os/debian/docs @@ -0,0 +1,3 @@ +README.md +AUTHORS +RELEASES.md diff --git a/os/debian/rules b/os/debian/rules new file mode 100755 index 0000000..1d3cb05 --- /dev/null +++ b/os/debian/rules @@ -0,0 +1,10 @@ +#!/usr/bin/make -f + +%: + dh $@ + +override_dh_auto_test: + ./murx --help >/dev/null + +override_dh_auto_install: + $(MAKE) DESTDIR="$(CURDIR)/debian/murx" PREFIX=/usr install diff --git a/os/debian/source/format b/os/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/os/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/os/freebsd/README.md b/os/freebsd/README.md new file mode 100644 index 0000000..5b1280b --- /dev/null +++ b/os/freebsd/README.md @@ -0,0 +1,14 @@ +# Build the FreeBSD package + +Copy the [`sysutils/murx` port](sysutils/murx/) into the `sysutils` category +of a FreeBSD ports tree. From the copied port directory, run: + +```sh +make package +``` + +The ports framework fetches the tagged source archive, verifies its checksum, +and builds the package. Install the resulting package with `pkg add` and the package path. + +To package a new release, update `DISTVERSION` in the port Makefile and run +`make makesum` after publishing the matching tag. diff --git a/os/freebsd/sysutils/murx/Makefile b/os/freebsd/sysutils/murx/Makefile new file mode 100644 index 0000000..9c56547 --- /dev/null +++ b/os/freebsd/sysutils/murx/Makefile @@ -0,0 +1,28 @@ +PORTNAME= murx +DISTVERSION= 1.0.3 +CATEGORIES= sysutils +MASTER_SITES= https://xw3.org/murx/murx/archive/ + +MAINTAINER= you@hanez.org +COMMENT= Small persistent terminal multiplexer +WWW= https://codeberg.org/armin/murx + +LICENSE= APACHE20 +LICENSE_FILE= ${WRKSRC}/LICENSE + +WRKSRC= ${WRKDIR}/murx +MAKE_ARGS= PREFIX="${PREFIX}" MANDIR="${PREFIX}/share/man" + +PLIST_FILES= bin/murx share/man/man1/murx.1.gz +PORTDOCS= AUTHORS README.md RELEASES.md + +OPTIONS_DEFINE= DOCS + +post-install: + ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/murx + +post-install-DOCS-on: + ${MKDIR} ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR} + +.include diff --git a/os/freebsd/sysutils/murx/distinfo b/os/freebsd/sysutils/murx/distinfo new file mode 100644 index 0000000..da157cf --- /dev/null +++ b/os/freebsd/sysutils/murx/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1795431600 +SHA256 (murx-1.0.3.tar.gz) = b1b291e715fe02e3a95047d9ef16f35a00f8d92127d20b87e5690eac4ec910c3 +SIZE (murx-1.0.3.tar.gz) = 564342 diff --git a/os/freebsd/sysutils/murx/pkg-descr b/os/freebsd/sysutils/murx/pkg-descr new file mode 100644 index 0000000..0906991 --- /dev/null +++ b/os/freebsd/sysutils/murx/pkg-descr @@ -0,0 +1,3 @@ +murx is a small terminal multiplexer with persistent named sessions, +windows, split panes, scrollback, and support for multiple clients +attached to a session. It has built-in defaults and no configuration file. diff --git a/os/gentoo/README.md b/os/gentoo/README.md new file mode 100644 index 0000000..7efb414 --- /dev/null +++ b/os/gentoo/README.md @@ -0,0 +1,16 @@ +# Build the Gentoo package + +Copy the [`app-misc/murx` directory](app-misc/murx/) into a configured local +Portage overlay. Keep the ebuild and Manifest together. The ebuild fetches and +verifies the tagged release archive and builds it from source. + +On an amd64 system using stable keywords, add `app-misc/murx ~amd64` to +`/etc/portage/package.accept_keywords` or a file in that directory. Then run: + +```sh +emerge --ask app-misc/murx +``` + +To prepare a new package version, copy the ebuild to a filename with the new +version and run `ebuild murx-VERSION.ebuild manifest` from the package +directory after publishing the matching tag. diff --git a/os/gentoo/app-misc/murx/Manifest b/os/gentoo/app-misc/murx/Manifest new file mode 100644 index 0000000..4fbbe01 --- /dev/null +++ b/os/gentoo/app-misc/murx/Manifest @@ -0,0 +1 @@ +DIST murx-1.0.3.tar.gz 564342 BLAKE2B 7132cff9c517537fd1bd2b0aeedb0c90a274810d31515b941f5a63288790b299aa24744134afd1c2b4c9f0439077fb1262626115535338fcfc5182f65a8308af SHA512 658dadaafac4561a87dc7be1a6c094cc06eca9ea44f8c756ac7e913841c4ebe13d00da5f4ff415fa96b4b91f171e567b2c18d8ad2f735746644fd9c344643b28 diff --git a/os/gentoo/app-misc/murx/murx-1.0.3.ebuild b/os/gentoo/app-misc/murx/murx-1.0.3.ebuild new file mode 100644 index 0000000..ec1a48f --- /dev/null +++ b/os/gentoo/app-misc/murx/murx-1.0.3.ebuild @@ -0,0 +1,29 @@ +EAPI=8 + +inherit toolchain-funcs + +DESCRIPTION="Small persistent terminal multiplexer" +HOMEPAGE="https://xw3.org/murx/murx" +SRC_URI="https://xw3.org/murx/murx/archive/${P}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/${PN}" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" + +DOCS=( README.md AUTHORS RELEASES.md ) + +src_compile() { + tc-export CC + emake +} + +src_test() { + ./murx --help >/dev/null || die "murx --help failed" + [[ $(./murx --version) == "${PN} ${PV}" ]] || die "Unexpected murx version" +} + +src_install() { + emake DESTDIR="${D}" PREFIX=/usr install + einstalldocs +} diff --git a/os/openbsd/README.md b/os/openbsd/README.md new file mode 100644 index 0000000..3624791 --- /dev/null +++ b/os/openbsd/README.md @@ -0,0 +1,14 @@ +# Build the OpenBSD package + +Copy the [`sysutils/murx` port](sysutils/murx/) into the `sysutils` category +of a OpenBSD ports tree. From the copied port directory, run: + +```sh +make package +``` + +The ports framework fetches the tagged source archive, verifies its checksum, +and builds the package. Run `make install` from the port directory to install it through the ports tree. + +To package a new release, update `DISTNAME` in the port Makefile and run +`make makesum` after publishing the matching tag. diff --git a/os/openbsd/sysutils/murx/Makefile b/os/openbsd/sysutils/murx/Makefile new file mode 100644 index 0000000..4d342b6 --- /dev/null +++ b/os/openbsd/sysutils/murx/Makefile @@ -0,0 +1,31 @@ +COMMENT = small persistent terminal multiplexer + +DISTNAME = murx-1.0.3 +CATEGORIES = sysutils +HOMEPAGE = https://codeberg.org/armin/murx +MAINTAINER = Johannes Findeisen + +# Apache-2.0 +PERMIT_PACKAGE = Yes + +WANTLIB += c util + +SITES = https://xw3.org/murx/murx/archive/ +WRKDIST = ${WRKDIR}/murx + +MAKE_FLAGS = CC="${CC}" CFLAGS="${CFLAGS} -std=c99 -Wall -Wextra" \ + LDFLAGS="${LDFLAGS}" + +do-test: + ${WRKSRC}/murx --help >/dev/null + +do-install: + ${INSTALL_PROGRAM_DIR} ${PREFIX}/bin + ${INSTALL_MAN_DIR} ${PREFIX}/man/man1 + ${INSTALL_PROGRAM} ${WRKSRC}/murx ${PREFIX}/bin/ + ${INSTALL_MAN} ${WRKSRC}/murx.1 ${PREFIX}/man/man1/ + ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/murx + ${INSTALL_DATA} ${WRKSRC}/AUTHORS ${WRKSRC}/README.md \ + ${WRKSRC}/RELEASES.md ${PREFIX}/share/doc/murx/ + +.include diff --git a/os/openbsd/sysutils/murx/distinfo b/os/openbsd/sysutils/murx/distinfo new file mode 100644 index 0000000..c25dba7 --- /dev/null +++ b/os/openbsd/sysutils/murx/distinfo @@ -0,0 +1,2 @@ +SHA256 (murx-1.0.3.tar.gz) = sbKR5xX+AuOpUEfZ7xbzWgD42SEn0guH5WkOrE7JEMM= +SIZE (murx-1.0.3.tar.gz) = 564342 diff --git a/os/openbsd/sysutils/murx/pkg/DESCR b/os/openbsd/sysutils/murx/pkg/DESCR new file mode 100644 index 0000000..0906991 --- /dev/null +++ b/os/openbsd/sysutils/murx/pkg/DESCR @@ -0,0 +1,3 @@ +murx is a small terminal multiplexer with persistent named sessions, +windows, split panes, scrollback, and support for multiple clients +attached to a session. It has built-in defaults and no configuration file. diff --git a/os/openbsd/sysutils/murx/pkg/PLIST b/os/openbsd/sysutils/murx/pkg/PLIST new file mode 100644 index 0000000..80aa733 --- /dev/null +++ b/os/openbsd/sysutils/murx/pkg/PLIST @@ -0,0 +1,6 @@ +@bin bin/murx +@man man/man1/murx.1 +share/doc/murx/ +share/doc/murx/AUTHORS +share/doc/murx/README.md +share/doc/murx/RELEASES.md