network/gophernicus: Added (gopher server).

Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
This commit is contained in:
Fridrich von Stauffenberg 2012-12-10 12:36:50 +01:00 committed by dsomero
parent 84fdbc0222
commit a842d4dcdb
6 changed files with 179 additions and 0 deletions

View file

@ -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:

View file

@ -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.

View file

@ -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

View file

@ -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}

View file

@ -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"

View file

@ -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: