diff --git a/.SRCINFO b/.SRCINFO index 2d071b3..cdaaf1a 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,8 +1,9 @@ pkgbase = hysteria pkgdesc = A feature-packed network utility optimized for networks of poor quality pkgver = 1.2.2 - pkgrel = 1 + pkgrel = 2 url = https://github.com/HyNetwork/hysteria + install = hysteria.install arch = x86_64 license = GPL3 makedepends = go diff --git a/PKGBUILD b/PKGBUILD index 0673d38..e1fc984 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -3,13 +3,14 @@ _pkgbase=hysteria pkgname=$_pkgbase pkgver=1.2.2 -pkgrel=1 +pkgrel=2 pkgdesc='A feature-packed network utility optimized for networks of poor quality' arch=('x86_64') url="https://github.com/HyNetwork/hysteria" license=('GPL3') depends=('glibc') makedepends=('go' 'git') +install=$_pkgbase.install source=("$_pkgbase"::"git+$url.git#tag=v$pkgver" hysteria@.service hysteria-server@.service @@ -60,7 +61,4 @@ package() { # install systemd service install -Dm644 "$srcdir/hysteria@.service" "$pkgdir/usr/lib/systemd/system/hysteria@.service" install -Dm644 "$srcdir/hysteria-server@.service" "$pkgdir/usr/lib/systemd/system/hysteria-server@.service" - - # install config directory - install -dm755 "$pkgdir/etc/hysteria" } diff --git a/hysteria.install b/hysteria.install new file mode 100644 index 0000000..6c7509a --- /dev/null +++ b/hysteria.install @@ -0,0 +1,13 @@ +post_install() { + if [[ -d "/etc/hysteria" ]]; then + setfacl -m u:hysteria:rwx /etc/hysteria + else + # install config directory + install -dm755 /etc/hysteria + setfacl -m u:hysteria:rwx /etc/hysteria + fi +} + +post_upgrade() { + post_install +}