blob: 2b00278a7dfe7e97145041928fda6d62a5575e62 (
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
|
# Maintainer: KunoiSayami <[email protected]>
pkgname=rdpgw
pkgver=2.0
pkgrel=5
pkgdesc='Remote Desktop Gateway in Go for deploying on Linux/BSD/Kubernetes'
arch=('any')
url=https://github.com/bolkedebruin/rdpgw
source=(git+https://github.com/bolkedebruin/rdpgw.git#commit=e9e592b43a5d77d1f07ad58abdf2750a2514f7e4)
license=('Apache-2.0')
md5sums=('SKIP')
makedepends=('go>=1.19')
options=(!lto)
depends=()
provides=('rdpgw')
prepare() {
cd "$srcdir/$pkgname/"
#git submodule update --init
}
build() {
cd "$srcdir/$pkgname"
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
#export CGO_LDFLAGS="-linkmode=external -extldflags \"${LDFLAGS}\""
export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -extldflags \"${LDFLAGS}\" -mod=readonly -modcacherw"
sed -i 's/$(LDFLAGS)//g' Makefile
make -j1
}
package() {
cd "$srcdir/$pkgname"
install -dm755 "$pkgdir"/usr/share/"$pkgname"/
install -dm755 "$pkgdir"/usr/share/license/"$pkgname"
install -dm755 "$pkgdir"/usr/bin
install -m755 bin/"$pkgname" "$pkgdir"/usr/share/"$pkgname"/
install -m755 bin/"$pkgname"-auth "$pkgdir"/usr/share/"$pkgname"/
install -Dm644 LICENSE "$pkgdir"/usr/share/license/"$pkgname"/
ln -s /usr/share/"$pkgname"/"$pkgname" "$pkgdir"/usr/bin/"$pkgname"
ln -s /usr/share/"$pkgname"/"$pkgname"-auth "$pkgdir"/usr/bin/"$pkgname"-auth
}
|