Added APKBUILD for Alpine and PKGBUILD for Arch.
This commit is contained in:
parent
b798878012
commit
082284e34b
5 changed files with 106 additions and 1 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -2,6 +2,10 @@
|
||||||
moerx
|
moerx
|
||||||
*.o
|
*.o
|
||||||
|
|
||||||
|
# Packages
|
||||||
|
*.apk
|
||||||
|
*.xz
|
||||||
|
|
||||||
# Debug symbols (macOS)
|
# Debug symbols (macOS)
|
||||||
/*.dSYM/
|
/*.dSYM/
|
||||||
|
|
||||||
|
|
|
||||||
33
APKBUILD
Normal file
33
APKBUILD
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
# Local source snapshot; refresh checksums with `abuild checksum` after edits.
|
||||||
|
pkgname=moerx
|
||||||
|
pkgver=0.20261116
|
||||||
|
pkgrel=0
|
||||||
|
pkgdesc="Small persistent terminal multiplexer"
|
||||||
|
url="https://codeberg.org/armin/moerx"
|
||||||
|
arch="all"
|
||||||
|
license="Apache-2.0"
|
||||||
|
subpackages="$pkgname-doc"
|
||||||
|
source="moerx.c Makefile moerx.1 README.md LICENSE"
|
||||||
|
builddir="$srcdir"
|
||||||
|
|
||||||
|
build() {
|
||||||
|
make CC="${CC:-cc}" CFLAGS="$CFLAGS -std=c99 -Wall -Wextra"
|
||||||
|
}
|
||||||
|
|
||||||
|
check() {
|
||||||
|
./moerx --help >/dev/null
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
make DESTDIR="$pkgdir" PREFIX=/usr install
|
||||||
|
install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
|
||||||
|
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||||
|
}
|
||||||
|
|
||||||
|
sha512sums="
|
||||||
|
8b55a60e15cb35fa766fb890f09f3dd1d2955f244d64ddce1dff21f0e84c9bf515f87839ae88ca437c144117eaefc15607e8fdf1d4dfe7c83afd8cb050704404 moerx.c
|
||||||
|
e6336e712a9a6071b16cbde83cd6f591c480da68cf5185f0db27f321b26adb075844a958e792da419dcb82a930de6cff28bc64a98e9b0facd9350e382aa95ce1 Makefile
|
||||||
|
56e641534bc68b48a70d7be8337df8a191c5a2a1bafee12dc6d9ac401d107cb6b8cf8138bcc6d4f74d373689e1bb8f2ac298a87043a95f0383d6163dfc363116 moerx.1
|
||||||
|
63f842b7ee65c7bfd3feceeb27a0199f44f3e741a399ee6f59e5c78cfdde951cce88b6f368abd451d4c2efd76b6cda97be15450743031d590fc22020268fd6af README.md
|
||||||
|
2fe33ba22c5f68e124904be594208f050be20f33d115f9a56f60cac93304102da32e6a7e78154e831d3704da7ca8bfefd7025e7b8901e65babcd83e7342f6382 LICENSE
|
||||||
|
"
|
||||||
2
Makefile
2
Makefile
|
|
@ -8,7 +8,7 @@ MANDIR ?= $(PREFIX)/share/man
|
||||||
all: moerx
|
all: moerx
|
||||||
|
|
||||||
moerx: moerx.c
|
moerx: moerx.c
|
||||||
$(CC) $(CFLAGS) -o $@ moerx.c
|
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ moerx.c $(LDLIBS)
|
||||||
|
|
||||||
install: moerx moerx.1
|
install: moerx moerx.1
|
||||||
install -d "$(DESTDIR)$(BINDIR)" "$(DESTDIR)$(MANDIR)/man1"
|
install -d "$(DESTDIR)$(BINDIR)" "$(DESTDIR)$(MANDIR)/man1"
|
||||||
|
|
|
||||||
34
PKGBUILD
Normal file
34
PKGBUILD
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
# Local source snapshot; refresh checksums with `updpkgsums` after edits.
|
||||||
|
pkgname=moerx
|
||||||
|
pkgver=0.20261116
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc='Small persistent terminal multiplexer'
|
||||||
|
arch=('x86_64' 'aarch64')
|
||||||
|
url='https://codeberg.org/armin/moerx'
|
||||||
|
license=('Apache-2.0')
|
||||||
|
depends=('glibc')
|
||||||
|
source=('moerx.c' 'Makefile' 'moerx.1' 'README.md' 'LICENSE')
|
||||||
|
sha256sums=(
|
||||||
|
'58b815779cc50ff0aeb41909d611309d1084b6c335dc35a54e79656e3d45cd51'
|
||||||
|
'ad08bd0acd671f1f1716250528c2d4e5acc78a83bf55fcebdf41fa101fbb71d5'
|
||||||
|
'56ef9511287758cd32e3c5cf777d7b9d99c470e1cf6570f1a94dcfd2f649b3e6'
|
||||||
|
'4a4d3158fb5288b93bcfd0ceec76b6b4d83fdb683e2a2a05afa63a0804ba9311'
|
||||||
|
'31c5556be4cdd9bf52bb55f18ead0c68a4f0e793c2c2dab0a2a2c6d92407d0d4'
|
||||||
|
)
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd "$srcdir"
|
||||||
|
make CC="${CC:-cc}" CFLAGS="$CFLAGS -std=c99 -Wall -Wextra"
|
||||||
|
}
|
||||||
|
|
||||||
|
check() {
|
||||||
|
cd "$srcdir"
|
||||||
|
./moerx --help >/dev/null
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd "$srcdir"
|
||||||
|
make DESTDIR="$pkgdir" PREFIX=/usr install
|
||||||
|
install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
|
||||||
|
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||||
|
}
|
||||||
34
README.md
34
README.md
|
|
@ -309,6 +309,40 @@ This is "very basic" by design:
|
||||||
Requires a C99 compiler and POSIX. Tested on macOS with clang; the code also
|
Requires a C99 compiler and POSIX. Tested on macOS with clang; the code also
|
||||||
builds with gcc on Linux and with clang on FreeBSD.
|
builds with gcc on Linux and with clang on FreeBSD.
|
||||||
|
|
||||||
|
## 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. Version `0.20261116` identifies an unreleased
|
||||||
|
snapshot; update the version and release fields when packaging a newer snapshot.
|
||||||
|
The packages install under `/usr`, including the manual, README and license.
|
||||||
|
|
||||||
|
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 `moerx` package and its `moerx-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 any packaged source file (`moerx.c`, `Makefile`, `moerx.1`,
|
||||||
|
`README.md` or `LICENSE`), refresh recipe checksums with `abuild checksum`
|
||||||
|
on Alpine and `updpkgsums` (from `pacman-contrib`) on Arch. Neither recipe
|
||||||
|
requires a test suite; its check step runs `moerx --help` as a smoke check.
|
||||||
|
|
||||||
## Authors
|
## Authors
|
||||||
|
|
||||||
- Armin Jenewein - <a@bsd.pm> - Founder
|
- Armin Jenewein - <a@bsd.pm> - Founder
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue