summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 434aa8c3cd9e0829588133b51a4391f51b2cb8d6 (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
# Maintainer: Edward Pacman <edward@edward-p.xyz>

pkgname=archwrt-ss.sh-git
pkgver=r78.0229cec
pkgrel=1
pkgdesc="A simple Shadowsocks transparent proxy setup script by archwrt."
arch=('any')
url="https://github.com/archwrt/archwrt-ss.sh"
license=('GPL')
depends=(smartdns smartdns-china-list-git ipset iptables)
backup=(etc/archwrt/ss/archwrt-ss.conf)
optdepends=('simple-obfs: shadowsocks-libev plugin'
            'shadowsocks-v2ray-plugin: shadowsocks-libev plugin'
            'dnsproxy-adguard: a tiny dnsproxy with doh & dot support'
            'shadowsocks-rust: working mode ss needed'
            'v2ray: working mode v2ray needed')
makedepends=(git)
install=archwrt-ss.sh-git.install
source=("${pkgname}::git+https://github.com/archwrt/archwrt-ss.sh.git")
sha256sums=('SKIP')

pkgver() {
  cd "$srcdir/${pkgname}"
  ( set -o pipefail
    git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  )
}

package() {
  # Install dkms.conf
  cd "${pkgname}"
  install -Dm755 archwrt-ss.sh "${pkgdir}/usr/bin/archwrt-ss.sh"
  install -Dm644 archwrt-ss.conf "${pkgdir}/etc/archwrt/ss/archwrt-ss.conf"
  install -Dm644 archwrt-ss.service "${pkgdir}/usr/lib/systemd/system/archwrt-ss.service"
}