summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: cd6b7b7188c54c34c01d1aa007d07d9eb0d55e3a (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
# Maintainer: AlphaJack <alphajack at tuta dot io>

pkgname="pterodactyl-wings"
pkgver=1.11.11
pkgrel=1
pkgdesc="The server control plane for Pterodactyl Panel"
url="https://pterodactyl.io/"
license=("MIT")
arch=("x86_64" "aarch64")
depends=("docker")
makedepends=("go")
conflicts=("pterodactyl-daemon")
source=("$pkgname-$pkgver.tar.gz::https://github.com/pterodactyl/wings/archive/refs/tags/v$pkgver.tar.gz"
        "$pkgname.service")
sha256sums=('e72eb29919f30cc0475b52aa54fbb4c27067ac773719d5752ac137fed2c1f095'
            '62dfff25f9bdae4769f4201ed30e7c2bfca54611bee75512c5626e74c764f46e')

build(){
 cd "wings-$pkgver"
 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"
 go build -o "build/wings" -v wings.go
 # upx not included as it returns the following: upx: build/wings: CantPackException: bad DT_GNU_HASH n_bucket=0x62  n_bitmask=0x8  len=0x2c0
}

package(){
 cd "wings-$pkgver"
 install -d 640 "$pkgdir/etc/pterodactyl"
 install -D -m 755 "build/wings" "$pkgdir/usr/bin/wings"
 install -D -m 644 "$srcdir/$pkgname.service"   "$pkgdir/usr/lib/systemd/system/$pkgname.service"
}