summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD40
-rw-r--r--smcroute.conf.example31
-rw-r--r--smcroute.service15
-rw-r--r--smcrouted.conf.d6
-rw-r--r--smcrouted.rc.d61
6 files changed, 32 insertions, 138 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e2a29028614c..7c58dd222b96 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,23 +1,22 @@
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
+ pkgdesc = command line tool to manipulate kernel multicast routing
+ pkgver = 2.5.5.r5.gf5bf08e
pkgrel = 1
url = https://github.com/troglobit/smcroute
arch = i686
arch = x86_64
license = GPL2
- depends = glibc
- provides = smcroute
+ makedepends = git
+ depends = libcap
+ depends = bash
+ depends = libsystemd.so
+ provides = smcroute=2.5.5-1
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
+ sha256sums = SKIP
pkgname = smcroute-git
-
diff --git a/PKGBUILD b/PKGBUILD
index f82fd3cffb31..90317cf25b02 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,32 +1,40 @@
# Maintainer: Brian Bidulock <bidulock@openss7.org>
pkgname="smcroute-git"
-pkgver=2.0.0.r4.g73f6f14
+_pkgname=smcroute
+pkgver=2.5.5.r5.gf5bf08e
pkgrel=1
-pkgdesc="A command line tool to manipulate the multicast routes of a UNIX kernel. It supports both IPv4 and IPv6 multicast routing."
+pkgdesc="command line tool to manipulate kernel multicast routing"
arch=('i686' 'x86_64')
url="https://github.com/troglobit/smcroute"
license=('GPL2')
-depends=('glibc')
-provides=('smcroute' 'mcsender')
+provides=("${_pkgname}=${pkgver%%.r*}-${pkgrel}" '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')
+depends=('libcap' 'bash' 'libsystemd.so')
+makedepends=('git')
+source=("$pkgname::git+https://github.com/troglobit/smcroute.git")
+md5sums=('SKIP')
+sha256sums=('SKIP')
pkgver() {
cd $pkgname
git describe --long --tags | sed -E 's/([^-]*-g)/r\1/;s/-/./g;s/^0\.95\./1.99.2./'
}
+prepare() {
+ cd $pkgname
+ ./autogen.sh
+}
+
build() {
cd $pkgname
- ./configure --prefix=/usr --sbindir=/usr/bin
+ ./configure \
+ --prefix=/usr \
+ --sbindir=/usr/bin \
+ --sysconfdir=/etc \
+ --runstatedir=/run \
+ --localstatedir=/var
make
}
@@ -34,10 +42,10 @@ 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"
+ install -Dm644 /dev/null "${pkgdir}/etc/smcroute.conf"
+ sed -e '/^[mp]/s,^,#,' smcroute.conf >"${pkgdir}/etc/smcroute.conf"
+ install -Dm644 /dev/null "${pkgdir}/usr/lib/tmpfiles.d/smcroute.conf"
+ echo "d /etc/smcroute.d - -" >"${pkgdir}/usr/lib/tmpfiles.d/smcroute.conf"
}
# vim:set ts=2 sw=2 et:
diff --git a/smcroute.conf.example b/smcroute.conf.example
deleted file mode 100644
index d8b8d73cd54c..000000000000
--- a/smcroute.conf.example
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# 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
deleted file mode 100644
index 6d82b4e0a48a..000000000000
--- a/smcroute.service
+++ /dev/null
@@ -1,15 +0,0 @@
-[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
diff --git a/smcrouted.conf.d b/smcrouted.conf.d
deleted file mode 100644
index 79c7dbaef581..000000000000
--- a/smcrouted.conf.d
+++ /dev/null
@@ -1,6 +0,0 @@
-# Arguments for smcrouted
-# example: Enable additional debug messages.
-# SMCROUTED_ARGS="-D"
-
-# Specify an alternative configuration file, instead of the default '/etc/smcroute.conf'.
-# SMCROUTED_CONFFILE="/etc/smcroute.conf"
diff --git a/smcrouted.rc.d b/smcrouted.rc.d
deleted file mode 100644
index ba37e6d38bd1..000000000000
--- a/smcrouted.rc.d
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/bin/bash
-
-. /etc/rc.conf
-. /etc/conf.d/smcrouted
-. /etc/rc.d/functions
-
-# smcroute writes its process ID to /var/run/smcroute.pid upon startup.
-PIDFILE="/var/run/smcroute.pid"
-
-# Specify the default configuration file '/etc/smcroute.conf'.
-[[ -z "$SMCROUTED_CONFFILE" ]] && SMCROUTED_CONFFILE="/etc/smcroute.conf"
-
-if [[ -f $PIDFILE ]]; then
- read -r PID < "$PIDFILE"
-
- # prevent stale pidfiles from hanging around
- if [[ ! -d /proc/$PID ]]; then
- echo 'pid not found. deleteing stale pidfile'
- unset PID
- rm -f "$PIDFILE"
- fi
-fi
-
-case "$1" in
- start)
- stat_busy "Starting SMCRoute Server"
- if [[ $PID ]]; then
- stat_fail
- exit 1
- fi
- if /usr/sbin/smcroute -d -f "$SMCROUTED_CONFFILE" $SMCROUTED_ARGS; then
- add_daemon smcrouted
- stat_done
- else
- stat_fail
- exit 1
- fi
- ;;
- stop)
- stat_busy "Stopping SMCRoute Server"
- if [[ ! $PID ]]; then
- stat_fail
- exit 1
- fi
- if { smcroute -k; } &>/dev/null; then
- rm_daemon smcrouted
- stat_done
- else
- stat_fail
- exit 1
- fi
- ;;
- restart)
- $0 stop
- sleep 1
- $0 start
- ;;
- *)
- echo "usage: $0 {start|stop|restart}"
-esac
-