# Maintainer: exponential # Contributor: Alexander F. Rødseth (ARCH) # Contributor: zocker_160 # https://gitlab.archlinux.org/archlinux/packaging/packages/gendesk pkgname=gendesk pkgver=1.0.10 pkgrel=0 pkgdesc='Utility for generating desktop files' arch=('amd64') url='https://github.com/xyproto/$pkgname/' license=('BSD-3') #possible alternative: gccgo-go makedepends=('golang-go>=1.22') source=("$pkgname-$pkgver.tar.gz::https://github.com/xyproto/$pkgname/archive/refs/tags/v$pkgver.tar.gz") b2sums=('0603cb2bc8da7c4c3667bf156ca74c2327e2e462690d448daa78d906fcc78eca4a2dd91879ab25372343905d54603c9983335ff2c0891753578511a76871df4b') options=('!lto') build() { cd $pkgname-$pkgver go build -buildmode=pie -trimpath -mod=readonly -modcacherw -ldflags="-s -w -linkmode=external -extldflags '$LDFLAGS'" } package() { cd $pkgname-$pkgver install -Dm755 $pkgname "$pkgdir/usr/bin/$pkgname" install -Dm644 $pkgname.1.gz "$pkgdir/usr/share/man/man1/$pkgname.1.gz" install -Dm644 $pkgname.png "$pkgdir/usr/share/pixmaps/$pkgname.png" install -Dm644 LICENSE "$pkgdir/usr/share/doc/$pkgname/LICENSE" install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/readme" install -Dm644 CHANGELOG.md "$pkgdir/usr/share/doc/$pkgname/changelog" gzip "$pkgdir/usr/share/doc/$pkgname/changelog" }