summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Cook2015-06-11 09:29:05 -0400
committerSteven Cook2015-06-11 09:29:05 -0400
commit096133ed8769e51eca3f0f53fd29b1075d7915c4 (patch)
tree5cd582a340694cf184fb8f0255dc599eb9709566
downloadaur-096133ed8769e51eca3f0f53fd29b1075d7915c4.tar.gz
Initial import
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD34
-rw-r--r--gofish.install27
-rwxr-xr-xgopherd.rc.d38
4 files changed, 118 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..59339958b1b
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = gofish
+ pkgdesc = Simple gopher/web server with HTTP support
+ pkgver = 1.2
+ pkgrel = 1
+ url = http://gofish.sourceforge.net/
+ install = gofish.install
+ arch = i686
+ arch = x86_64
+ license = GPL-2
+ provides = gopherd
+ backup = etc/gofish.conf
+ backup = etc/gofish-www.conf
+ source = http://downloads.sourceforge.net/gofish/gofish-1.2.tar.gz
+ source = gopherd.rc.d
+ md5sums = a44fc268354ec97324fa25572910c412
+ md5sums = 23ff978124baeec51950beb9ff2973ae
+
+pkgname = gofish
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..646119758ce
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,34 @@
+# Maintainer: Kaiting Chen <kaitocracy@gmail.com>
+# Contributor: Mark Rosenstand <mark@archlinux.org>
+# Contributor: Nathan Owe <ndowens04+AUR @ gmail.com>
+
+pkgname='gofish'
+pkgver='1.2'
+pkgrel='1'
+pkgdesc='Simple gopher/web server with HTTP support'
+license=('GPL-2')
+url='http://gofish.sourceforge.net/'
+arch=('i686' 'x86_64')
+backup=('etc/gofish.conf' 'etc/gofish-www.conf')
+provides=('gopherd')
+install='gofish.install'
+
+md5sums=('a44fc268354ec97324fa25572910c412'
+ '23ff978124baeec51950beb9ff2973ae')
+source=("http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz"
+ 'gopherd.rc.d')
+
+build() {
+ cd "${srcdir}/${pkgname}"
+
+ install -Dm755 $srcdir/gopherd.rc.d \
+ $pkgdir/etc/rc.d/gopherd
+
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --disable-mmap-cache \
+ --with-gopherroot=/var/gopher \
+ --with-gopheruser=gopher
+ make; make DESTDIR=$pkgdir install
+}
diff --git a/gofish.install b/gofish.install
new file mode 100644
index 00000000000..0bca92e058e
--- /dev/null
+++ b/gofish.install
@@ -0,0 +1,27 @@
+post_install() {
+ echo -n "Adding gopher system group... "
+ groupadd -g 41 gopher && echo "done."
+
+ echo -n "Adding gopher system user... "
+ useradd -g 41 -u 41 -d /var/gopher \
+ -s /bin/false gopher && echo "done."
+ passwd -l gopher &> /dev/null
+
+ post_upgrade $1
+}
+
+post_upgrade() {
+ echo -n "Refreshing directory caches... "
+ mkcache -r &> /dev/null && echo "done."
+}
+
+post_remove() {
+ echo -n "Removing gopher system user... "
+ userdel gopher &> /dev/null && echo "done."
+ echo -n "Removing gopher system group... "
+ groupdel gopher &> /dev/null && echo "done."
+}
+
+op=$1
+shift
+$op $*
diff --git a/gopherd.rc.d b/gopherd.rc.d
new file mode 100755
index 00000000000..d220c2befdf
--- /dev/null
+++ b/gopherd.rc.d
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+### /etc/rc.d/gopherd: Initscript for Gopher Daemon
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /usr/sbin/gopherd`
+case "$1" in
+ start)
+ stat_busy "Starting Gopher Daemon"
+ [ -z "$PID" ] && \
+ /usr/sbin/gopherd -d &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else stat_done; add_daemon gopherd
+ echo $PID > /var/run/gopherd.pid
+ fi ;;
+ stop)
+ stat_busy "Stopping Gopher Daemon"
+ [ ! -z "$PID" ] \
+ && kill $PID &>/dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ stat_done; rm_daemon gopherd
+ fi ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+
+exit 0
+
+### /etc/rc.d/gopherd: Initscript for Gopher Daemon