aboutsummaryrefslogtreecommitdiff
path: root/net/wired
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2006-11-23 22:36:05 +0000
committerMartin Wilke <miwi@FreeBSD.org>2006-11-23 22:36:05 +0000
commita8e0f5eaf976df63a611df1deb8a9acde64d7c57 (patch)
tree3838e754aec34bc7492c9cb13dc0e8c29036ed02 /net/wired
parent3fc923c38eaaec6746df8dd11dc63a9329efb26d (diff)
downloadports-a8e0f5eaf976df63a611df1deb8a9acde64d7c57.tar.gz
ports-a8e0f5eaf976df63a611df1deb8a9acde64d7c57.zip
Notes
Diffstat (limited to 'net/wired')
-rw-r--r--net/wired/Makefile39
-rw-r--r--net/wired/distinfo3
-rw-r--r--net/wired/files/patch-Makefile.in61
-rw-r--r--net/wired/files/patch-wired-wiredctl.in11
-rw-r--r--net/wired/files/wired.sh.in27
-rw-r--r--net/wired/pkg-deinstall56
-rw-r--r--net/wired/pkg-descr5
-rw-r--r--net/wired/pkg-install80
-rw-r--r--net/wired/pkg-plist27
9 files changed, 309 insertions, 0 deletions
diff --git a/net/wired/Makefile b/net/wired/Makefile
new file mode 100644
index 000000000000..7629ec9110da
--- /dev/null
+++ b/net/wired/Makefile
@@ -0,0 +1,39 @@
+# New ports collection makefile for: wired
+# Date created: 2006-11-23
+# Whom: trasz <trasz@pin.if.uz.zgora.pl>
+#
+# $FreeBSD$
+#
+
+PORTNAME= wired
+PORTVERSION= 1.3.1
+CATEGORIES= net
+MASTER_SITES= http://www.zankasoftware.com/dist/
+
+MAINTAINER= trasz@pin.if.uz.zgora.pl
+COMMENT= Wired Server
+
+GNU_CONFIGURE= yes
+USE_GMAKE= yes
+USE_RC_SUBR= wired.sh
+
+MAN1= hl2wired.1 wiredctl.1
+MAN5= wired.conf.5
+MAN8= wired.8
+
+pre-install:
+ PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
+
+post-install:
+ @if [ ! -f ${PREFIX}/wired/etc/wired.conf ]; then \
+ ${CP} -p ${PREFIX}/wired/etc/wired.conf.sample ${PREFIX}/wired/etc/wired.conf ; \
+ fi
+ @if [ ! -f ${PREFIX}/wired/etc/resolv.conf ]; then \
+ ${CP} -p ${PREFIX}/wired/etc/resolv.conf.sample ${PREFIX}/wired/etc/resolv.conf ; \
+ fi
+ PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+
+post-deinstall:
+ PKG_PREFIX=${PREFIX} ${SH} pkg-deinstall ${PKGNAME} POST-DEINSTALL
+
+.include <bsd.port.mk>
diff --git a/net/wired/distinfo b/net/wired/distinfo
new file mode 100644
index 000000000000..e52af67346f0
--- /dev/null
+++ b/net/wired/distinfo
@@ -0,0 +1,3 @@
+MD5 (wired-1.3.1.tar.gz) = aecb3d17682377c8d5daa175616f46d0
+SHA256 (wired-1.3.1.tar.gz) = 7c10f229f110e0ce1dd8213e920354d59dca32fed6dc0ba20d785558844a34b9
+SIZE (wired-1.3.1.tar.gz) = 896710
diff --git a/net/wired/files/patch-Makefile.in b/net/wired/files/patch-Makefile.in
new file mode 100644
index 000000000000..97c6444acdcf
--- /dev/null
+++ b/net/wired/files/patch-Makefile.in
@@ -0,0 +1,61 @@
+--- Makefile.in.orig Sun Jun 18 15:08:08 2006
++++ Makefile.in Thu Nov 23 21:07:15 2006
+@@ -12,8 +12,8 @@
+
+ WD_VERSION = @WD_VERSION@
+ WD_MAINTAINER = @WD_MAINTAINER@
+-WD_USER = @WD_USER@
+-WD_GROUP = @WD_GROUP@
++WD_USER = wired
++WD_GROUP = wired
+
+ DISTFILES = INSTALL LICENSE NEWS README Makefile Makefile.in \
+ config.guess config.status config.h.in config.sub configure \
+@@ -86,7 +86,7 @@
+
+ $(rundir)/wiredctl: $(top_srcdir)/wired/wiredctl.in
+ @test -d $(@D) || mkdir -p $(@D)
+- sed -e 's,@wireddir\@,$(fake_prefix)/$(wireddir),g' $< > $@
++ sed -e 's,@wireddir\@,$(fake_prefix)/$(wireddir),g' -e 's,@prefix\@,$(prefix),g' $< > $@
+ chmod +x $@
+
+ $(rundir)/etc/wired.conf: $(top_srcdir)/wired/wired.conf.in
+@@ -145,15 +145,15 @@
+ fi
+
+ if [ ! -f $(installdir)/etc/wired.conf ]; then \
+- $(INSTALL) -m 644 -o $(WD_USER) -g $(WD_GROUP) $(rundir)/etc/wired.conf $(installdir)/etc/; \
++ $(INSTALL) -m 644 -o $(WD_USER) -g $(WD_GROUP) $(rundir)/etc/wired.conf $(installdir)/etc/wired.conf.sample; \
+ fi
+
+- $(INSTALL) -m 755 -o $(WD_USER) -g $(WD_GROUP) $(rundir)/hl2wired $(installdir)/
+- $(INSTALL) -m 755 -o $(WD_USER) -g $(WD_GROUP) $(rundir)/wired $(installdir)/
+- $(INSTALL) -m 755 -o $(WD_USER) -g $(WD_GROUP) $(rundir)/wiredctl $(installdir)/
++ $(INSTALL) -m 755 -o 0 -g 0 $(rundir)/hl2wired $(prefix)/sbin/
++ $(INSTALL) -m 755 -o 0 -g 0 $(rundir)/wired $(prefix)/sbin/
++ $(INSTALL) -m 755 -o 0 -g 0 $(rundir)/wiredctl $(prefix)/bin/
+
+ if [ -f /etc/resolv.conf ]; then \
+- $(INSTALL) -m 644 -o $(WD_USER) -g $(WD_GROUP) /etc/resolv.conf $(installdir)/etc/; \
++ $(INSTALL) -m 644 -o $(WD_USER) -g $(WD_GROUP) /etc/resolv.conf $(installdir)/etc/resolv.conf.sample; \
+ fi
+
+ @if [ -f .update ]; then \
+@@ -161,7 +161,7 @@
+ echo "Update complete!"; \
+ echo ""; \
+ echo "You should now run:"; \
+- echo " $(installdir)/wiredctl restart"; \
++ echo " $(prefix)/bin/wiredctl restart"; \
+ echo "to restart a running server."; \
+ else \
+ echo ""; \
+@@ -172,7 +172,7 @@
+ echo "Remember to edit $(installdir)/etc/wired.conf if you want to make any changes before starting the server."; \
+ echo ""; \
+ echo "When you are done, run:"; \
+- echo " $(installdir)/wiredctl start"; \
++ echo " $(prefix)/bin/wiredctl start"; \
+ echo "to start the server."; \
+ fi
+
diff --git a/net/wired/files/patch-wired-wiredctl.in b/net/wired/files/patch-wired-wiredctl.in
new file mode 100644
index 000000000000..cd1509b31b6d
--- /dev/null
+++ b/net/wired/files/patch-wired-wiredctl.in
@@ -0,0 +1,11 @@
+--- wired/wiredctl.in.orig Thu Nov 23 19:59:48 2006
++++ wired/wiredctl.in Thu Nov 23 20:00:58 2006
+@@ -13,7 +13,7 @@
+ CERTIFICATE="@wireddir@/etc/certificate.pem"
+
+ # The path to your wired binary
+-WIRED="@wireddir@/wired"
++WIRED="@prefix@/sbin/wired"
+
+ # Flags to pass to wired
+ WIREDFLAGS="-d @wireddir@ -ll -u"
diff --git a/net/wired/files/wired.sh.in b/net/wired/files/wired.sh.in
new file mode 100644
index 000000000000..e902407f064b
--- /dev/null
+++ b/net/wired/files/wired.sh.in
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+# PROVIDE: wired
+# REQUIRE:
+#
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# wired_enable (bool): Set to NO by default.
+# Set it to YES to enable wired.
+#
+
+. %%RC_SUBR%%
+
+name="wired"
+rcvar=${name}_enable
+
+pidfile=%%PREFIX%%/wired/wired.pid
+command=%%PREFIX%%/sbin/${name}
+
+load_rc_config $name
+
+: ${wired_enable="NO"}
+
+command_args=""
+
+run_rc_command "$1"
diff --git a/net/wired/pkg-deinstall b/net/wired/pkg-deinstall
new file mode 100644
index 000000000000..ba3037ac19da
--- /dev/null
+++ b/net/wired/pkg-deinstall
@@ -0,0 +1,56 @@
+#! /bin/sh
+#
+# ex:ts=4
+
+ask() {
+ local question default answer
+
+ question=$1
+ default=$2
+ if [ -z "${PACKAGE_BUILDING}" -a -z "${BATCH}" ]; then
+ read -p "${question} [${default}]? " answer
+ fi
+ echo ${answer:-${default}}
+}
+
+yesno() {
+ local question default answer
+
+ question=$1
+ default=$2
+ while :; do
+ answer=$(ask "${question}" "${default}")
+ case "${answer}" in
+ [Yy]*) return 0;;
+ [Nn]*) return 1;;
+ esac
+ echo "Please answer yes or no."
+ done
+}
+
+delete_account() {
+ local u
+
+ u=$1
+ if yesno "Do you want me to remove user \"${u}\"" n; then
+ pw userdel -n ${u}
+ echo "Done."
+ fi
+}
+
+case $2 in
+
+DEINSTALL)
+ if ps -axc | grep -qw wired; then
+ if yesno "Wired is still running. Shall I stop it?" y; then
+ killall wired
+ sleep 2
+ else
+ echo "OK ... I hope you know what you are doing."
+ fi
+ fi
+
+ delete_account wired
+ ;;
+
+esac
diff --git a/net/wired/pkg-descr b/net/wired/pkg-descr
new file mode 100644
index 000000000000..441dd35d859d
--- /dev/null
+++ b/net/wired/pkg-descr
@@ -0,0 +1,5 @@
+Wired is an open, modern and free version of the BBS-style
+client/server system, providing chat, messaging and file
+transfers.
+
+WWW: http://www.zankasoftware.com/wired/
diff --git a/net/wired/pkg-install b/net/wired/pkg-install
new file mode 100644
index 000000000000..3667f4bf8fe8
--- /dev/null
+++ b/net/wired/pkg-install
@@ -0,0 +1,80 @@
+#!/bin/sh
+#
+# ex:ts=4
+
+ask() {
+ local question default answer
+
+ question=$1
+ default=$2
+ if [ -z "${PACKAGE_BUILDING}" -a -z "${BATCH}" ]; then
+ read -p "${question} [${default}]? " answer
+ fi
+ echo ${answer:-${default}}
+}
+
+yesno() {
+ local question default answer
+
+ question=$1
+ default=$2
+ while :; do
+ answer=$(ask "${question}" "${default}")
+ case "${answer}" in
+ [Yy]*) return 0;;
+ [Nn]*) return 1;;
+ esac
+ echo "Please answer yes or no."
+ done
+}
+
+make_account() {
+ local u g gcos
+
+ u=$1
+ g=$2
+ gcos=$3
+
+ if pw group show "${g}" >/dev/null 2>&1; then
+ echo "You already have a group \"${g}\", so I will use it."
+ else
+ echo "You need a group \"${g}\"."
+ if which -s pw && yesno "Would you like me to create it" y
+ then
+ pw groupadd ${g} || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+ fi
+
+ if pw user show "${u}" >/dev/null 2>&1; then
+ echo "You already have a user \"${u}\", so I will use it."
+ else
+ echo "You need a user \"${u}\"."
+ if which -s pw && yesno "Would you like me to create it" y
+ then
+ pw useradd ${u} -g ${g} -c "${gcos}" -d /nonexistent -s /sbin/nologin -h - || exit
+ echo "Done."
+ else
+ echo "Please create it, and try again."
+ exit 1
+ fi
+ fi
+}
+
+case $2 in
+
+PRE-INSTALL)
+ make_account wired wired "Wired server"
+ ;;
+
+POST-INSTALL)
+ openssl req -batch -new -x509 -nodes -out ${PKG_PREFIX}/wired/etc/certificate.pem.sample -keyout ${PKG_PREFIX}/wired/etc/certificate.pem.sample;
+ if [ ! -f ${PKG_PREFIX}/wired/etc/certificate.pem ]; then
+ cp -p ${PKG_PREFIX}/wired/etc/certificate.pem.sample ${PKG_PREFIX}/wired/etc/certificate.pem;
+ fi
+ ;;
+
+esac
diff --git a/net/wired/pkg-plist b/net/wired/pkg-plist
new file mode 100644
index 000000000000..b4833669cee3
--- /dev/null
+++ b/net/wired/pkg-plist
@@ -0,0 +1,27 @@
+@unexec if cmp -s %D/wired/etc/certificate.pem.sample %D/wired/etc/certificate.pem; then rm -f %D/wired/etc/certificate.pem; fi
+wired/etc/certificate.pem.sample
+@exec if [ ! -f %D/wired/etc/certificate.pem ] ; then cp -p %D/%F %B/certificate.pem; fi
+@unexec if cmp -s %D/wired/etc/wired.conf.sample %D/wired/etc/wired.conf; then rm -f %D/wired/etc/wired.conf; fi
+wired/etc/wired.conf.sample
+@exec if [ ! -f %D/wired/etc/wired.conf ] ; then cp -p %D/%F %B/wired.conf; fi
+@unexec if cmp -s %D/wired/etc/resolv.conf.sample %D/wired/etc/resolv.conf; then rm -f %D/wired/etc/resolv.conf; fi
+wired/etc/resolv.conf.sample
+@exec if [ ! -f %D/wired/etc/resolv.conf ] ; then cp -p %D/%F %B/resolv.conf; fi
+wired/files/Uploads/.wired/type
+wired/files/Drop Box/.wired/type
+wired/banlist
+wired/groups
+wired/news
+wired/users
+sbin/hl2wired
+sbin/wired
+bin/wiredctl
+@exec mkdir -p %D/wired/tmp
+@dirrmtry wired/tmp
+@dirrmtry wired/files/Uploads/.wired
+@dirrmtry wired/files/Uploads
+@dirrmtry wired/files/Drop\ Box/.wired
+@dirrmtry wired/files/Drop\ Box
+@dirrmtry wired/files
+@dirrmtry wired/etc
+@dirrmtry wired