Advertisement
yochananmarqos

xkcd-gtk

Jul 18th, 2021
1,582
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.12 KB | None | 0 0
  1. pkgname=xkcd-gtk
  2. pkgver=1.4.2
  3. pkgrel=1
  4. pkgdesc="A simple xkcd comic viewer written in Go using GTK+3."
  5. arch=('x86_64')
  6. url="https://github.com/rkoesters/xkcd-gtk"
  7. license=('GPL3')
  8. makedepends=('go')
  9. depends=('gtk3')
  10. source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/$pkgver.tar.gz")
  11. sha256sums=('41f528a69705490cb8f53b0404d70edf628d418e69806f2685c64d573f4202b9')
  12.  
  13. prepare() {
  14.   # Prevent creation of a `go` directory in one's home.
  15.   # Sometimes this directory cannot be removed with even `rm -rf` unless
  16.   # one becomes root or changes the write permissions.
  17.   export GOPATH="$srcdir/gopath"
  18.   go clean -modcache
  19. }
  20.  
  21. build()  {
  22.   cd "$pkgname-$pkgver"
  23.   export CGO_CPPFLAGS="${CPPFLAGS}"
  24.   export CGO_CFLAGS="${CFLAGS}"
  25.   export CGO_CXXFLAGS="${CXXFLAGS}"
  26.   export CGO_LDFLAGS="${LDFLAGS}"
  27.   export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
  28.   make
  29.  
  30.   # Clean mod cache for makepkg -C
  31.   go clean -modcache
  32. }
  33.  
  34. package() {
  35.   cd "$pkgname-$pkgver"
  36.   make DESTDIR="$pkgdir/" install
  37.  
  38.   ln -s "/usr/bin/com.github.rkoesters.$pkgname" "$pkgdir/usr/bin/$pkgname"
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement