Advertisement
yochananmarqos

permafrost-git

May 29th, 2021
1,405
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.27 KB | None | 0 0
  1. pkgname=permafrost-git
  2. pkgver=r3.f018530
  3. pkgrel=1
  4. pkgdesc="Lightweight single-site browser generator using Webview or Chrome/Chromium."
  5. arch=('x86_64')
  6. url="https://gitea.arsenm.dev/Arsen6331/permafrost"
  7. license=('GPL3')
  8. depends=('webkit2gtk')
  9. makedepends=('git' 'go' 'libglvnd' 'libxcursor' 'libxi' 'libxinerama' 'libxrandr')
  10. provides=("${pkgname%-git}")
  11. conflicts=("${pkgname%-git}")
  12. source=('git+https://gitea.arsenm.dev/Arsen6331/permafrost.git')
  13. sha256sums=('SKIP')
  14.  
  15. pkgver() {
  16.     cd "$srcdir/${pkgname%-git}"
  17.     printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  18. }
  19.  
  20. prepare() {
  21.     # Prevent creation of a `go` directory in one's home.
  22.     # Sometimes this directory cannot be removed with even `rm -rf` unless
  23.     # one becomes root or changes the write permissions.
  24.     export GOPATH="$srcdir/gopath"
  25.     go clean -modcache
  26. }
  27.  
  28. build() {
  29.     cd "$srcdir/${pkgname%-git}"
  30.     export CGO_CPPFLAGS="${CPPFLAGS}"
  31.     export CGO_CFLAGS="${CFLAGS}"
  32.     export CGO_CXXFLAGS="${CXXFLAGS}"
  33.     export CGO_LDFLAGS="${LDFLAGS}"
  34.     export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
  35.     make
  36.  
  37.     # Clean mod cache for makepkg -C
  38.     go clean -modcache
  39. }
  40.  
  41. package() {
  42.     cd "$srcdir/${pkgname%-git}"
  43.     make PREFIX="$pkgdir" install
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement