diff options
author | Brian Bidulock | 2015-06-10 16:18:18 -0600 |
---|---|---|
committer | Brian Bidulock | 2015-06-10 16:18:18 -0600 |
commit | ae9a926b68e731ee079eb5a98f2adc882ca71bbc (patch) | |
tree | 8fbad23478cabc8b2f4ebe533e4c3cfa719a506d | |
download | aur-ae9a926b68e731ee079eb5a98f2adc882ca71bbc.tar.gz |
initial version
-rw-r--r-- | .SRCINFO | 23 | ||||
-rw-r--r-- | PKGBUILD | 43 | ||||
-rw-r--r-- | smcroute.conf.example | 31 | ||||
-rw-r--r-- | smcroute.service | 15 |
4 files changed, 112 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..e2a29028614c --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,23 @@ +pkgbase = smcroute-git + pkgdesc = A command line tool to manipulate the multicast routes of a UNIX kernel. It supports both IPv4 and IPv6 multicast routing. + pkgver = 2.0.0.r4.g73f6f14 + pkgrel = 1 + url = https://github.com/troglobit/smcroute + arch = i686 + arch = x86_64 + license = GPL2 + depends = glibc + provides = smcroute + provides = mcsender + conflicts = smcroute + conflicts = mcsender + backup = etc/smcroute.conf + source = smcroute-git::git+https://github.com/troglobit/smcroute.git + source = smcroute.conf.example + source = smcroute.service + md5sums = SKIP + md5sums = 98bdb5bbd222686761e318ee04825b7a + md5sums = 7b28500642045b2482f5ac873da0f86b + +pkgname = smcroute-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..f82fd3cffb31 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,43 @@ +# Maintainer: Brian Bidulock <bidulock@openss7.org> + +pkgname="smcroute-git" +pkgver=2.0.0.r4.g73f6f14 +pkgrel=1 +pkgdesc="A command line tool to manipulate the multicast routes of a UNIX kernel. It supports both IPv4 and IPv6 multicast routing." +arch=('i686' 'x86_64') +url="https://github.com/troglobit/smcroute" +license=('GPL2') +depends=('glibc') +provides=('smcroute' 'mcsender') +conflicts=('smcroute' 'mcsender') +backup=('etc/smcroute.conf') +source=("$pkgname::git+https://github.com/troglobit/smcroute.git" + 'smcroute.conf.example' + 'smcroute.service') +noextract=() +md5sums=('SKIP' + '98bdb5bbd222686761e318ee04825b7a' + '7b28500642045b2482f5ac873da0f86b') + +pkgver() { + cd $pkgname + git describe --long --tags | sed -E 's/([^-]*-g)/r\1/;s/-/./g;s/^0\.95\./1.99.2./' +} + +build() { + cd $pkgname + ./configure --prefix=/usr --sbindir=/usr/bin + make +} + +package() { + cd $pkgname + make DESTDIR="$pkgdir/" install + + install -Dm644 "${srcdir}/smcroute.conf.example" "${pkgdir}/etc/smcroute.conf" + install -Dm644 "${srcdir}/smcroute.service" "${pkgdir}/usr/lib/systemd/system/smcroute.service" + # nothing useful here + rm -fr "${pkgdir}/usr/share/doc" +} + +# vim:set ts=2 sw=2 et: diff --git a/smcroute.conf.example b/smcroute.conf.example new file mode 100644 index 000000000000..d8b8d73cd54c --- /dev/null +++ b/smcroute.conf.example @@ -0,0 +1,31 @@ +# +# smcroute.conf example +# +# The configuration file supports joining multicast groups, to use +# Layer-2 signaling so that switches and routers open up multicast +# traffic to your interfaces. Leave is not supported, remove the +# mgroup and SIGHUP your daemon, or send a specific leave command. +# +# Similarily supported is setting mroutes. Removing mroutes is not +# supported, remove/comment out the mroute or send a remove command. +# +# Syntax: +# mgroup from IFNAME group MCGROUP +# mroute from IFNAME [source ADDRESS] group MCGROUP to IFNAME [IFNAME ...] +# +# The following example instructs the kernel to join the multicast +# group 225.1.2.3 on interface eth0. Followed by setting up an +# mroute of the same multicast stream, but from the explicit sender +# 192.168.1.42 on the eth0 network and forward to eth1 and eth2. +# +# mgroup from eth0 group 225.1.2.3 +# mroute from eth0 group 225.1.2.3 source 192.168.1.42 to eth1 eth2 + +# Here we allow routing of multicast to group 225.3.2.1 from ANY +# source coming in from interface eth0 and forward to eth1 and eth2. +# NOTE: Routing from ANY source is currently only available for IPv4 +# multicast. +# +# mgroup from eth0 group 225.3.2.1 +# mroute from eth0 group 225.3.2.1 to eth1 eth2 + diff --git a/smcroute.service b/smcroute.service new file mode 100644 index 000000000000..6d82b4e0a48a --- /dev/null +++ b/smcroute.service @@ -0,0 +1,15 @@ +[Unit] +Description=Static Multicast Route Daemon +After=network.target +ConditionPathExists=/etc/smcroute.conf +Conflicts=pimd.service mrouted.service + +[Service] +Type=forking +PIDFile=/var/run/smcroute.pid +ExecStart=/usr/bin/smcroute -d +ExecReload=/bin/kill -HUP $MAINPID +Restart=on-abort + +[Install] +WantedBy=multi-user.target |