aboutsummaryrefslogtreecommitdiff
path: root/network
diff options
context:
space:
mode:
Diffstat (limited to 'network')
-rw-r--r--network/gophernicus/Makefile.patch43
-rw-r--r--network/gophernicus/README11
-rw-r--r--network/gophernicus/doinst.sh14
-rw-r--r--network/gophernicus/gophernicus.SlackBuild82
-rw-r--r--network/gophernicus/gophernicus.info10
-rw-r--r--network/gophernicus/slack-desc19
6 files changed, 179 insertions, 0 deletions
diff --git a/network/gophernicus/Makefile.patch b/network/gophernicus/Makefile.patch
new file mode 100644
index 000000000000..b2a5db3e6d9c
--- /dev/null
+++ b/network/gophernicus/Makefile.patch
@@ -0,0 +1,43 @@
+--- Makefile.orig 2012-12-02 09:55:11.000000000 +0200
++++ Makefile 2012-12-10 13:05:11.000000000 +0200
+@@ -16,9 +16,9 @@
+ DOCS = LICENSE README INSTALL TODO ChangeLog README.Gophermap gophertag
+
+ INSTALL = PATH=$$PATH:/usr/sbin ./install-sh -o 0 -g 0
+-DESTDIR = /usr
+-SBINDIR = $(DESTDIR)/sbin
+-DOCDIR = $(DESTDIR)/share/doc/$(PACKAGE)
++DESTDIR =
++SBINDIR = $(DESTDIR)/usr/sbin
++DOCDIR = $(DESTDIR)/usr/doc/$(PACKAGE)-$(VERSION)
+
+ ROOT = /var/gopher
+ OSXROOT = /Library/GopherServer
+@@ -144,11 +144,9 @@
+ @echo
+
+ install-root:
+- if [ ! -d "$(ROOT)" ]; then \
+- mkdir -p $(ROOT); \
+- $(INSTALL) -m 644 $(MAP) $(ROOT); \
+- ln -s $(DOCDIR) $(ROOT)/docs; \
+- fi
++ mkdir -p $(DESTDIR)/$(ROOT)
++ $(INSTALL) -m 644 $(MAP) $(DESTDIR)/$(ROOT)
++ ln -s /usr/doc/$(PACKAGE)-$(VERSION) $(DESTDIR)/$(ROOT)/docs
+ @echo
+
+ install-inetd:
+@@ -166,10 +164,8 @@
+ @echo
+
+ install-xinetd:
+- if [ -d "$(XINETD)" -a ! -f "$(XINETD)/$(NAME)" ]; then \
+- sed -e "s/@HOSTNAME@/`hostname`/g" $(NAME).xinetd > $(XINETD)/$(NAME); \
+- [ -x /sbin/service ] && /sbin/service xinetd reload; \
+- fi
++ mkdir -p $(DESTDIR)/$(XINETD)
++ sed -e "s/@HOSTNAME@/`hostname`/g" $(NAME).xinetd > $(DESTDIR)/$(XINETD)/$(NAME).new
+ @echo
+
+ install-osx:
diff --git a/network/gophernicus/README b/network/gophernicus/README
new file mode 100644
index 000000000000..ce23ba448ab8
--- /dev/null
+++ b/network/gophernicus/README
@@ -0,0 +1,11 @@
+Gophernicus is a modern full-featured (and hopefully) secure gopher
+daemon for inetd.
+
+You may want to add this line to your /etc/inetd.conf and then restart
+or kill -HUP the inetd process:
+
+gopher stream tcp nowait nobody /usr/sbin/in.gophernicus in.gophernicus -h <your-hostname>
+
+Alternatively, gophernicus can be configured to run under xinetd.
+This is done automatically when xinetd is present on the system at
+the build time.
diff --git a/network/gophernicus/doinst.sh b/network/gophernicus/doinst.sh
new file mode 100644
index 000000000000..5d6518768398
--- /dev/null
+++ b/network/gophernicus/doinst.sh
@@ -0,0 +1,14 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ rm $NEW
+ fi
+}
+
+if [ -f etc/xinetd.d/gophernicus.new ]; then
+ config etc/xinetd.d/gophernicus.new
+fi
+
diff --git a/network/gophernicus/gophernicus.SlackBuild b/network/gophernicus/gophernicus.SlackBuild
new file mode 100644
index 000000000000..431fbff2e7e0
--- /dev/null
+++ b/network/gophernicus/gophernicus.SlackBuild
@@ -0,0 +1,82 @@
+#!/bin/bash
+
+# Slackware build script for Gophernicus
+
+# Copyright 2012 Fridrich von Stauffenberg <cancellor2@gmail.com>
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=gophernicus
+VERSION=${VERSION:-1.4}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+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"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+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 .
+
+patch -p0 < $CWD/Makefile.patch
+
+make CFLAGS="$SLKCFLAGS" -j1
+make install DESTDIR=$PKG
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+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.${PKGTYPE:-tgz}
diff --git a/network/gophernicus/gophernicus.info b/network/gophernicus/gophernicus.info
new file mode 100644
index 000000000000..b7bebbc68582
--- /dev/null
+++ b/network/gophernicus/gophernicus.info
@@ -0,0 +1,10 @@
+PRGNAM="gophernicus"
+VERSION="1.4"
+HOMEPAGE="gopher://gophernicus.org"
+DOWNLOAD="http://ponce.cc/slackware/sources/repo/gophernicus-1.4.tar.gz"
+MD5SUM="1c2a83071e3f978a082682f1e0fe65b6"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="Fridrich von Stauffenberg"
+EMAIL="cancellor2@gmail.com"
diff --git a/network/gophernicus/slack-desc b/network/gophernicus/slack-desc
new file mode 100644
index 000000000000..8e4ad30379cc
--- /dev/null
+++ b/network/gophernicus/slack-desc
@@ -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 ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+gophernicus: gophernicus (gopher server)
+gophernicus:
+gophernicus: Gophernicus is a modern full-featured (and hopefully) secure gopher
+gophernicus: daemon for inetd.
+gophernicus:
+gophernicus: Homepage: gopher://gophernicus.org
+gophernicus:
+gophernicus:
+gophernicus:
+gophernicus:
+gophernicus: