blob: b8c13800aa2f43592665bb3ee204872745b0776c (
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
|
# Maintainer: Caleb Maclennan <caleb@alerque.com>
pkgname=xts
pkgver=0.0.18
pkgrel=1
pkgdesc='XML typesetting system, experimental playground for speedata Publisher next generation'
arch=(x86_64)
url="https://github.com/speedata/$pkgname"
license=(AGPL3)
depends=(glibc)
makedepends=(go)
_archive="$pkgname-$pkgver"
source=("$url/archive/v$pkgver/$_archive.tar.gz")
sha256sums=('d447013b387f2bb1f3d8aba4262162e702f9dd09a38a24fc326a4799f6b75148')
prepare() {
cd "$_archive"
mkdir -p build
}
build() {
cd "$_archive"
export CGO_CPPFLAGS="$CPPFLAGS"
export CGO_CFLAGS="$CFLAGS"
export CGO_CXXFLAGS="$CXXFLAGS"
export CGO_LDFLAGS="$LDFLAGS"
go build \
-trimpath \
-buildmode=pie \
-mod=readonly \
-modcacherw \
-ldflags "-X github.com/speedata/xts/core.Version=$pkgver -extldflags \"$LDFLAGS\"" \
-o build \
./...
}
package() {
cd "$_archive"
install -Dm0755 -t "$pkgdir/usr/bin/" "build/$pkgname"
}
|