summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: fd06bb8df9b0af232c4ca4651da0bc6e8b7d0687 (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
# Maintainer: Gilrain <gilrain+libre.arch A_T castelmo DOT_ re>

pkgname=systemd-named-netns
pkgver=2.20200516
pkgrel=1
pkgdesc="Use named netns with systemd services!"
license=('GPL3')
depends=('systemd' 'iproute2')
optdepends=('iptables: for default NAT config' 'dhclient: when using dynamically assigned IP')
arch=('any')
backup=('etc/default/netns' 'etc/default/netns-nat')
url="https://github.com/Jamesits/systemd-named-netns"
source=("${pkgname}.${pkgver}.tar.gz::https://github.com/Jamesits/${pkgname}/archive/v${pkgver}.tar.gz")
sha256sums=('ea84aa945ce9123472e077fe6cde5702541bfa41fe5e08a414c1a8ff809881d7')

package() {
  cd "${pkgname}-${pkgver}"
  install -d "${pkgdir}"/usr/lib/systemd/system "${pkgdir}"/etc/default "${pkgdir}"/usr/bin
  install -Dm644 services/netns@.service "${pkgdir}"/usr/lib/systemd/system
  install -Dm644 services/netns-bridge@.service "${pkgdir}"/usr/lib/systemd/system
  install -Dm644 services/netns-mvbr@.service "${pkgdir}"/usr/lib/systemd/system
  install -Dm644 services/netns-nat@.service "${pkgdir}"/usr/lib/systemd/system
  install -Dm644 services/netns-tunnel@.service "${pkgdir}"/usr/lib/systemd/system
  install -Dm644 configs/netns "${pkgdir}"/etc/default/
  install -Dm644 configs/netns-nat "${pkgdir}"/etc/default/
  install -Dm755 scripts/chnetns "${pkgdir}"/usr/bin/
  install -Dm755 scripts/netnsinit "${pkgdir}"/usr/bin/
}