summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 73c42cf75554f2bf5a3dcf9bf0a294eebe72f43f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Maintainer: fossdd <fossdd@pwned.life>
# Contributor: Ainola <ainola@archlinux.org>
# Contributor: Drew DeVault
pkgname=scdoc-git
_pkgname=${pkgname%-git}
pkgver=1.11.2.r10.ca7aad3
pkgrel=2
license=('MIT')
pkgdesc='Tool for generating roff manual pages'
depends=()
makedepends=(make clang)
conflicts=(scdoc)
provides=(scdoc)
arch=('x86_64')
url='https://git.sr.ht/~sircmpwn/scdoc/'
source=("git+https://git.sr.ht/~sircmpwn/scdoc")
sha256sums=('SKIP')

pkgver() {
    cd "$_pkgname"
    printf "%s" "$(git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
}

build() {
    cd "$_pkgname"
    # Upstream purposefully does not honor the user's LDFLAGS in order to keep
    # scdoc static. As we gain no benefit to statically linking and, in fact,
    # lose standard Arch practices (such as RELRO and PIE), we must override
    # LDFLAGS
    make PREFIX=/usr LDFLAGS="$LDFLAGS"
}

check() {
    cd "$_pkgname"
    make check
}

package() {
    cd "$_pkgname"
    make PREFIX=/usr DESTDIR="$pkgdir" install
    install -Dm644 COPYING -t "$pkgdir/usr/share/licenses/$pkgname"
}