blob: 11f9aaeb35fe489c93e12263b23f918c7f8a4552 (
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
|
# Maintainer: lanthora <lanthora@outlook.com>
pkgname=candy-git
pkgver=5.8.9.r0.ga64cfdd
pkgrel=1
pkgdesc="A reliable, low-latency, and anti-censorship virtual private network"
url="https://github.com/lanthora/candy"
license=('MIT')
arch=('x86_64' 'aarch64' 'armv7h' 'riscv64')
source=("$pkgname::git+https://github.com/lanthora/candy.git" )
sha256sums=('SKIP')
makedepends=('cmake' 'ninja' 'pkgconf' 'gcc' 'git')
depends=('fmt' 'glibc' 'gcc-libs' 'openssl' 'spdlog' 'poco')
conflicts=('candy')
backup=('etc/candy.cfg')
pkgver() {
cd "$pkgname"
git describe --long --tags --abbrev=7 | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
build() {
cd "$pkgname"
cmake -B build -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release
cmake --build build
}
package() {
cd "$pkgname"
install -Dm644 candy.cfg "$pkgdir/etc/candy.cfg"
install -Dm644 candy.service "$pkgdir/usr/lib/systemd/system/candy.service"
install -Dm644 candy@.service "$pkgdir/usr/lib/systemd/system/candy@.service"
install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}/"
DESTDIR="$pkgdir" cmake --install build
}
|