summaryrefslogtreecommitdiff
path: root/net/pygopherd
diff options
context:
space:
mode:
Diffstat (limited to 'net/pygopherd')
-rw-r--r--net/pygopherd/DESCR9
-rw-r--r--net/pygopherd/Makefile74
-rw-r--r--net/pygopherd/PLIST136
-rw-r--r--net/pygopherd/distinfo8
-rw-r--r--net/pygopherd/files/pygopherd.sh41
-rw-r--r--net/pygopherd/patches/patch-aa13
-rw-r--r--net/pygopherd/patches/patch-ab13
-rw-r--r--net/pygopherd/patches/patch-ac13
-rw-r--r--net/pygopherd/patches/patch-ad13
9 files changed, 320 insertions, 0 deletions
diff --git a/net/pygopherd/DESCR b/net/pygopherd/DESCR
new file mode 100644
index 00000000000..462ec680499
--- /dev/null
+++ b/net/pygopherd/DESCR
@@ -0,0 +1,9 @@
+This is an all-new, modern Gopher server. It can serve documents
+with Gopher+, standard Gopher (RFC1436), and HTTP -- all on the same
+port. Pygopherd features a modular extension system as well as
+loadable scripts and much more. It contains full support for
+UMN gopherd systems -- including .Links, .names, .cap, searches, etc.
+Pygopherd also supports Bucktooth features such as gophermap files
+and executables. In addition to all this, there are Pygopherd's own
+extra features. All features are fully customizable and can be enabled
+or disabled by editing /etc/pygopherd/pygopherd.conf.
diff --git a/net/pygopherd/Makefile b/net/pygopherd/Makefile
new file mode 100644
index 00000000000..861588d5309
--- /dev/null
+++ b/net/pygopherd/Makefile
@@ -0,0 +1,74 @@
+# $NetBSD: Makefile,v 1.1.1.1 2003/09/30 17:27:29 recht Exp $
+#
+
+DISTNAME= pygopherd_2.0.3
+PKGNAME= ${DISTNAME:S/_/-/}
+CATEGORIES= net
+MASTER_SITES= http://gopher.quux.org:70/devel/gopher/Downloads/pygopherd/
+
+MAINTAINER= recht@NetBSD.org
+HOMEPAGE= http://gopher.quux.org:70/devel/gopher/pygopherd/
+COMMENT= Gopher server
+
+USE_BUILDLINK2= yes
+USE_PKGINSTALL= yes
+PYDISTUTILSPKG= yes
+PY_PATCHPLIST= yes
+
+PKG_SYSCONFSUBDIR= pygopherd
+EXAMPLEDIR= ${PREFIX}/share/examples/pygopherd
+RUNTIMEDIR= /var/gopher
+
+GOPHER_USER= gopher
+GOPHER_GROUP= gopher
+PKG_GROUPS= ${GOPHER_GROUP}
+PKG_USERS= ${GOPHER_USER}:${GOPHER_GROUP}
+OWN_DIRS_PERMS= ${RUNTIMEDIR} ${GOPHER_USER} ${GOPHER_GROUP} 0750
+
+CONF_FILES= ${EXAMPLEDIR}/pygopherd.conf ${PKG_SYSCONFDIR}/pygopherd.conf
+CONF_FILES+= ${EXAMPLEDIR}/mime.types ${PKG_SYSCONFDIR}/mime.types
+EGFILES= ${WRKSRC}/examples/gophermap
+EGFILES+= ${WRKSRC}/conf/mime.types
+EGFILES+= ${WRKSRC}/conf/pygopherd.conf
+SEDFILES= ${WRKSRC}/setup.py ${WRKSRC}/bin/pygopherd
+SEDFILES+= ${WRKSRC}/conf/pygopherd.conf ${WRKSRC}/pygopherd.8
+
+RCD_SCRIPTS= pygopherd
+FILES_SUBST+= RUNTIMEDIR=${RUNTIMEDIR}
+FILES_SUBST+= PYTHONBIN=${PYTHONBIN}
+
+PYTHON_PATCH_SCRIPTS= bin/pygopherd
+PYTHON_PATCH_SCRIPTS+= pygopherd/GopherExceptionsTest.py
+PYTHON_PATCH_SCRIPTS+= pygopherd/fileextTest.py
+PYTHON_PATCH_SCRIPTS+= pygopherd/gopherentryTest.py
+PYTHON_PATCH_SCRIPTS+= pygopherd/initializationTest.py
+PYTHON_PATCH_SCRIPTS+= pygopherd/testutil.py
+
+PYTHON_VERSIONS_ACCEPTED= 23 23pth 22 22pth
+
+# XXX this is needed for the RCD script
+post-extract:
+ ${MV} ${WRKDIR}/pygopherd ${WRKDIR}/pygopherd_2.0.3
+
+post-patch:
+ for sedfile in ${SEDFILES}; do \
+ ${MV} $$sedfile $$sedfile.sed; \
+ ${SED} -e "s|%%PREFIX%%|${PREFIX}|g" \
+ -e "s|%%EXAMPLEDIR%%|${EXAMPLEDIR}|g" \
+ $$sedfile.sed > $$sedfile; \
+ done
+ for pyfile in ${PYSED}; do\
+ ${MV} $$pyfile $$pyfile.sed; \
+ ${SED} -e "s|/usr/bin/python2.2|${PYTHONBIN}|g" \
+ $$pyfile.sed > $$pyfile; \
+ done
+
+post-install:
+ ${INSTALL_DATA_DIR} ${EXAMPLEDIR}
+ for egfile in ${EGFILES}; do \
+ ${INSTALL_DATA} $$egfile ${EXAMPLEDIR}; \
+ done
+ ${INSTALL_MAN} ${WRKSRC}/pygopherd.8 ${PREFIX}/man/man8
+
+.include "../../lang/python/extension.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/net/pygopherd/PLIST b/net/pygopherd/PLIST
new file mode 100644
index 00000000000..f0fbcd7b476
--- /dev/null
+++ b/net/pygopherd/PLIST
@@ -0,0 +1,136 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2003/09/30 17:27:28 recht Exp $
+bin/pygopherd
+${PYSITELIB}/pygopherd/GopherExceptions.py
+${PYSITELIB}/pygopherd/GopherExceptions.pyc
+${PYSITELIB}/pygopherd/GopherExceptions.pyo
+${PYSITELIB}/pygopherd/GopherExceptionsTest.py
+${PYSITELIB}/pygopherd/GopherExceptionsTest.pyc
+${PYSITELIB}/pygopherd/GopherExceptionsTest.pyo
+${PYSITELIB}/pygopherd/__init__.py
+${PYSITELIB}/pygopherd/__init__.pyc
+${PYSITELIB}/pygopherd/__init__.pyo
+${PYSITELIB}/pygopherd/fileext.py
+${PYSITELIB}/pygopherd/fileext.pyc
+${PYSITELIB}/pygopherd/fileext.pyo
+${PYSITELIB}/pygopherd/fileextTest.py
+${PYSITELIB}/pygopherd/fileextTest.pyc
+${PYSITELIB}/pygopherd/fileextTest.pyo
+${PYSITELIB}/pygopherd/gopherentry.py
+${PYSITELIB}/pygopherd/gopherentry.pyc
+${PYSITELIB}/pygopherd/gopherentry.pyo
+${PYSITELIB}/pygopherd/gopherentryTest.py
+${PYSITELIB}/pygopherd/gopherentryTest.pyc
+${PYSITELIB}/pygopherd/gopherentryTest.pyo
+${PYSITELIB}/pygopherd/handlers/HandlerMultiplexer.py
+${PYSITELIB}/pygopherd/handlers/HandlerMultiplexer.pyc
+${PYSITELIB}/pygopherd/handlers/HandlerMultiplexer.pyo
+${PYSITELIB}/pygopherd/handlers/UMN.py
+${PYSITELIB}/pygopherd/handlers/UMN.pyc
+${PYSITELIB}/pygopherd/handlers/UMN.pyo
+${PYSITELIB}/pygopherd/handlers/ZIP.py
+${PYSITELIB}/pygopherd/handlers/ZIP.pyc
+${PYSITELIB}/pygopherd/handlers/ZIP.pyo
+${PYSITELIB}/pygopherd/handlers/__init__.py
+${PYSITELIB}/pygopherd/handlers/__init__.pyc
+${PYSITELIB}/pygopherd/handlers/__init__.pyo
+${PYSITELIB}/pygopherd/handlers/base.py
+${PYSITELIB}/pygopherd/handlers/base.pyc
+${PYSITELIB}/pygopherd/handlers/base.pyo
+${PYSITELIB}/pygopherd/handlers/dir.py
+${PYSITELIB}/pygopherd/handlers/dir.pyc
+${PYSITELIB}/pygopherd/handlers/dir.pyo
+${PYSITELIB}/pygopherd/handlers/file.py
+${PYSITELIB}/pygopherd/handlers/file.pyc
+${PYSITELIB}/pygopherd/handlers/file.pyo
+${PYSITELIB}/pygopherd/handlers/gophermap.py
+${PYSITELIB}/pygopherd/handlers/gophermap.pyc
+${PYSITELIB}/pygopherd/handlers/gophermap.pyo
+${PYSITELIB}/pygopherd/handlers/html.py
+${PYSITELIB}/pygopherd/handlers/html.pyc
+${PYSITELIB}/pygopherd/handlers/html.pyo
+${PYSITELIB}/pygopherd/handlers/mbox.py
+${PYSITELIB}/pygopherd/handlers/mbox.pyc
+${PYSITELIB}/pygopherd/handlers/mbox.pyo
+${PYSITELIB}/pygopherd/handlers/pyg.py
+${PYSITELIB}/pygopherd/handlers/pyg.pyc
+${PYSITELIB}/pygopherd/handlers/pyg.pyo
+${PYSITELIB}/pygopherd/handlers/scriptexec.py
+${PYSITELIB}/pygopherd/handlers/scriptexec.pyc
+${PYSITELIB}/pygopherd/handlers/scriptexec.pyo
+${PYSITELIB}/pygopherd/handlers/url.py
+${PYSITELIB}/pygopherd/handlers/url.pyc
+${PYSITELIB}/pygopherd/handlers/url.pyo
+${PYSITELIB}/pygopherd/handlers/virtual.py
+${PYSITELIB}/pygopherd/handlers/virtual.pyc
+${PYSITELIB}/pygopherd/handlers/virtual.pyo
+${PYSITELIB}/pygopherd/initialization.py
+${PYSITELIB}/pygopherd/initialization.pyc
+${PYSITELIB}/pygopherd/initialization.pyo
+${PYSITELIB}/pygopherd/initializationTest.py
+${PYSITELIB}/pygopherd/initializationTest.pyc
+${PYSITELIB}/pygopherd/initializationTest.pyo
+${PYSITELIB}/pygopherd/logger.py
+${PYSITELIB}/pygopherd/logger.pyc
+${PYSITELIB}/pygopherd/logger.pyo
+${PYSITELIB}/pygopherd/loggerTest.py
+${PYSITELIB}/pygopherd/loggerTest.pyc
+${PYSITELIB}/pygopherd/loggerTest.pyo
+${PYSITELIB}/pygopherd/pipe.py
+${PYSITELIB}/pygopherd/pipe.pyc
+${PYSITELIB}/pygopherd/pipe.pyo
+${PYSITELIB}/pygopherd/pipeTest.py
+${PYSITELIB}/pygopherd/pipeTest.pyc
+${PYSITELIB}/pygopherd/pipeTest.pyo
+${PYSITELIB}/pygopherd/protocols/ProtocolMultiplexer.py
+${PYSITELIB}/pygopherd/protocols/ProtocolMultiplexer.pyc
+${PYSITELIB}/pygopherd/protocols/ProtocolMultiplexer.pyo
+${PYSITELIB}/pygopherd/protocols/ProtocolMultiplexerTest.py
+${PYSITELIB}/pygopherd/protocols/ProtocolMultiplexerTest.pyc
+${PYSITELIB}/pygopherd/protocols/ProtocolMultiplexerTest.pyo
+${PYSITELIB}/pygopherd/protocols/__init__.py
+${PYSITELIB}/pygopherd/protocols/__init__.pyc
+${PYSITELIB}/pygopherd/protocols/__init__.pyo
+${PYSITELIB}/pygopherd/protocols/base.py
+${PYSITELIB}/pygopherd/protocols/base.pyc
+${PYSITELIB}/pygopherd/protocols/base.pyo
+${PYSITELIB}/pygopherd/protocols/baseTest.py
+${PYSITELIB}/pygopherd/protocols/baseTest.pyc
+${PYSITELIB}/pygopherd/protocols/baseTest.pyo
+${PYSITELIB}/pygopherd/protocols/enhanced.py
+${PYSITELIB}/pygopherd/protocols/enhanced.pyc
+${PYSITELIB}/pygopherd/protocols/enhanced.pyo
+${PYSITELIB}/pygopherd/protocols/gopherp.py
+${PYSITELIB}/pygopherd/protocols/gopherp.pyc
+${PYSITELIB}/pygopherd/protocols/gopherp.pyo
+${PYSITELIB}/pygopherd/protocols/http.py
+${PYSITELIB}/pygopherd/protocols/http.pyc
+${PYSITELIB}/pygopherd/protocols/http.pyo
+${PYSITELIB}/pygopherd/protocols/rfc1436.py
+${PYSITELIB}/pygopherd/protocols/rfc1436.pyc
+${PYSITELIB}/pygopherd/protocols/rfc1436.pyo
+${PYSITELIB}/pygopherd/protocols/rfc1436Test.py
+${PYSITELIB}/pygopherd/protocols/rfc1436Test.pyc
+${PYSITELIB}/pygopherd/protocols/rfc1436Test.pyo
+${PYSITELIB}/pygopherd/protocols/wap.py
+${PYSITELIB}/pygopherd/protocols/wap.pyc
+${PYSITELIB}/pygopherd/protocols/wap.pyo
+${PYSITELIB}/pygopherd/sighandlers.py
+${PYSITELIB}/pygopherd/sighandlers.pyc
+${PYSITELIB}/pygopherd/sighandlers.pyo
+${PYSITELIB}/pygopherd/testutil.py
+${PYSITELIB}/pygopherd/testutil.pyc
+${PYSITELIB}/pygopherd/testutil.pyo
+${PYSITELIB}/pygopherd/version.py
+${PYSITELIB}/pygopherd/version.pyc
+${PYSITELIB}/pygopherd/version.pyo
+${PYSITELIB}/pygopherd/zipfile.py
+${PYSITELIB}/pygopherd/zipfile.pyc
+${PYSITELIB}/pygopherd/zipfile.pyo
+man/man8/pygopherd.8
+share/examples/pygopherd/gophermap
+share/examples/pygopherd/mime.types
+share/examples/pygopherd/pygopherd.conf
+@dirrm share/examples/pygopherd
+@dirrm ${PYSITELIB}/pygopherd/protocols
+@dirrm ${PYSITELIB}/pygopherd/handlers
+@dirrm ${PYSITELIB}/pygopherd
diff --git a/net/pygopherd/distinfo b/net/pygopherd/distinfo
new file mode 100644
index 00000000000..8ab5ec46ebb
--- /dev/null
+++ b/net/pygopherd/distinfo
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.1.1.1 2003/09/30 17:27:28 recht Exp $
+
+SHA1 (pygopherd_2.0.3.tar.gz) = bf7d1247d86e8466091bded0de337eba54a3613d
+Size (pygopherd_2.0.3.tar.gz) = 429559 bytes
+SHA1 (patch-aa) = c6843f58f104fa93454f152c7b077d28b2d6f5ad
+SHA1 (patch-ab) = 3e7fe3cb4db5eabd99c910eb1d9f61654d48063b
+SHA1 (patch-ac) = 5dcb518e8405f57877dcc7d5f1d894f61a351432
+SHA1 (patch-ad) = 09fab9dae45edf043483cb8f7314cc946683674d
diff --git a/net/pygopherd/files/pygopherd.sh b/net/pygopherd/files/pygopherd.sh
new file mode 100644
index 00000000000..3390299ebd7
--- /dev/null
+++ b/net/pygopherd/files/pygopherd.sh
@@ -0,0 +1,41 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: pygopherd.sh,v 1.1.1.1 2003/09/30 17:27:30 recht Exp $
+#
+# PROVIDE: pygopherd
+# REQUIRE: DAEMON
+#
+# To start spread at startup, copy this script to /etc/rc.d and set
+# spread=YES in /etc/rc.conf.
+#
+# Addtionally you may set spread_log to a file where to log stuff.
+
+if [ -f /etc/rc.subr ]; then
+ . /etc/rc.subr
+fi
+
+rcd_dir=`@DIRNAME@ $0`
+
+name="pygopherd"
+rcvar=$name
+command="@PREFIX@/bin/${name}"
+command_interpreter="@PYTHONBIN@"
+pidfile="/var/run/${name}.pid"
+conf_file="@PKG_SYSCONFDIR@/${name}.conf"
+mime_file="@PKG_SYSCONFDIR@/mime.types"
+required_files="${conf_file} ${mime_file}"
+
+start_precmd="${name}_precmd"
+
+pygopherd_precmd()
+{
+ if [ ! -d @RUNTIMEDIR@ ]
+ then
+ @MKDIR@ @RUNTIMEDIR@
+ @CHMOD@ 0750 @RUNTIMEDIR@
+ @CHOWN@ @PKG_USERS@ @RUNTIMEDIR@
+ fi
+}
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/net/pygopherd/patches/patch-aa b/net/pygopherd/patches/patch-aa
new file mode 100644
index 00000000000..2f372f5f02d
--- /dev/null
+++ b/net/pygopherd/patches/patch-aa
@@ -0,0 +1,13 @@
+$NetBSD: patch-aa,v 1.1.1.1 2003/09/30 17:27:29 recht Exp $
+
+--- bin/pygopherd.orig 2003-08-23 18:31:54.000000000 +0200
++++ bin/pygopherd 2003-08-28 20:39:34.000000000 +0200
+@@ -23,7 +23,7 @@
+ from pygopherd import *
+ import sys
+
+-conffile = '/etc/pygopherd/pygopherd.conf'
++conffile = '%%PREFIX%%/etc/pygopherd/pygopherd.conf'
+ if len(sys.argv) > 1:
+ conffile = sys.argv[1]
+
diff --git a/net/pygopherd/patches/patch-ab b/net/pygopherd/patches/patch-ab
new file mode 100644
index 00000000000..87315d50970
--- /dev/null
+++ b/net/pygopherd/patches/patch-ab
@@ -0,0 +1,13 @@
+$NetBSD: patch-ab,v 1.1.1.1 2003/09/30 17:27:29 recht Exp $
+
+--- pygopherd.8.orig 2003-08-23 18:31:53.000000000 +0200
++++ pygopherd.8 2003-08-28 20:40:02.000000000 +0200
+@@ -188,7 +188,7 @@
+ .B python2.2.
+
+ Next, proceed to configuration. Make sure that the
+-\fI/etc/pygopherd/pygopherd.conf\fP file names valid users
++\fI%%PREFIX%%/etc/pygopherd/pygopherd.conf\fP file names valid users
+ (\fBsetuid\fP and \fBsetgid\fP options) and a valid document root
+ (\fBroot\fP option).
+
diff --git a/net/pygopherd/patches/patch-ac b/net/pygopherd/patches/patch-ac
new file mode 100644
index 00000000000..8384e8db80a
--- /dev/null
+++ b/net/pygopherd/patches/patch-ac
@@ -0,0 +1,13 @@
+$NetBSD: patch-ac,v 1.1.1.1 2003/09/30 17:27:30 recht Exp $
+
+--- conf/pygopherd.conf.orig 2003-08-23 23:31:03.000000000 +0200
++++ conf/pygopherd.conf 2003-08-28 20:40:35.000000000 +0200
+@@ -119,7 +119,7 @@
+ # specify multiple files here -- just separate them with a colon.
+ # ALL of them that are found will be read.
+
+-mimetypes = ./conf/mime.types:/etc/pygopherd/mime.types:/etc/mime.types
++mimetypes = ./conf/mime.types:%%PREFIX%%/etc/pygopherd/mime.types:/etc/mime.types
+
+ # Encodings. You can use the default with the following syntax. The
+ # mimetypex.encodings_map is {'.Z': 'compress', '.gz': 'gzip'}.
diff --git a/net/pygopherd/patches/patch-ad b/net/pygopherd/patches/patch-ad
new file mode 100644
index 00000000000..c9e2a41933b
--- /dev/null
+++ b/net/pygopherd/patches/patch-ad
@@ -0,0 +1,13 @@
+$NetBSD: patch-ad,v 1.1.1.1 2003/09/30 17:27:30 recht Exp $
+
+--- setup.py.orig 2003-08-23 18:31:00.000000000 +0200
++++ setup.py 2003-08-28 20:40:53.000000000 +0200
+@@ -33,7 +33,7 @@
+ url = pygopherd.version.homepage,
+ packages = ['pygopherd', 'pygopherd.handlers', 'pygopherd.protocols'],
+ scripts = ['bin/pygopherd'],
+- data_files = [ ('/etc/pygopherd', ['conf/pygopherd.conf',
++ data_files = [ ('%%EXAMPLEDIR%%', ['conf/pygopherd.conf',
+ 'conf/mime.types'] ) ],
+ license = pygopherd.version.license
+ )