blob: 3d6abb2fe0f4d450cf450f77d44b2f7df208a451 (
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
|
# Maintainer: Mark Wagie <mark dot wagie at proton dot me>
pkgname=gshortcuts
pkgver=0.0.2
pkgrel=1
pkgdesc="Command-line tool to manage your GNOME custom shortcuts."
arch=('x86_64')
url="https://gshortcuts.jpinillos.dev"
license=('MIT')
depends=('glib2')
makedepends=('go')
source=("$pkgname-$pkgver.tar.gz::https://github.com/jpinilloslr/gshortcuts/archive/refs/tags/v$pkgver.tar.gz")
sha256sums=('30a28419bfd6752a04e36021184866e83f9bbcd8eda87448fcfdd5ac3b9d8544')
prepare(){
cd "$pkgname-$pkgver"
mkdir -p build/
}
build() {
cd "$pkgname-$pkgver"
export GOPATH="$srcdir/gopath"
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
go build -o build ./cmd/...
# Clean module cache for makepkg -C
go clean -modcache
}
package() {
cd "$pkgname-$pkgver"
install -Dm755 "build/$pkgname" -t "$pkgdir/usr/bin/"
install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
}
|