blob: a6f06790c164a26b5f4016d99ee0c1080f4e44ea (
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: Andrey Novikov <envek@envek.name>
pkgname=anycable-go
pkgdesc="AnyCable WebSocket Server written in Go"
pkgver=1.5.4
pkgrel=1
arch=('i686' 'x86_64')
url="http://anycable.io"
license=('MIT')
makedepends=('go' 'rsync')
source=("https://github.com/anycable/anycable-go/archive/v${pkgver}.tar.gz")
sha256sums=('b4cd10f46ea2003236e7ff6632394bb7f2f6cedf13d2ee337203f551f9f663de')
# See https://wiki.archlinux.org/index.php/Go_package_guidelines
prepare(){
mkdir -p gopath/src/github.com/anycable
ln -rTsf $pkgname-$pkgver gopath/src/github.com/anycable/$pkgname
cd gopath/src/github.com/anycable/$pkgname
export GOPATH="$srcdir"/gopath
}
build() {
cd "$pkgname-$pkgver"
go build \
-trimpath \
-buildmode=pie \
-mod=readonly \
-modcacherw \
-ldflags "-linkmode external -extldflags \"${LDFLAGS}\" -X main.version=$pkgver" \
-a -o $pkgname cmd/anycable-go/main.go
}
package() {
cd "$pkgname-$pkgver"
install -Dm755 $pkgname "$pkgdir"/usr/bin/$pkgname
}
|