blob: 58328f10141c1c981128f4cb2691468107167608 (
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
# Maintainer: Mario Oenning <mo-son at mailbox dot org>
pkgname=pacseek
pkgver=1.8.3
pkgrel=2
pkgdesc='A terminal user interface for searching and installing Arch Linux packages'
arch=('any')
url="https://github.com/moson-mo/$pkgname"
license=('MIT')
depends=('pacman')
makedepends=('go')
optdepends=('xdg-utils: open URL on click support'
'fakeroot: display upgrades support')
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
sha256sums=('55f7dcd6ed23ca545029560cc1f60f0308f92f6e8e7cb85d77639a39ae250a6f')
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 -tags=next"
go build -o build .
}
package() {
cd "$pkgname-$pkgver"
# bin
install -Dm755 build/$pkgname "$pkgdir"/usr/bin/$pkgname
# license
install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
# .desktop
install -Dm644 "assets/$pkgname.desktop" "$pkgdir/usr/share/applications/org.moson.$pkgname.desktop"
# icon
install -Dm644 "assets/$pkgname.png" "$pkgdir/usr/share/icons/hicolor/256x256/apps/$pkgname.png"
# man page
install -Dm644 "doc/pacseek.1" "$pkgdir/usr/share/man/man1/$pkgname.1"
}
|