blob: c762c38dab56a91bbff8ad41e11f09bce79e1578 (
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
54
|
# Maintainer: Mahdi Sarikhani <mahdisarikhani@outlook.com>
# Contributor: Dct Mei <dctxmei@yandex.com>
# Contributor: AkinoKaede <autmaple@protonmail.com>
# Contributor: DuckSoft <realducksoft@gmail.com>
# Contributor: Felix Yan <felixonmars@archlinux.org>
# Contributor: pandada8 <pandada8@gmail.com>
pkgname=xray
pkgver=24.12.31
pkgrel=1
pkgdesc="The best v2ray-core, with XTLS support"
arch=('x86_64')
url="https://github.com/XTLS/Xray-core"
license=('MPL-2.0')
depends=('glibc' 'v2ray-domain-list-community' 'v2ray-geoip')
makedepends=('go')
provides=('v2ray')
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz"
"xray.sysusers"
"xray.tmpfiles"
"xray.service"
"xray@.service")
sha256sums=('e3c24b561ab422785ee8b7d4a15e44db159d9aa249eb29a36ad1519c15267be0'
'801131bf2eb079750f17d3e703e414eab8494db0d512164cdef3cc68cef308b8'
'2d301e9f2fae728da55f33a15b2c36e90cdb657deafb5d6ab7d74375ce9fdf38'
'66a8a3280aa5b3ed41b9855ba3de3f884bd2113b4a965cf097fcb31c3a6066ed'
'05d16acd6e00989ece245bf0df919accae858555c7165a50ce2b3db9c0c5a725')
build() {
cd "Xray-core-${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 -modcacherw"
go build -o xray ./main
}
check() {
cd "Xray-core-${pkgver}"
go test -p 1 -tags json -v -timeout 30m github.com/xtls/xray-core/core/...
}
package() {
cd "Xray-core-${pkgver}"
install -Dm755 xray -t "${pkgdir}/usr/bin"
install -d "${pkgdir}/etc/xray" "${pkgdir}/usr/share/xray"
ln -s /usr/share/v2ray/geo{ip,site}.dat -t "${pkgdir}/usr/share/xray"
install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
install -Dm644 "${srcdir}/xray.sysusers" "${pkgdir}/usr/lib/sysusers.d/xray.conf"
install -Dm644 "${srcdir}/xray.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/xray.conf"
install -Dm644 "${srcdir}/xray.service" -t "${pkgdir}/usr/lib/systemd/system"
install -Dm644 "${srcdir}/xray@.service" -t "${pkgdir}/usr/lib/systemd/system"
}
|