blob: 0bc8c075aca0dde20c35fd78fb1ac5e56c041c46 (
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
52
53
|
# Maintainer: Elias Werberich <elias@werberich.de>
pkgname=changie
pkgver=1.9.1
pkgrel=1
epoch=0
pkgdesc="Automated changelog tool for preparing releases with lots of customization options."
arch=('x86_64')
url="https://github.com/miniscruff/$pkgname"
license=('MIT')
depends=()
makedepends=('go' 'git')
conflicts=()
source=("git+https://github.com/miniscruff/$pkgname#tag=v$pkgver")
sha256sums=('SKIP')
prepare() {
cd "$pkgname"
mkdir -p "build/"
case $CARCH in
"x86_64")
_GOARCH="amd64"
;;
*)
echo "Selected architecture is unsupported."
exit 1
;;
esac
}
build() {
cd "$pkgname"
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
go build -o build \
-buildmode=pie \
-trimpath -ldflags="-linkmode=external -X main.version=$pkgver" \
-mod=readonly \
-modcacherw \
.
}
check() {
cd "$pkgname"
go test ./...
}
package() {
cd "$pkgname"
install -Dm0755 "build/$pkgname" "$pkgdir/usr/bin/$pkgname"
}
|