summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: be979cc5bece1942b53f1e6100cb8ee2ba12f309 (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
# Maintainer: gbr <gbr@protonmail.com>
_pkgname=twittuh
pkgname=twittuh-git
pkgver=r89.ef45111
pkgrel=1
pkgdesc='Small Go program to make RSS/ATOM/JSON feeds from Twitter timelines'
arch=('x86_64')
url='https://github.com/derat/twittuh'
license=('BSD')
depends=('chromium')
makedepends=('go')
source=("$_pkgname::git+https://github.com/derat/twittuh.git#branch=master")
sha256sums=('SKIP')

pkgver() {
  cd "$_pkgname"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
    cd "$srcdir/$_pkgname"
    go build \
        -o "$_pkgname" \
        -trimpath \
        -buildmode=pie \
        -mod=readonly \
        -modcacherw \
        -ldflags "-extldflags \"${LDFLAGS}\"" \
        .
}

check() {
    cd "$srcdir/$_pkgname"
    go test -v ./...
}

package() {
    cd "$srcdir/$_pkgname"
    install -Dm755 $_pkgname "$pkgdir"/usr/bin/$_pkgname
    install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$_pkgname/LICENSE"
}