diff options
author | Polarian | 2023-06-18 00:24:49 +0100 |
---|---|---|
committer | Polarian | 2023-06-18 00:24:49 +0100 |
commit | 0affed29e7e53fbfde1b1fa3ce08c3e8596f1166 (patch) | |
tree | 031c835d651fa14e4073c9955b27a5dd4df6d1b5 /PKGBUILD | |
parent | 9169eddff2886f85868f27c2a0c1f52589bdf576 (diff) | |
download | aur-coyim.tar.gz |
Updated to version 0.4.1
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 53 |
1 files changed, 30 insertions, 23 deletions
@@ -1,39 +1,46 @@ -# Maintainer: Andy Weidenbaum <archbaum@gmail.com> +# Maintainer: Polarian <polarian@polarian.dev> +# Contributor: Andy Weidenbaum <archbaum@gmail.com> pkgname=coyim -pkgver=0.3.11 +pkgver=0.4.1 pkgrel=1 pkgdesc="A safe and secure chat client" arch=('i686' 'x86_64') depends=('gtk3') -makedepends=('go-pie') +makedepends=('go') url="https://coy.im" license=('GPL3') -source=($pkgname-$pkgver.tar.gz::https://codeload.github.com/coyim/coyim/tar.gz/v$pkgver) -sha256sums=('4717901462f027578369358c8772eb5b14e22f053fc30e4c9dbcc2b053374a41') - -prepare(){ - mkdir -p "$srcdir/gopath/src/github.com/coyim" - ln -rTsf "$srcdir/$pkgname-$pkgver" "$srcdir/gopath/src/github.com/coyim/$pkgname" +source=($pkgname-$pkgver.tar.gz::https://codeload.github.com/coyim/coyim/tar.gz/v$pkgver + $pkgname.desktop) +sha256sums=('f2bf1e73562fbcc3a0b264a30f92dfe427dffe2046e9f44459087ecac5890098' + '86826aca6023bbb0c85f5b1f1a72eaec48d308ea644a511f98437ef5763678a5') + +prepare() { + cd "$pkgname-$pkgver" + + if ! test -f "go.mod"; then + go mod init $pkgname + go mod tidy + fi } build() { - export GOPATH="$srcdir/gopath" - cd "$srcdir/gopath/src/github.com/coyim/$pkgname" + cd "$pkgname-$pkgver" + + # See: https://wiki.archlinux.org/title/Go_package_guidelines#Flags_and_build_options + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export CGO_LDFLAGS="${LDFLAGS}" + export GOFLAGS="-trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw" - go build \ - -gcflags "all=-trimpath=${PWD}" \ - -asmflags "all=-trimpath=${PWD}" \ - -ldflags "-extldflags ${LDFLAGS}" \ - -v . + go build -v . } package() { - cd "$srcdir/gopath/src/github.com/coyim/$pkgname" - - install -Dm 644 LICENSE* -t "$pkgdir/usr/share/licenses/$pkgname" - - install -Dm 644 *.md -t "$pkgdir/usr/share/doc/$pkgname" - - install -Dm 755 "coyim" -t "$pkgdir/usr/bin" + cd "$pkgname-$pkgver" + install -Dm644 *.md -t "$pkgdir/usr/share/doc/$pkgname/" + install -Dm755 coyim -t "$pkgdir/usr/bin/" + install -Dm644 "$srcdir/$pkgname.desktop" -t "$pkgdir/usr/share/applications/" + install -Dm644 "build/osx/mac-bundle/coyim.iconset/icon_256x256.png" "$pkgdir/usr/share/pixmaps/$pkgname.png" } |