network/miniupnpd: Added to 12.2 repository
This commit is contained in:
parent
2576f42871
commit
dbf69b7af0
|
@ -0,0 +1,12 @@
|
|||
The MiniUPnP daemon (MiniUPnPd) is software which supports the
|
||||
UPnP Internet Gateway Device (IGD) specifications and the NAT Port
|
||||
Mapping Protocol (NAT-PMP).
|
||||
|
||||
UPnP-IGD and NAT-PMP are used to improve internet connectivity for
|
||||
devices behind a NAT router. Any peer to peer network application
|
||||
such as games, IM, etc. can benefit from a NAT router supporting
|
||||
UPnP and/or NAT-PMP.
|
||||
|
||||
Edit the config files before starting (including the .sh files)
|
||||
|
||||
This requires libiptc.
|
|
@ -0,0 +1,25 @@
|
|||
config() {
|
||||
NEW="$1"
|
||||
OLD="$(dirname $NEW)/$(basename $NEW .new)"
|
||||
# If there's no config file by that name, mv it over:
|
||||
if [ ! -r $OLD ]; then
|
||||
mv $NEW $OLD
|
||||
elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
|
||||
# toss the redundant copy
|
||||
rm $NEW
|
||||
fi
|
||||
# Otherwise, we leave the .new copy for the admin to consider...
|
||||
}
|
||||
|
||||
# Keep same perms on rc.miniupnpd.new:
|
||||
if [ -e etc/rc.d/rc.miniupnpd ]; then
|
||||
cp -a etc/rc.d/rc.miniupnpd etc/rc.d/rc.miniupnpd.new.incoming
|
||||
cat etc/rc.d/rc.miniupnpd.new > etc/rc.d/rc.miniupnpd.new.incoming
|
||||
mv etc/rc.d/rc.miniupnpd.new.incoming etc/rc.d/rc.miniupnpd.new
|
||||
fi
|
||||
|
||||
config etc/rc.d/rc.miniupnpd.new
|
||||
config etc/miniupnpd/miniupnpd.conf.new
|
||||
config etc/miniupnpd/iptables_init.sh.new
|
||||
config etc/miniupnpd/iptables_removeall.sh.new
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Slackware build script for miniupnpd
|
||||
|
||||
# Written by Pablo Oses <opablo@gmail.com>
|
||||
|
||||
PRGNAM=miniupnpd
|
||||
VERSION=${VERSION:-1.3}
|
||||
ARCH=${ARCH:-i486}
|
||||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-_SBo}
|
||||
|
||||
CWD=$(pwd)
|
||||
TMP=${TMP:-/tmp/SBo}
|
||||
PKG=$TMP/package-$PRGNAM
|
||||
OUTPUT=${OUTPUT:-/tmp}
|
||||
|
||||
if [ "$ARCH" = "i486" ]; then
|
||||
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "i686" ]; then
|
||||
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "x86_64" ]; then
|
||||
SLKCFLAGS="-O2 -fPIC"
|
||||
LIBDIRSUFFIX="64"
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
rm -rf $PKG
|
||||
mkdir -p $TMP $PKG $OUTPUT
|
||||
cd $TMP
|
||||
|
||||
rm -rf $PRGNAM-$VERSION
|
||||
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
|
||||
cd $PRGNAM-$VERSION
|
||||
chown -R root:root .
|
||||
find . \
|
||||
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
|
||||
-exec chmod 755 {} \; -o \
|
||||
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
||||
-exec chmod 644 {} \;
|
||||
|
||||
make -f Makefile.linux config.h
|
||||
|
||||
make CFLAGS+="$SLKCFLAGS" CXXFLAGS+="$SLKCFLAGS" -f Makefile.linux
|
||||
|
||||
PREFIX=$PKG make -f Makefile.linux install
|
||||
|
||||
# Replace the sample init script with a slackware compatible one
|
||||
rm -rf $PKG/etc/init.d
|
||||
mkdir -p $PKG/etc/rc.d
|
||||
cat $CWD/rc.miniupnpd > $PKG/etc/rc.d/rc.miniupnpd.new
|
||||
chmod 0755 $PKG/etc/rc.d/rc.miniupnpd.new
|
||||
|
||||
# Rename the sample config files adding '.new'
|
||||
for i in iptables_init.sh iptables_removeall.sh miniupnpd.conf ; do
|
||||
mv $PKG/etc/miniupnpd/${i} $PKG/etc/miniupnpd/${i}.new ;
|
||||
done
|
||||
|
||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cp -a \
|
||||
INSTALL LICENCE README \
|
||||
$PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
||||
|
||||
mkdir -p $PKG/install
|
||||
cat $CWD/doinst.sh > $PKG/install/doinst.sh
|
||||
cat $CWD/slack-desc > $PKG/install/slack-desc
|
||||
|
||||
cd $PKG
|
||||
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
|
|
@ -0,0 +1,8 @@
|
|||
PRGNAM="miniupnpd"
|
||||
VERSION="1.3"
|
||||
HOMEPAGE="http://miniupnp.free.fr"
|
||||
DOWNLOAD="http://miniupnp.free.fr/files/miniupnpd-1.3.tar.gz"
|
||||
MD5SUM="b5e70e80dcf45b424b8fe3c966bdc613"
|
||||
MAINTAINER="Pablo Oses"
|
||||
EMAIL="opablo@gmail.com"
|
||||
APPROVED="rworkman"
|
|
@ -0,0 +1,53 @@
|
|||
#!/bin/sh
|
||||
|
||||
# $Id: miniupnpd.init.d.script,v 1.2 2007/09/23 16:11:12 nanard Exp $
|
||||
# MiniUPnP project
|
||||
# author: Thomas Bernard
|
||||
# website: http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
|
||||
|
||||
# Re-created from scratch by the SlackBuild's author Pablo Oses <opablo@gmail.com>
|
||||
# using the simple service start/stop/restart script template
|
||||
|
||||
SERVICENAME="miniupnpd"
|
||||
CONFIGPATH=/etc/miniupnpd
|
||||
BINPATH=/usr/sbin
|
||||
|
||||
# Start service:
|
||||
start()
|
||||
{
|
||||
echo -n "Starting $SERVICENAME..."
|
||||
${CONFIGPATH}/iptables_init.sh > /dev/null 2>&1
|
||||
${BINPATH}/miniupnpd -f ${CONFIGPATH}/miniupnpd.conf
|
||||
echo
|
||||
}
|
||||
|
||||
# Stop service:
|
||||
stop()
|
||||
{
|
||||
echo -n "Stopping ${SERVICENAME}... "
|
||||
killall miniupnpd
|
||||
${CONFIGPATH}/iptables_removeall.sh > /dev/null 2>&1
|
||||
echo
|
||||
}
|
||||
|
||||
# Restart service:
|
||||
restart()
|
||||
{
|
||||
stop
|
||||
sleep 1
|
||||
start
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
'start')
|
||||
start
|
||||
;;
|
||||
'stop')
|
||||
stop
|
||||
;;
|
||||
'restart')
|
||||
restart
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 {start|stop|restart}"
|
||||
esac
|
|
@ -0,0 +1,19 @@
|
|||
# HOW TO EDIT THIS FILE:
|
||||
# The "handy ruler" below makes it easier to edit a package description. Line
|
||||
# up the first '|' above the ':' following the base package name, and the '|'
|
||||
# on the right side marks the last column you can put a character in. You must
|
||||
# make exactly 11 lines for the formatting to be correct. It's also
|
||||
# customary to leave one space after the ':'.
|
||||
|
||||
|-----handy-ruler------------------------------------------------------|
|
||||
miniupnpd: miniupnpd (UPnP-IGD and NAT-PMP daemon)
|
||||
miniupnpd:
|
||||
miniupnpd: The MiniUPnP daemon (MiniUPnPd) is a software which supports the
|
||||
miniupnpd: UPnP Internet Gateway Device (IGD) specificationsand the NAT Port
|
||||
miniupnpd: Mapping Protocol (NAT-PMP).
|
||||
miniupnpd:
|
||||
miniupnpd: UPnP-IGD and NAT-PMP are used to improve internet connectivity for
|
||||
miniupnpd: devices behind a NAT router. Any peer to peer network application
|
||||
miniupnpd: such as games, IM, etc. can benefit from a NAT router supporting
|
||||
miniupnpd: UPnP and/or NAT-PMP. Homepage: http://miniupnp.free.fr/
|
||||
miniupnpd:
|
Loading…
Reference in New Issue