mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-18 20:16:51 +02:00
42 lines
1.4 KiB
Text
42 lines
1.4 KiB
Text
# Contributor: Sean E. Russell <ser@ser1.net>
|
|
# Maintainer: Sean E. Russell <ser@ser1.net>
|
|
pkgname=makeclapman
|
|
pkgver=2.4.4
|
|
pkgrel=4
|
|
pkgdesc="makeclapman generates man page(s) from programs that use the Go Claptrap flags library."
|
|
url="https://hg.sr.ht/~ser/claphelp"
|
|
arch="all"
|
|
license="BSD-3-Clause"
|
|
options="net"
|
|
makedepends="go"
|
|
subpackages="$pkgname-doc"
|
|
source="$pkgname-$pkgver.tar.gz::https://hg.sr.ht/~ser/claphelp/archive/v$pkgver.tar.gz"
|
|
builddir="$srcdir/claphelp-v$pkgver"
|
|
_pkgdate=2024-12-13 # The tag date, for the manpage
|
|
|
|
build() {
|
|
go build -ldflags "-X main.Version=$pkgver" -v ./cmd/makeclapman
|
|
|
|
mkdir man1
|
|
CLAPTRAP_USAGE_JSON=true ./makeclapman | ./makeclapman -d man1 \
|
|
--version $pkgver \
|
|
--date $_pkgdate \
|
|
--author "Sean E. Russell" \
|
|
--description "makeclapman generates man page(s) from programs that use the Claptrap library. To use it, call the program with the environment variable CLAPTRAP_USAGE_JSON set and pipe the output to makeclapman. For example,
|
|
|
|
CLAPTRAP_USAGE_JSON=true yourprog | makeclapman"
|
|
}
|
|
|
|
check() {
|
|
[ "$(./makeclapman version)" = "$pkgver" ]
|
|
}
|
|
|
|
package() {
|
|
install -Dm755 makeclapman -t "$pkgdir"/usr/bin/
|
|
install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/"$pkgname"/
|
|
install -Dm644 man1/* -t "$pkgdir"/usr/share/man/man1/
|
|
}
|
|
|
|
sha512sums="
|
|
cde9044fe3ed3f33603224fbad1f3fdf7ee26d86698b64aacbd3fa09f83a58347bca741a5c64cb1cc4f611976154d464fdf34c190d27f9107bef9f6face8b2a8 makeclapman-2.4.4.tar.gz
|
|
"
|