diff options
-rw-r--r-- | network/radvd/README | 29 | ||||
-rw-r--r-- | network/radvd/doinst.sh | 13 | ||||
-rw-r--r-- | network/radvd/radvd.SlackBuild | 48 | ||||
-rw-r--r-- | network/radvd/radvd.info | 10 | ||||
-rw-r--r-- | network/radvd/rc.radvd.new | 5 | ||||
-rw-r--r-- | network/radvd/slack-desc | 14 |
6 files changed, 67 insertions, 52 deletions
diff --git a/network/radvd/README b/network/radvd/README index 9dc84d056d..826dea2906 100644 --- a/network/radvd/README +++ b/network/radvd/README @@ -1,22 +1,19 @@ The router advertisement daemon (radvd) is run by Linux or BSD systems -acting as IPv6 routers. It sends Router Advertisement messages, -specified by RFC 2461, to a local Ethernet LAN periodically and when -requested by a node sending a Router Solicitation message. These -messages are required for IPv6 stateless autoconfiguration. +acting as IPv6 routers. It sends Router Advertisement messages, specified +by RFC 2461, to a local Ethernet LAN periodically and when requested by a +node sending a Router Solicitation message. These messages are required +for IPv6 stateless autoconfiguration. -Radvd is dependant upon IPv6 support in the Linux Kernel; this comes -enabled by default with Slackware 12's 'generic' kernel. To enable -IPv6 support manually, you must set the following entry in your -kernel's '.config' file and recompile: - CONFIG_IPV6=m +Radvd is dependant upon IPv6 support in the Linux Kernel; this comes enabled +by default with Slackware 13's generic and huge kernels. To enable IPv6 +support manually, you must set the following entry in your custom kernel's +.config file and recompile: CONFIG_IPV6=m -Once the Slackware package is installed, edit /etc/radvd.conf to -reflect your current IPv6 configuration. - -An init script has been provided at /etc/rc.d/rc.radvd. -To have radvd start at each boot, add the following lines to your -/etc/rc.d/rc.local file: - # Start the radvd daemon: +Once the slackware package is installed, edit /etc/radvd.conf to reflect +your current IPv6 configuration. An init script has been provided at +/etc/rc.d/rc.radvd. To have this start upon each boot, add the following +lines to your /etc/rc.d/rc.local file: + ## Start the radvd daemon: if [ -x /etc/rc.d/rc.radvd ]; then /etc/rc.d/rc.radvd start fi diff --git a/network/radvd/doinst.sh b/network/radvd/doinst.sh index d3f1e88aaa..0404cf4884 100644 --- a/network/radvd/doinst.sh +++ b/network/radvd/doinst.sh @@ -1,12 +1,11 @@ -#!/bin/sh - 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 + 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... @@ -19,5 +18,13 @@ if [ -e etc/rc.d/rc.radvd ]; then mv etc/rc.d/rc.radvd.new.incoming etc/rc.d/rc.radvd.new fi +# Keep same perms on radvd.conf.new: +if [ -e etc/radvd.conf ]; then + cp -a etc/radvd.conf etc/radvd.conf.new.incoming + cat etc/radvd.conf.new > etc/radvd.conf.new.incoming + mv etc/radvd.conf.new.incoming etc/radvd.conf.new +fi + config etc/rc.d/rc.radvd.new config etc/radvd.conf.new + diff --git a/network/radvd/radvd.SlackBuild b/network/radvd/radvd.SlackBuild index 2a724363ea..fbb0f31e90 100644 --- a/network/radvd/radvd.SlackBuild +++ b/network/radvd/radvd.SlackBuild @@ -23,7 +23,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=radvd -VERSION=1.0 +VERSION=1.5 ARCH=${ARCH:-i486} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -34,16 +34,23 @@ PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then - SLKCFLAGS="-O2 -march=i686 -mtune=i686" -fi + 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 || exit 1 +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz cd $PRGNAM-$VERSION chown -R root:root . chmod -R u+w,go+r-w,a-s . @@ -52,37 +59,40 @@ CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ --with-configfile=/etc/radvd.conf \ - --with-pidfile=/var/run/radvd/radvd.pid + --with-pidfile=/var/run/radvd/radvd.pid \ + --build=$ARCH-slackware-linux -make all || exit 1 -make install DESTDIR=$PKG || exit 1 +make all +make install DESTDIR=$PKG ( cd $PKG - find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null - find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null - find . | xargs file | grep "current ar archive" | cut -f 1 -d : | xargs strip --strip-debug 2> /dev/null + find . -exec file {} + | sed -n '/ELF.*executable\|shared object/s/:.*$//p' | \ + xargs strip --strip-unneeded 2> /dev/null || true + find . -exec file {} + | sed -n '/current ar archive/s/:.*$//p' | \ + xargs strip --strip-debug 2> /dev/null || true ) ( cd $PKG/usr/man find . -type f -exec gzip -9 {} \; ) +mkdir -p $PKG/etc/rc.d +install -D -m 0755 $CWD/rc.radvd.new $PKG/etc/rc.d/rc.radvd.new +mv $TMP/$PRGNAM-$VERSION/radvd.conf.example $PKG/etc/radvd.conf.new + +mkdir -p $PKG/var/run/radvd +chown -R daemon:daemon $PKG/var/run/radvd + mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a CHANGES COPYRIGHT INTRO.html README TODO VERSION \ $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild -mkdir -p $PKG/etc/rc.d -install -m 0755 $CWD/rc.radvd.new $PKG/etc/rc.d/rc.radvd.new -mv $TMP/$PRGNAM-$VERSION/radvd.conf.example $PKG/etc/radvd.conf.new - -mkdir -p $PKG/var/run/radvd/ -chown daemon:daemon $PKG/var/run/radvd/ - mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/network/radvd/radvd.info b/network/radvd/radvd.info index 6e12569710..8bd3f116ba 100644 --- a/network/radvd/radvd.info +++ b/network/radvd/radvd.info @@ -1,8 +1,10 @@ PRGNAM="radvd" -VERSION="1.0" +VERSION="1.5" HOMEPAGE="http://www.litech.org/radvd" -DOWNLOAD="http://www.litech.org/radvd/dist/radvd-1.0.tar.gz" -MD5SUM="8bce4a21757cf069f5a69e2f9bee9e5b" +DOWNLOAD="http://www.litech.org/radvd/dist/radvd-1.5.tar.gz" +MD5SUM="78598b60ed9d64920739189c3dc0934d" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" MAINTAINER="Sean Donner" -EMAIL="sean.donner@sbcglobal.net" +EMAIL="sean.donner@gmail.com" APPROVED="rworkman" diff --git a/network/radvd/rc.radvd.new b/network/radvd/rc.radvd.new index 617a82b543..9fbc597893 100644 --- a/network/radvd/rc.radvd.new +++ b/network/radvd/rc.radvd.new @@ -3,10 +3,9 @@ # /etc/rc.d/rc.radvd # # Start/stop/restart the radvd daemon. -# if ! [ -f /proc/net/if_inet6 ]; then - echo "IPv6 support not found; exiting..." + echo "IPv6 support not found, exiting" exit 1 fi @@ -20,7 +19,6 @@ radvd_start() { radvd_stop() { /bin/kill $(cat /var/run/radvd/radvd.pid) - rm -f /var/run/radvd/radvd.pid } radvd_restart() { @@ -42,3 +40,4 @@ case "$1" in *) echo "usage $0 start|stop|restart" esac + diff --git a/network/radvd/slack-desc b/network/radvd/slack-desc index c032d8df60..66dd6fcc0f 100644 --- a/network/radvd/slack-desc +++ b/network/radvd/slack-desc @@ -5,15 +5,15 @@ # make exactly 11 lines for the formatting to be correct. It's also # customary to leave one space after the ':'. - |-----handy-ruler------------------------------------------------------| -radvd: Linux IPv6 Router Advertisement Daemon (radvd) -radvd: + |-----handy-ruler------------------------------------------------------| +radvd: radvd (Linux IPv6 Router Advertisement Daemon) +radvd: radvd: The router advertisement daemon (radvd) is run by Linux or BSD systems radvd: acting as IPv6 routers. It sends Router Advertisement messages, radvd: specified by RFC 2461, to a local Ethernet LAN periodically and when radvd: requested by a node sending a Router Solicitation message. These radvd: messages are required for IPv6 stateless autoconfiguration. -radvd: -radvd: -radvd: -radvd: +radvd: +radvd: +radvd: +radvd: |