summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 52051ef89f00531019638925d273f387c0f271b5 (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
# Maintainer: Kristen McWilliam <merritt_public at outlook dot com>
pkgname=nyrna
pkgver=1.0
pkgrel=6
pkgdesc='Simple program to pause games & applications'
arch=('x86_64')
url="https://github.com/Merrit/nyrna"
license=('GPL3 or any later version')
optdepends=('libappindicator-gtk3: Tray icon support on GNOME')
makedepends=('go')
source=("$pkgname-$pkgver.tar.gz::https://github.com/Merrit/nyrna/archive/v$pkgver.tar.gz")
sha256sums=('e35f28ef2f76a25e8aaa7182c222e48063d208178b49a7e8d249ef947ab14a22')

prepare(){
  gendesk -n --pkgname "$pkgname" --pkgdesc "$pkgdesc"
  cd "$pkgname-$pkgver"
}

build() {
  cd "$pkgname-$pkgver/nyrna"
  export CGO_CPPFLAGS="${CPPFLAGS}"
  export CGO_CFLAGS="${CFLAGS}"
  export CGO_CXXFLAGS="${CXXFLAGS}"
  export CGO_LDFLAGS="${LDFLAGS}"
  export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
  go build
}

check() {
  cd "$pkgname-$pkgver"
}

package() {
  cd "$pkgname-$pkgver"
  install -Dm755 $pkgname/$pkgname "$pkgdir"/usr/bin/$pkgname
  install -Dm644 "../$pkgname.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop"
  install -Dm644 "../../$pkgname.png" "$pkgdir/usr/share/pixmaps/$pkgname.png"

}