ports/74615: port submission, net/quoted
bob frazier
bobf at mrp3.com
Thu Dec 2 14:00:42 UTC 2004
>Number: 74615
>Category: ports
>Synopsis: port submission, net/quoted
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Thu Dec 02 14:00:42 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator: bob frazier
>Release: 5.3-STABLE
>Organization:
SFT Inc.
>Environment:
FreeBSD beater.SFT.local 5.3-STABLE FreeBSD 5.3-STABLE #0: Thu Nov 11 21:28:03 PST 2004 root at beater.SFT.local:/usr/obj/usr/src/sys/GENERIC i386
>Description:
port addition request: QOTD Daemon 'net/quoted'
SHORT DESCRIPTION:
Easily configured QOTD daemon with over 130 good quality quotes
>How-To-Repeat:
>Fix:
# This is a shell archive. Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file". Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
# net/quoted
# net/quoted/Makefile
# net/quoted/pkg-deinstall
# net/quoted/distinfo
# net/quoted/pkg-descr
# net/quoted/pkg-plist
#
echo c - net/quoted
mkdir -p net/quoted > /dev/null 2>&1
echo x - net/quoted/Makefile
sed 's/^X//' >net/quoted/Makefile << 'END-of-net/quoted/Makefile'
X# New ports collection makefile for: oneko
X# Date created: 1 December 2004
X# Whom: Bob Frazier
X#
X# $FreeBSD$
X#
X
XPORTNAME= quoted
XPORTVERSION= 1.0
XCATEGORIES= net
XMASTER_SITES= http://www.mrp3.com/webutil/
X
XMAINTAINER= bobf at mrp3.com
XCOMMENT= Easily configured QOTD daemon with over 130 good quality quotes
X
XMAN1= quoted.1
XMANCOMPRESSED= no
XGNU_CONFIGURE= yes
XUSE_GMAKE= yes
X
X.include <bsd.port.pre.mk>
X
X.if !defined(UID)
XUID!= ${ID} -u
X.endif
X
X# custom target to stop the daemon
Xdeinstall:
X.if ${UID} != 0 && !defined(INSTALL_AS_USER)
X @${ECHO_MSG} "===> Switching to root credentials for '${.TARGET}' target"
X @cd ${.CURDIR} && \
X ${SU_CMD} "${MAKE} ${__softMAKEFLAGS} ${.TARGET}"
X @${ECHO_MSG} "===> Returning to user credentials"
X.else
X @${ECHO_MSG} "===> Deinstalling for ${PKGORIGIN}"
X @if test -e "/var/run/quoted.pid" ; then \
X (cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} custom-stop-daemon) ; \
X ${RM} -f "/var/run/quoted.pid" ; \
X fi
X @found_names=`${PKG_INFO} -q -O ${PKGORIGIN}`; \
X for p in $${found_names}; do \
X check_name=`${ECHO_CMD} $${p} | ${SED} -e 's/-[^-]*$$//'`; \
X if [ "$${check_name}" = "${PKGBASE}" ]; then \
X prfx=`${PKG_INFO} -q -p $${p} 2> /dev/null | ${SED} -ne '1s|^@cwd ||p'`; \
X if [ "x${PREFIX}" = "x$${prfx}" ]; then \
X ${ECHO_MSG} "===> Deinstalling $${p}"; \
X ${PKG_DELETE} -f $${p}; \
X else \
X ${ECHO_MSG} "===> $${p} has a different PREFIX: $${prfx}, skipping"; \
X fi; \
X fi; \
X done; \
X if [ -z "$${found_names}" ]; then \
X ${ECHO_MSG} "===> ${PKGBASE} not installed, skipping"; \
X fi
X @${RM} -f ${INSTALL_COOKIE} ${PACKAGE_COOKIE}
X.endif
X
X.include <bsd.port.post.mk>
END-of-net/quoted/Makefile
echo x - net/quoted/pkg-deinstall
sed 's/^X//' >net/quoted/pkg-deinstall << 'END-of-net/quoted/pkg-deinstall'
X#!/bin/sh
Xif test -e "/usr/local/bin/quoted" \
X -a -e "/var/run/quoted.pid" \
X -a -e "/usr/local/etc/rc.d/quoted.sh" ; then \
X "/usr/local/etc/rc.d/quoted.sh" stop || echo "" ; fi
Xif test -e "/var/run/quoted.pid" ; then rm /var/run/quoted.pid ; fi
X
END-of-net/quoted/pkg-deinstall
echo x - net/quoted/distinfo
sed 's/^X//' >net/quoted/distinfo << 'END-of-net/quoted/distinfo'
XMD5 (quoted-1.0.tar.gz) = 3b51cba527fffc68238c40dca1e496e6
XSIZE (quoted-1.0.tar.gz) = 121044
END-of-net/quoted/distinfo
echo x - net/quoted/pkg-descr
sed 's/^X//' >net/quoted/pkg-descr << 'END-of-net/quoted/pkg-descr'
Xquoted - QOTD Daemon
X
XThe QOTD Daemon 'quoted' listens on the qotd port (17) and responds with
Xa randomly selected 'quote of the day' from a 'quotes' text file, which
Xyou can update with quotes of your own. It will operate either as a
Xstand-alone daemon, or can also be invoked via inetd.
X
XIf you want, you can also have it listen on a different port, other than
Xthe default 'qotd' port (17).
X
XWWW: http://www.mrp3.com/webutil/quoted.html
END-of-net/quoted/pkg-descr
echo x - net/quoted/pkg-plist
sed 's/^X//' >net/quoted/pkg-plist << 'END-of-net/quoted/pkg-plist'
Xbin/quoted
Xetc/quotes
Xetc/rc.d/quoted.sh
X
END-of-net/quoted/pkg-plist
exit
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list