jobextra/lowdown/PKGBUILD

67 lines
1.5 KiB
Bash

#!/usr/bin/bash
# JOBoRun : Jwm OpenBox Obarun RUNit
# Maintainer : Joe Bo Run <joborun@disroot.org>
# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobextra/$pkgname"
# Website : https://pozol.eu
#-----------------------------------------| DESCRIPTION |---------------------------------------
pkgname=lowdown
pkgdesc="A simple Markdown translator"
pkgver=1.0.2
pkgrel=01
url="https://kristaps.bsd.lv/lowdown"
depends=('glibc' 'libmd')
makedepends=('git')
_commit='45c3ffad5fe3b51360afe6e566ec54edcb13718f'
source=("$pkgname::git+https://github.com/kristapsdz/lowdown.git#commit=$_commit")
pkgver() {
cd "$pkgname"
git describe --tags | sed -e 's/^VERSION_//' -e 's/_/./g'
}
build () {
cd "$pkgname"
./configure \
PREFIX=/usr \
MANDIR=/usr/share/man
# ensure LDFLAGS is passed correctly
sed -i "s/^LDFLAGS.*/LDFLAGS = $LDFLAGS/" Makefile.configure
make
}
check () {
make -C "$pkgname" regress
}
package () {
cd "$pkgname"
# package
make DESTDIR="$pkgdir" \
install \
install_lib_common \
install_shared
# symlink unversioned to versioned shared library
local LIBVER=$(grep "^LIBVER" Makefile | sed "s/.*= //")
ln -sf "/usr/lib/liblowdown.so.$LIBVER" "$pkgdir/usr/lib/liblowdown.so"
# license
install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE.md
}
#---- arch license gpg-key & sha256sums ----
arch=(x86_64)
license=('ISC')
sha256sums=(SKIP)
## e2a13e89c9cfc52a5bf90e166d612060ecad42ce6f1779cdc29a578cca430491 lowdown-1.0.2-01-x86_64.pkg.tar.lz