ports/53989: [new port] news/papercut: a lightweight and easy-to-use NNTP server for local networks
Clement Laforet
sheepkiller at cultdeadsheep.org
Tue Jul 1 23:10:19 UTC 2003
>Number: 53989
>Category: ports
>Synopsis: [new port] news/papercut: a lightweight and easy-to-use NNTP server for local networks
>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: Tue Jul 01 16:10:17 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator: Clement Laforet
>Release: FreeBSD 5.1-CURRENT i386
>Organization:
cotds.org
>Environment:
System: FreeBSD chuck.cultdeadsheep.org 5.1-CURRENT FreeBSD 5.1-CURRENT #0: Sun Jun 22 01:48:26 CEST 2003 root at chuck.cultdeadsheep.org:/usr/obj/usr/src/sys/DARTH-VADER i386
>Description:
Papercut is a news server written in 100% pure Python. It is intended to be
extensible to the point where people can develop their own 'plug-ins' and by
that integrate the NNTP protocol to their applications.
It uses MySQL as backend and can be integrated easily into Phorum (http://phorum.org).
>How-To-Repeat:
N/A.
>Fix:
--- papercut.shar begins here ---
# 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:
#
# papercut
# papercut/Makefile
# papercut/distinfo
# papercut/files
# papercut/files/papercut-wrapper
# papercut/pkg-plist
# papercut/pkg-descr
#
echo c - papercut
mkdir -p papercut > /dev/null 2>&1
echo x - papercut/Makefile
sed 's/^X//' >papercut/Makefile << 'END-of-papercut/Makefile'
X# New ports collection makefile for: papercut
X# Date created: 2003-07-01
X# Whom: Clement Laforet <sheepkiller at cultdeadsheep.org>
X#
X# $FreeBSD:$
X#
X
XPORTNAME= papercut
XPORTVERSION= 0.9.8
XCATEGORIES= news python
XMASTER_SITES= http://papercut.org/ \
X http://www.cultdeadsheep.org/FreeBSD/ports/download/distfiles/
X
XMAINTAINER= sheepkiller at cultdeadsheep.org
XCOMMENT= Papercut is a news server written in Python, using a MySQL backend
X
XRUN_DEPENDS= ${PYTHON_SITELIBDIR}/MySQLdb/__init__.py:${PORTSDIR}/databases/py-MySQLdb
X
XUSE_PYTHON= yes
XNO_BUILD= yes
XUSE_REINPLACE= yes
X
Xdo-configure:
X @${CP} ${FILESDIR}/papercut-wrapper ${WRKDIR}/papercut-wrapper
X @${REINPLACE_CMD} -e "s,__DATADIR__,${DATADIR}," ${WRKDIR}/papercut-wrapper
X @${REINPLACE_CMD} -e "s,__PYTHON__,${PYTHON_CMD}," ${WRKDIR}/papercut-wrapper
X @${REINPLACE_CMD} "s,/home/papercut,${DATADIR}," ${WRKSRC}/settings.py
X
Xdo-install:
X @${MKDIR} ${DATADIR}
X @${INSTALL_SCRIPT} ${WRKSRC}/*.py ${DATADIR}
X @${MKDIR} ${DATADIR}/cache
X @${MKDIR} ${DATADIR}/logs
X.for DIR in auth storage
X @${MKDIR} ${DATADIR}/${DIR}
X @${INSTALL_SCRIPT} ${WRKSRC}/${DIR}/* ${DATADIR}/${DIR}
X.endfor
X @${INSTALL_SCRIPT} ${WRKDIR}/papercut-wrapper ${PREFIX}/bin/papercut
X @${MV} ${DATADIR}/settings.py ${DATADIR}/settings.py.sample
X
Xpost-install:
X @${ECHO} "To use papercut you need to copy ${DATADIR}/settings.py.sample"
X @${ECHO} "to ${DATADIR}/settings.py and edit it."
X
X.include <bsd.port.mk>
END-of-papercut/Makefile
echo x - papercut/distinfo
sed 's/^X//' >papercut/distinfo << 'END-of-papercut/distinfo'
XMD5 (papercut-0.9.8.tar.gz) = d0334a56092a79d93a1eb593430b8d31
END-of-papercut/distinfo
echo c - papercut/files
mkdir -p papercut/files > /dev/null 2>&1
echo x - papercut/files/papercut-wrapper
sed 's/^X//' >papercut/files/papercut-wrapper << 'END-of-papercut/files/papercut-wrapper'
X#!/bin/sh
X
X# Change this to your getmail directory; defaults to /usr/local/share/getmail
XPPCPATH="__DATADIR__"
X
XPYTHONPATH="${PPCPATH}:${PYTHONPATH}"
Xexport PYTHONPATH
X
X# You can change this to point to your Python interpreter if you wish.
XPYTHON=__PYTHON__
X
Xexec "$PYTHON" ${PPCPATH}/papercut.py $@
X
END-of-papercut/files/papercut-wrapper
echo x - papercut/pkg-plist
sed 's/^X//' >papercut/pkg-plist << 'END-of-papercut/pkg-plist'
Xbin/papercut
X%%DATADIR%%/papercut.py
X%%DATADIR%%/papercut_cache.py
X%%DATADIR%%/portable_locker.py
X%%DATADIR%%/settings.py.sample
X%%DATADIR%%/auth/__init__.py
X%%DATADIR%%/auth/mysql.py
X%%DATADIR%%/auth/phorum_mysql_users.py
X%%DATADIR%%/auth/phpbb_mysql_users.py
X%%DATADIR%%/storage/__init__.py
X%%DATADIR%%/storage/forwarding_proxy.py
X%%DATADIR%%/storage/mbox.py
X%%DATADIR%%/storage/mime.py
X%%DATADIR%%/storage/mysql.py
X%%DATADIR%%/storage/mysql_storage.sql
X%%DATADIR%%/storage/p2p.py
X%%DATADIR%%/storage/phorum_mysql.py
X%%DATADIR%%/storage/phorum_mysql_fix.sql
X%%DATADIR%%/storage/phorum_pgsql.py
X%%DATADIR%%/storage/phorum_pgsql_fix.sql
X%%DATADIR%%/storage/phpbb_mysql.py
X%%DATADIR%%/storage/phpbb_mysql_fix.sql
X%%DATADIR%%/storage/strutil.py
X at exec echo "To use papercut you need to copy %D/%%DATADIR%%/settings.py.sample to %D/%%DATADIR%%/settings.py and edit it." |fmt
X at unexec [ -f %D/%%DATADIR%%/papercut.pyc ] && rm %D/%%DATADIR%%/papercut.pyc || true
X at unexec [ -f %D/%%DATADIR%%/papercut_cache.pyc ] && rm %D/%%DATADIR%%/papercut_cache.pyc || true
X at unexec [ -f %D/%%DATADIR%%/portable_locker.pyc ] && rm %D/%%DATADIR%%/portable_locker.pyc || true
X at unexec [ -f %D/%%DATADIR%%/settings.py ] || true
X at unexec [ -f %D/%%DATADIR%%/settings.pyc ] && rm %D/%%DATADIR%%/settings.pyc || true
X at unexec [ -f %D/%%DATADIR%%/auth/__init__.pyc ] && rm %D/%%DATADIR%%/auth/__init__.pyc || true
X at unexec [ -f %D/%%DATADIR%%/auth/mysql.pyc ] && rm %D/%%DATADIR%%/auth/mysql.pyc || true
X at unexec [ -f %D/%%DATADIR%%/auth/phorum_mysql_users.pyc ] && rm %D/%%DATADIR%%/auth/phorum_mysql_users.pyc || true
X at unexec [ -f %D/%%DATADIR%%/auth/phpbb_mysql_users.pyc ] && rm %D/%%DATADIR%%/auth/phpbb_mysql_users.pyc || true
X at unexec [ -f %D/%%DATADIR%%/storage/__init__.pyc ] && rm %D/%%DATADIR%%/storage/__init__.pyc || true
X at unexec [ -f %D/%%DATADIR%%/storage/forwarding_proxy.pyc ] && rm %D/%%DATADIR%%/storage/forwarding_proxy.pyc || true
X at unexec [ -f %D/%%DATADIR%%/storage/mbox.pyc ] && rm %D/%%DATADIR%%/storage/mbox.pyc || true
X at unexec [ -f %D/%%DATADIR%%/storage/mime.pyc ] && rm %D/%%DATADIR%%/storage/mime.pyc || true
X at unexec [ -f %D/%%DATADIR%%/storage/mysql.pyc ] && rm %D/%%DATADIR%%/storage/mysql.pyc || true
X at unexec [ -f %D/%%DATADIR%%/storage/p2p.pyc ] && rm %D/%%DATADIR%%/storage/p2p.pyc || true
X at unexec [ -f %D/%%DATADIR%%/storage/phorum_mysql.pyc ] && rm %D/%%DATADIR%%/storage/phorum_mysql.pyc || true
X at unexec [ -f %D/%%DATADIR%%/storage/phorum_pgsql.pyc ] && rm %D/%%DATADIR%%/storage/phorum_pgsql.pyc || true
X at unexec [ -f %D/%%DATADIR%%/storage/phpbb_mysql.pyc ] && rm %D/%%DATADIR%%/storage/phpbb_mysql.pyc || true
X at unexec [ -f %D/%%DATADIR%%/storage/strutil.pyc ] && rm %D/%%DATADIR%%/storage/strutil.pyc || true
X at dirrm %%DATADIR%%/auth
X at unexec [ -d %D/ %%DATADIR%%/cache ] && rmdir %%DATADIR%%/cache 2>/dev/null || true
X at unexec [ -d %D/%%DATADIR%%/logs ] && rmdir %%DATADIR%%/logs 2>/dev/null || true
X at dirrm %%DATADIR%%/storage
X at unexec [ -d %D/%%DATADIR%% ] && echo "If you are permanently removing this port, you should do a ``rm -rf %D/%%DATADIR%%`` to remove any files left." | fmt
END-of-papercut/pkg-plist
echo x - papercut/pkg-descr
sed 's/^X//' >papercut/pkg-descr << 'END-of-papercut/pkg-descr'
XPapercut is a news server written in 100% pure Python. It designed
Xto be use as backend for PHP, or to be run on a small network.
XMessages can be stored in a MySQL database.
XIt doesn't support feeding.
X
XWWW: http://papercut.org
END-of-papercut/pkg-descr
exit
--- papercut.shar ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list