blob: 5f15e1b96c35bc99924a5f89790e1920105d9480 (
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
|
# Maintainer: Leonardo Brondani Schenkel <leonardo at schenkel dot net>
pkgname=kobo-dictutil-git
pkgver=v0.3.2.r7.g3e598b7
pkgrel=1
pkgdesc="A collection of tools and libraries to work with Kobo dictionaries"
arch=('x86_64' 'i686' 'armv7h')
url="https://github.com/pgaskin/dictutil"
license=('MIT')
makedepends=('git' 'go')
source=(git+${url})
sha256sums=('SKIP')
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"
pkgver() {
cd dictutil
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
build() {
cd dictutil
go build -o ./bin/dictgen ./cmd/dictgen
go build -o ./bin/dictutil ./cmd/dictutil
go build -o ./bin/dictzip-decompile ./examples/dictzip-decompile
}
package() {
cd dictutil/bin
for cmd in *; do
install -Dm 755 ${cmd} "${pkgdir}/usr/bin/${cmd}"
done
}
|