diff options
author | minskim <minskim@pkgsrc.org> | 2005-10-26 03:42:21 +0000 |
---|---|---|
committer | minskim <minskim@pkgsrc.org> | 2005-10-26 03:42:21 +0000 |
commit | 8af12edfe41dd9fbbc0c1821c20b2a8589d6c6a0 (patch) | |
tree | bb218b970da484ffb9145062ecffec3f23c7840b /net/gofish | |
parent | 39f4626700bb4b60135a4e6e3cc8aaeb298f7101 (diff) | |
download | pkgsrc-8af12edfe41dd9fbbc0c1821c20b2a8589d6c6a0.tar.gz |
Import gofish from pkgsrc-wip. Packaged by Emil Skoeldberg.
Gopher server that also acts as http server and gopher to http gateway.
Diffstat (limited to 'net/gofish')
-rw-r--r-- | net/gofish/DESCR | 1 | ||||
-rw-r--r-- | net/gofish/Makefile | 53 | ||||
-rw-r--r-- | net/gofish/PLIST | 18 | ||||
-rw-r--r-- | net/gofish/distinfo | 9 | ||||
-rw-r--r-- | net/gofish/files/gopherd.sh | 21 | ||||
-rw-r--r-- | net/gofish/patches/patch-aa | 63 | ||||
-rw-r--r-- | net/gofish/patches/patch-ab | 14 | ||||
-rw-r--r-- | net/gofish/patches/patch-ac | 114 | ||||
-rw-r--r-- | net/gofish/patches/patch-ad | 14 |
9 files changed, 307 insertions, 0 deletions
diff --git a/net/gofish/DESCR b/net/gofish/DESCR new file mode 100644 index 00000000000..d49cc377f7c --- /dev/null +++ b/net/gofish/DESCR @@ -0,0 +1 @@ +Gopher server that also acts as http server and gopher to http gateway. diff --git a/net/gofish/Makefile b/net/gofish/Makefile new file mode 100644 index 00000000000..017718dcb9c --- /dev/null +++ b/net/gofish/Makefile @@ -0,0 +1,53 @@ +# $NetBSD: Makefile,v 1.1.1.1 2005/10/26 03:42:21 minskim Exp $ + +DISTNAME= gofish-1.0 +CATEGORIES= net +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=gofish/} + +MAINTAINER= emil@math.su.se +HOMEPAGE= http://gofish.sourceforge.net/ +COMMENT= Gopher server + +WRKSRC= ${WRKDIR}/gofish +USE_PKGLOCALEDIR= yes +GNU_CONFIGURE= yes +USE_PKGINSTALL= yes + +CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR} \ + --localstatedir=${VARBASE} + +EGDIR= ${PREFIX}/share/examples/gofish +RUNTIMEDIR= ${VARBASE}/gopher + +GOPHER_USER= gopher +GOPHER_GROUP= gopher +GOPHER_UID= 30 +GOPHER_GID= 30 +PKG_GROUPS= ${GOPHER_GROUP}:${GOPHER_GID} +PKG_USERS= ${GOPHER_USER}:${GOPHER_GROUP}:${GOPHER_UID} +OWN_DIRS_PERMS= ${RUNTIMEDIR} ${GOPHER_USER} ${GOPHER_GROUP} 0750 + +RCD_SCRIPTS= gopherd + +CONF_FILES= ${EGDIR}/gofish.conf ${PKG_SYSCONFDIR}/gofish.conf \ + ${EGDIR}/gofish-www.conf ${PKG_SYSCONFDIR}/gofish-www.conf + +FILES_SUBST+= RUNTIMEDIR=${RUNTIMEDIR} +FILES_SUBST+= PKG_USERS=${PKG_USERS} + +post-configure: + ${MV} ${WRKSRC}/gofish.conf ${WRKSRC}/gofish.conf.orig + ${SED} -e "s/;uid = -1/uid = ${GOPHER_UID}/g" \ + -e "s/;gid = -1/gid = ${GOPHER_GID}/g" \ + ${WRKSRC}/gofish.conf.orig \ + > ${WRKSRC}/gofish.conf + + +post-install: + ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/gofish + ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/gofish + ${INSTALL_DATA} ${WRKSRC}/gofish.conf ${EGDIR} + ${INSTALL_DATA} ${WRKSRC}/gofish-www.conf ${EGDIR} + ${INSTALL_DATA} ${WRKSRC}/Configure_GoFish ${PREFIX}/share/doc/gofish + +.include "../../mk/bsd.pkg.mk" diff --git a/net/gofish/PLIST b/net/gofish/PLIST new file mode 100644 index 00000000000..3c4d3b3989e --- /dev/null +++ b/net/gofish/PLIST @@ -0,0 +1,18 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2005/10/26 03:42:21 minskim Exp $ +bin/check-files +bin/gmap2cache +bin/mkcache +man/man1/gmap2cache.1 +man/man1/gofish.1 +man/man1/gopherd.1 +man/man1/mkcache.1 +man/man5/dotcache.5 +man/man5/gofish.5 +sbin/gofish +sbin/gopherd +share/doc/gofish/Configure_GoFish +share/examples/gofish/gofish-www.conf +share/examples/gofish/gofish.conf +share/examples/rc.d/gopherd +@dirrm share/examples/gofish +@dirrm share/doc/gofish diff --git a/net/gofish/distinfo b/net/gofish/distinfo new file mode 100644 index 00000000000..942dab977ee --- /dev/null +++ b/net/gofish/distinfo @@ -0,0 +1,9 @@ +$NetBSD: distinfo,v 1.1.1.1 2005/10/26 03:42:21 minskim Exp $ + +SHA1 (gofish-1.0.tar.gz) = 7581acb68e1facf0619c4ab0759f0743ab7479aa +RMD160 (gofish-1.0.tar.gz) = 0b4ebc1cf639a4aa8cae83a00becbc5877ddb9e6 +Size (gofish-1.0.tar.gz) = 141992 bytes +SHA1 (patch-aa) = f2fb96c12b65e00933a0e70b7299ebd16d53b73f +SHA1 (patch-ab) = 1520fc6b28c5dd2f11adbcb3a20cd56f4854c858 +SHA1 (patch-ac) = a0f4b84b2656695b09a0a6e771b11e713ee2e030 +SHA1 (patch-ad) = cf6d1502fada48bbede3d87e35fd335d6f6bcbb4 diff --git a/net/gofish/files/gopherd.sh b/net/gofish/files/gopherd.sh new file mode 100644 index 00000000000..c6f17a91690 --- /dev/null +++ b/net/gofish/files/gopherd.sh @@ -0,0 +1,21 @@ +#!@RCD_SCRIPTS_SHELL@ +# +# $NetBSD: gopherd.sh,v 1.1.1.1 2005/10/26 03:42:21 minskim Exp $ +# +# PROVIDE: gopherd +# REQUIRE: DAEMON + +. /etc/rc.subr + +name="gofish" +rcvar="$gopherd" +command="@PREFIX@/sbin/$name" +conf_file="@PKG_SYSCONFDIR@/${name}.conf" +command_args="-d ${conf_file}" +pidfile="/var/run/${name}.pid" +required_files="${conf_file}" + +# start_precmd="${name}_precmd" + +load_rc_config $name +run_rc_command "$1" diff --git a/net/gofish/patches/patch-aa b/net/gofish/patches/patch-aa new file mode 100644 index 00000000000..4960fcb21ed --- /dev/null +++ b/net/gofish/patches/patch-aa @@ -0,0 +1,63 @@ +$NetBSD: patch-aa,v 1.1.1.1 2005/10/26 03:42:21 minskim Exp $ + +--- Makefile.in.orig 2004-12-09 03:59:10.000000000 +0000 ++++ Makefile.in +@@ -636,7 +636,7 @@ info: info-am + + info-am: + +-install-data-am: install-data-local install-man ++install-data-am: install-man + + install-exec-am: install-binPROGRAMS install-binSCRIPTS \ + install-sbinPROGRAMS +@@ -678,7 +678,7 @@ uninstall-man: uninstall-man1 uninstall- + distclean-generic distclean-hdr distclean-tags distcleancheck \ + distdir distuninstallcheck dvi dvi-am info info-am install \ + install-am install-binPROGRAMS install-binSCRIPTS install-data \ +- install-data-am install-data-local install-exec install-exec-am \ ++ install-data-am install-exec install-exec-am \ + install-info install-info-am install-man install-man1 \ + install-man5 install-sbinPROGRAMS install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ +@@ -693,40 +693,6 @@ uninstall-man: uninstall-man1 uninstall- + install-exec-hook: + ln -s $(sbindir)/gofish $(DESTDIR)$(sbindir)/gopherd + +-# Do not override the gofish.conf or icons directories if they exist +-install-data-local: install-root-dir +- $(mkinstalldirs) $(DESTDIR)$(sysconfdir) +- if test -f $(DESTDIR)$(sysconfdir)/gofish.conf; then \ +- $(INSTALL_DATA) gofish.conf $(DESTDIR)$(sysconfdir)/gofish.conf.new; \ +- else \ +- $(INSTALL_DATA) gofish.conf $(DESTDIR)$(sysconfdir)/gofish.conf; \ +- fi +- if test -f $(DESTDIR)$(sysconfdir)/gofish-www.conf; then \ +- $(INSTALL_DATA) gofish-www.conf $(DESTDIR)$(sysconfdir)/gofish-www.conf.new; \ +- else \ +- $(INSTALL_DATA) gofish-www.conf $(DESTDIR)$(sysconfdir)/gofish-www.conf; \ +- fi +- +-# 1. Only install Configure_GoFish if /var/gopher does not exist. +-# We don't want to keep installing it for users who are upgrading. +-# 2. Only install the .gopher+ file if it dosen't exist. We don't want to +-# override any user changes. +-# 3. Only install icon directory if it dosen't exist. We don't want to +-# override any user installed icons. +-install-root-dir: +- if test ! -d $(DESTDIR)$(gopherroot); then \ +- $(mkinstalldirs) $(DESTDIR)$(gopherroot); \ +- $(INSTALL_DATA) Configure_GoFish $(DESTDIR)$(gopherroot)/Configure_GoFish; \ +- $(INSTALL_DATA) _cache $(DESTDIR)$(gopherroot)/.cache; \ +- fi +- if test ! -f $(DESTDIR)$(gopherroot)/.gopher+; then \ +- $(INSTALL_DATA) _gopher+ $(DESTDIR)$(gopherroot)/.gopher+; \ +- fi +- if test ! -f $(DESTDIR)$(gopherroot)/icons; then \ +- $(mkinstalldirs) $(DESTDIR)$(gopherroot)/icons; \ +- $(INSTALL_DATA) $(srcdir)/icons/*.gif $(DESTDIR)$(gopherroot)/icons; \ +- fi +- + # Do not remove the root_dir or any part of it + uninstall-local: + rm -f $(DESTDIR)$(sysconfdir)/gofish.conf diff --git a/net/gofish/patches/patch-ab b/net/gofish/patches/patch-ab new file mode 100644 index 00000000000..8125c69087b --- /dev/null +++ b/net/gofish/patches/patch-ab @@ -0,0 +1,14 @@ +$NetBSD: patch-ab,v 1.1.1.1 2005/10/26 03:42:21 minskim Exp $ + +--- configure.in.orig Sun May 25 03:52:57 2003 ++++ configure.in +@@ -44,6 +44,9 @@ AC_FUNC_STRFTIME + AC_CHECK_FUNCS(gethostname select socket strdup strerror strstr strtol uname) + AC_CHECK_FUNCS(writev daemon) + ++dnl Interix does not have initgroups ++AC_CHECK_FUNCS(initgroups) ++ + dnl poll does not work on the arm + dnl if this goes, AC_CANONICAL_HOST and the files + dnl config.sub and config.guess can go diff --git a/net/gofish/patches/patch-ac b/net/gofish/patches/patch-ac new file mode 100644 index 00000000000..e2442d0ae91 --- /dev/null +++ b/net/gofish/patches/patch-ac @@ -0,0 +1,114 @@ +$NetBSD: patch-ac,v 1.1.1.1 2005/10/26 03:42:21 minskim Exp $ + +--- configure.orig Thu Dec 9 03:59:13 2004 ++++ configure +@@ -5145,6 +5145,109 @@ fi + done + + ++ ++for ac_func in initgroups ++do ++as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` ++echo "$as_me:$LINENO: checking for $ac_func" >&5 ++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 ++if eval "test \"\${$as_ac_var+set}\" = set"; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. ++ For example, HP-UX 11i <limits.h> declares gettimeofday. */ ++#define $ac_func innocuous_$ac_func ++ ++/* System header to define __stub macros and hopefully few prototypes, ++ which can conflict with char $ac_func (); below. ++ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since ++ <limits.h> exists even on freestanding compilers. */ ++ ++#ifdef __STDC__ ++# include <limits.h> ++#else ++# include <assert.h> ++#endif ++ ++#undef $ac_func ++ ++/* Override any gcc2 internal prototype to avoid an error. */ ++#ifdef __cplusplus ++extern "C" ++{ ++#endif ++/* We use char because int might match the return type of a gcc2 ++ builtin and then its argument prototype would still apply. */ ++char $ac_func (); ++/* The GNU C library defines this for functions which it implements ++ to always fail with ENOSYS. Some functions are actually named ++ something starting with __ and the normal name is an alias. */ ++#if defined (__stub_$ac_func) || defined (__stub___$ac_func) ++choke me ++#else ++char (*f) () = $ac_func; ++#endif ++#ifdef __cplusplus ++} ++#endif ++ ++int ++main () ++{ ++return f != $ac_func; ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext conftest$ac_exeext ++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ++ (eval $ac_link) 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; } && ++ { ac_try='test -s conftest$ac_exeext' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ eval "$as_ac_var=yes" ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++eval "$as_ac_var=no" ++fi ++rm -f conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++fi ++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 ++echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 ++if test `eval echo '${'$as_ac_var'}'` = yes; then ++ cat >>confdefs.h <<_ACEOF ++#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 ++_ACEOF ++ ++fi ++done ++ ++ + case $host in + armv4l-*) ;; + *) diff --git a/net/gofish/patches/patch-ad b/net/gofish/patches/patch-ad new file mode 100644 index 00000000000..dcd619a95ff --- /dev/null +++ b/net/gofish/patches/patch-ad @@ -0,0 +1,14 @@ +$NetBSD: patch-ad,v 1.1.1.1 2005/10/26 03:42:21 minskim Exp $ + +--- gofish.c.orig Wed Dec 31 18:12:02 2003 ++++ gofish.c +@@ -209,7 +209,9 @@ setup_privs (void) + uid = pwd->pw_uid; + if(gid == (uid_t)-1) + gid = pwd->pw_gid; ++#ifdef HAVE_INITGROUPS + initgroups (pwd->pw_name, pwd->pw_gid); ++#endif + } + + setgid(gid); |