summaryrefslogtreecommitdiffstats
path: root/news/papercut/Makefile
blob: ab09e1e93046698311d19da77b0540bc7128c189 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# New ports collection makefile for:	papercut
# Date created:				2003-07-01
# Whom:					Clement Laforet <sheepkiller@cultdeadsheep.org>
#
# $FreeBSD$
#

PORTNAME=	papercut
PORTVERSION=	0.9.13
CATEGORIES=	news python
MASTER_SITES=	http://pessoal.org/papercut/

MAINTAINER=	clement@FreeBSD.org
COMMENT=	Papercut is a news server written in Python, using a MySQL backend

RUN_DEPENDS=	${PYTHON_SITELIBDIR}/MySQLdb/__init__.py:${PORTSDIR}/databases/py-MySQLdb

USE_PYTHON=	yes
NO_BUILD=	yes
USE_REINPLACE=	yes

do-configure:
	@${CP} ${FILESDIR}/papercut-wrapper ${WRKDIR}/papercut-wrapper
	@${REINPLACE_CMD} -e "s,__DATADIR__,${DATADIR}," ${WRKDIR}/papercut-wrapper
	@${REINPLACE_CMD} -e "s,__PYTHON__,${PYTHON_CMD}," ${WRKDIR}/papercut-wrapper
	@${REINPLACE_CMD} "s,/home/papercut,${DATADIR}," ${WRKSRC}/settings.py

do-install:
	@${MKDIR} ${DATADIR}
	@${INSTALL_SCRIPT} ${WRKSRC}/*.py ${DATADIR}
	@${MKDIR} ${DATADIR}/cache
	@${MKDIR} ${DATADIR}/logs
.for DIR in auth storage
		@${MKDIR} ${DATADIR}/${DIR}
		@${INSTALL_SCRIPT} ${WRKSRC}/${DIR}/* ${DATADIR}/${DIR}
.endfor
	@${INSTALL_SCRIPT} ${WRKDIR}/papercut-wrapper ${PREFIX}/bin/papercut
	@${MV} ${DATADIR}/settings.py ${DATADIR}/settings.py.sample

post-install:
	@${ECHO_MSG} "To use papercut you need to copy ${DATADIR}/settings.py.sample"
	@${ECHO_MSG} "to ${DATADIR}/settings.py and edit it."

.include <bsd.port.mk>
OpenPOWER on IntegriCloud