summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8714a0a863b497873e88cfbf6a326dcefd58dd68 (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
55
56
57
58
59
60
61
62
63
# Maintainer: Vimsucks <dev@vimsucks.com>

pkgname=frp
pkgver=0.24.1
pkgrel=1
pkgdesc="A fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet."
license=('Apache')
url="https://github.com/fatedier/frp"
arch=('x86_64' 'i686' 'arm' 'armv6h' 'armv7h' 'aarch64')
source=(frps.service frpc.service frps@.service frpc@.service)
source_x86_64=("https://github.com/fatedier/frp/releases/download/v${pkgver}/frp_${pkgver}_linux_amd64.tar.gz")
source_i686=("https://github.com/fatedier/frp/releases/download/v${pkgver}/frp_${pkgver}_linux_386.tar.gz")
source_arm=("https://github.com/fatedier/frp/releases/download/v${pkgver}/frp_${pkgver}_linux_arm.tar.gz")
source_armv6h=("https://github.com/fatedier/frp/releases/download/v${pkgver}/frp_${pkgver}_linux_arm.tar.gz")
source_armv7h=("https://github.com/fatedier/frp/releases/download/v${pkgver}/frp_${pkgver}_linux_arm.tar.gz")
source_aarch64=("https://github.com/fatedier/frp/releases/download/v${pkgver}/frp_${pkgver}_linux_arm64.tar.gz")
md5sums=('6f9c6681357f3f984983457151d7f0c5'
         'e3bfa7c428433fa6cbb5aa64515d8899'
         '346fabd46c12c039e39a26986629bc6d'
         'dd170d972b1ea8c681bde054dbebf888')
md5sums_x86_64=('4852f4352940401122e735c980c43335')
md5sums_i686=('e436e7e82d861cfc3b0f91354a9a773b')
md5sums_arm=('d03febc04ca031cc5bb9214579785cf7')
md5sums_armv6h=('d03febc04ca031cc5bb9214579785cf7')
md5sums_armv7h=('d03febc04ca031cc5bb9214579785cf7')
md5sums_aarch64=('ca83ae1920e67ed09bf2ae4fc6512645')
install=$pkgname.install
backup=(etc/frp/{frpc.ini,frps.ini,frpc_full.ini,frps_full.ini})

package() {
	case $CARCH in
		x86_64)ARCH=amd64
			;;
		i686)ARCH=386
			;;
		arm)ARCH=arm
			;;
		armv6h)ARCH=arm
			;;
		armv7h)ARCH=arm
			;;
		aarch64)ARCH=arm64
			;;
	esac
	frpdir=$srcdir/frp_${pkgver}_linux_${ARCH}

	mkdir -p $pkgdir/usr/bin
	install -m755  $frpdir/frpc $pkgdir/usr/bin/frpc
	install -m755  $frpdir/frps $pkgdir/usr/bin/frps

	mkdir -p $pkgdir/etc/frp
	install -Dm644 $frpdir/frpc.ini $pkgdir/etc/frp/frpc.ini
	install -Dm644 $frpdir/frpc_full.ini $pkgdir/etc/frp/frpc_full.ini
	install -Dm644 $frpdir/frps.ini $pkgdir/etc/frp/frps.ini
	install -Dm644 $frpdir/frps_full.ini $pkgdir/etc/frp/frps_full.ini

	install -Dm644 $frpdir/LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE

	install -Dm644 frps.service  $pkgdir/usr/lib/systemd/system/frps.service
	install -Dm644 frpc.service  $pkgdir/usr/lib/systemd/system/frpc.service
	install -Dm644 frps@.service  $pkgdir/usr/lib/systemd/system/frps@.service
	install -Dm644 frpc@.service  $pkgdir/usr/lib/systemd/system/frpc@.service
}