summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: bc572591f7a85a86f0a880e063c3da95132d1444 (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
# Maintainer: Jorge Alejandro Jimenez Luna <jorgeajimenezl17@gmail.com>

pkgname=proxyswarm
pkgver=0.4.1
pkgrel=1
pkgdesc="Lightweight proxy that allows redirect HTTP(S) traffic through a proxy."
arch=('x86_64')
url="https://github.com/jorgeajimenezl/proxyswarm"
license=('MIT')
depends=()
makedepends=('git' 'cargo')

provides=("$pkgname")
source=("$pkgname-$pkgver::git+https://github.com/jorgeajimenezl/$pkgname.git")
sha1sums=('SKIP')

build() {
    export RUSTUP_TOOLCHAIN=stable
    cd "${srcdir}/$pkgname-$pkgver"
    git checkout tags/v$pkgver -b $pkgver
    cargo build --release --all-features
}

package() {
    cd "${srcdir}/$pkgname-$pkgver"
    install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$pkgname"
    install -Dm0755 -t "$pkgdir/etc/" "$pkgname.conf"
    install -Dm0755 -t "$pkgdir/usr/lib/systemd/system/" "$pkgname.service"
}

post_install() {
    echo "REMEMBER: Edit the configuration file /etc/$pkgname.conf"
}