Skip to content

Instantly share code, notes, and snippets.

@kseistrup
Created January 4, 2023 08:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kseistrup/c00111f868ee68c3cabd2ac497fa0727 to your computer and use it in GitHub Desktop.
Save kseistrup/c00111f868ee68c3cabd2ac497fa0727 to your computer and use it in GitHub Desktop.
PKGBUILD for moar 1.11.3-1
# Maintainer: Jameson Pugh <imntreal@gmail.com>
# Contributor: Klaus Alexander Seistrup <klaus@seistrup.dk>
# -*- sh -*-
pkgname=moar
pkgver=1.11.3
pkgrel=1
pkgdesc="A pager designed to just do the right thing without any configuration."
arch=(x86_64)
url='https://github.com/walles/moar'
license=(BSD)
makedepends=(go)
options=(!lto)
optdepends=(highlight)
checkdepends=(highlight)
source=("https://github.com/walles/moar/archive/refs/tags/v${pkgver}.tar.gz")
prepare() {
cd "${srcdir}/${pkgname}-${pkgver}"
go mod tidy
}
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
go build \
-trimpath \
-buildmode=pie \
-mod=readonly \
-modcacherw \
-ldflags "-linkmode external -extldflags \"${LDFLAGS}\" -X main.versionString=${pkgver}" \
-o "${pkgname}"
}
check() {
cd "${srcdir}/${pkgname}-${pkgver}"
go test github.com/walles/moar/m
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
install -Dm0755 moar "${pkgdir}/usr/bin/moar"
install -Dm0644 moar.1 "${pkgdir}/usr/share/man/man1/moar.1"
install -Dm0644 README.md "${pkgdir}/usr/share/doc/$pkgname/README.md"
install -Dm0644 LICENSE "${pkgdir}/usr/share/licenses/$pkgname/LICENSE"
}
sha256sums=(
'78a63a16c6370270aaf4c2d5e606aa05d738950b4c73922e2169b4cefc7ab760'
)
sha512sums=(
'2367dd81bea3ff20c782aa7b73a70ca2ff54d57164bbcf5e318bca3769adddc8c41c3092cee5bf9c02816c68d4f65200c118e17014ae37ed63b1436dde64688c'
)
b2sums=(
'48cc596af11b1163a6ca6cc766670ec917fae4f7232c295e6d87f074ce3c87dd3f06ac440af4d5bedc2735a2d2fe634df2d9f5db8ad05399f470d99c406a7beb'
)
# eof
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment