[packages/minissdpd] - new
qboosh
qboosh at pld-linux.org
Tue Feb 5 18:14:11 CET 2013
commit 3d5137396c2481d13bb63c0bf9999a573e8f8081
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Tue Feb 5 18:15:10 2013 +0100
- new
minissdpd.init | 94 +++++++++++++++++++++++++++++++++++++++++++++++++++++
minissdpd.spec | 64 ++++++++++++++++++++++++++++++++++++
minissdpd.sysconfig | 7 ++++
3 files changed, 165 insertions(+)
---
diff --git a/minissdpd.spec b/minissdpd.spec
new file mode 100644
index 0000000..069feb0
--- /dev/null
+++ b/minissdpd.spec
@@ -0,0 +1,64 @@
+Summary: MiniSSDPd - daemon keeping track of UPnP devices up
+Summary(pl.UTF-8): MiniSSDPd - demon śledzący czynne urządzenia UPnP
+Name: minissdpd
+Version: 1.2
+Release: 1
+License: BSD
+Group: Networking/Daemons
+Source0: http://miniupnp.tuxfamily.org/files/%{name}-%{version}.tar.gz
+# Source0-md5: 3f831d9586861ba5548dc2142049cb46
+Source1: %{name}.init
+Source2: %{name}.sysconfig
+URL: http://miniupnp.tuxfamily.org/minissdpd.html
+BuildRequires: rpmbuild(macros) >= 1.228
+Requires(post,preun): /sbin/chkconfig
+Requires: rc-scripts
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+minissdpd listen for SSDP traffic and keeps track of what are the UPnP
+devices up on the network. The list of the UPnP devices is accessed by
+programs looking for devices, skipping the UPnP discovery process.
+
+%description -l pl.UTF-8
+minissdpd nasłuchuje ruchu SSDP i śledzi, które urządzenia UPnP są
+aktywne w sieci. Programy w poszukiwaniu urządzeń mogą odwoływać się
+do listy urządzeń UPnP, pomijając proces wykrywania UPnP.
+
+%prep
+%setup -q
+
+%build
+%{__make} \
+ CC="%{__cc}" \
+ CFLAGS="%{rpmcflags} -fno-strict-aliasing -Wall -D_GNU_SOURCE"
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man1,/etc/rc.d/init.d,/etc/sysconfig}
+
+install minissdpd $RPM_BUILD_ROOT%{_sbindir}
+cp -p minissdpd.1 $RPM_BUILD_ROOT%{_mandir}/man1
+install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
+install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+/sbin/chkconfig --add %{name}
+%service %{name} restart
+
+%preun
+if [ "$1" = "0" ]; then
+ %service -q %{name} stop
+ /sbin/chkconfig --del %{name}
+fi
+
+%files
+%defattr(644,root,root,755)
+%doc Changelog.txt LICENSE README
+%attr(755,root,root) %{_sbindir}/minissdpd
+%attr(754,root,root) /etc/rc.d/init.d/%{name}
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
+%{_mandir}/man1/minissdpd.1*
diff --git a/minissdpd.init b/minissdpd.init
new file mode 100644
index 0000000..859123f
--- /dev/null
+++ b/minissdpd.init
@@ -0,0 +1,94 @@
+#!/bin/sh
+#
+# minissdpd minissdpd short service description
+#
+# chkconfig: 345 85 15
+#
+# description: minissdpd UPnP devices tracking daemon
+#
+# processname: minissdpd
+# pidfile: /var/run/minissdpd.pid
+#
+
+# Source function library
+. /etc/rc.d/init.d/functions
+
+# Get network config
+. /etc/sysconfig/network
+
+# Check that networking is up.
+if is_yes "${NETWORKING}"; then
+ if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
+ msg_network_down "MiniSSDPd"
+ exit 1
+ fi
+else
+ exit 0
+fi
+
+MINISSDPD_OPTS=
+
+[ -f /etc/sysconfig/minissdpd ] && . /etc/sysconfig/minissdpd
+
+pidfile="/var/run/minissdpd.pid"
+
+start() {
+ # Check if the service is already running?
+ if [ -f /var/lock/subsys/minissdpd ]; then
+ msg_already_running "MiniSSDPd"
+ return
+ fi
+ msg_starting "MiniSSDPd"
+ daemon /usr/sbin/minissdpd
+ RETVAL=$?
+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/minissdpd
+}
+
+stop() {
+ if [ ! -f /var/lock/subsys/minissdpd ]; then
+ msg_not_running "MiniSSDPd"
+ return
+ fi
+ msg_stopping "MiniSSDPd"
+ killproc --pidfile $pidfile minissdpd
+ rm -f /var/lock/subsys/minissdpd
+}
+
+condrestart() {
+ if [ ! -f /var/lock/subsys/minissdpd ]; then
+ msg_not_running "MiniSSDPd"
+ RETVAL=$1
+ return
+ fi
+ stop
+ start
+}
+
+RETVAL=0
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart)
+ stop
+ start
+ ;;
+ try-restart)
+ condrestart 0
+ ;;
+ force-reload)
+ condrestart 7
+ ;;
+ status)
+ status --pidfile $pidfile minissdpd
+ RETVAL=$?
+ ;;
+ *)
+ msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"
+ exit 3
+esac
+
+exit $RETVAL
diff --git a/minissdpd.sysconfig b/minissdpd.sysconfig
new file mode 100644
index 0000000..23a4379
--- /dev/null
+++ b/minissdpd.sysconfig
@@ -0,0 +1,7 @@
+# Customized settings for minissdpd
+
+# Define nice level for minissdpd
+#SERVICE_RUN_NICE_LEVEL="+0"
+
+# interface
+MINISSDPD_OPTS="-i eth0"
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/minissdpd.git/commitdiff/3d5137396c2481d13bb63c0bf9999a573e8f8081
More information about the pld-cvs-commit
mailing list