summaryrefslogtreecommitdiffstats
path: root/www/rnews/Makefile
blob: e5ff0d27e421965112804365b48a5387e3d915b4 (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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# New ports collection makefile for:	rnews
# Date created:		22 December 2003
# Whom:			Vincent Tantardini <vinc@FreeBSD-fr.org>
#
# $FreeBSD$
#

PORTNAME=	rnews
PORTVERSION=	0.63
CATEGORIES=	www
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR=	${PORTNAME}

MAINTAINER=	ports@FreeBSD.org
COMMENT=	A server-side rss aggregator written in php with mysql

.if defined(WITH_PHP3)
RUN_DEPENDS+=	${LOCALBASE}/libexec/apache/libphp3.so:${PORTSDIR}/www/mod_php3
.else
RUN_DEPENDS+=	${LOCALBASE}/libexec/apache/libphp4.so:${PORTSDIR}/www/mod_php4
.endif

USE_MYSQL=	yes

NO_BUILD=	yes
MYPORTDOCS=	CHANGELOG INSTALL LICENSE README magpierss/AUTHORS \
		magpierss/CHANGES magpierss/ChangeLog magpierss/INSTALL \
		magpierss/NEWS magpierss/README magpierss/TROUBLESHOOTING

pre-everything::
.if !defined(WITH_PHP3)
	@${ECHO_MSG} ""
	@${ECHO_MSG} "Press CTRL-C and define WITH_PHP3 if you want"
	@${ECHO_MSG} "to use RNEWS with PHP3. PHP4 is used by default."
	@${ECHO_MSG} ""
.endif

post-patch:
	@${FIND} ${WRKSRC} -name CVS -type d | ${XARGS} ${RM} -fr

do-install:
	@${MKDIR} ${PREFIX}/www/rnews
.if !defined(NOPORTDOCS)
	@${MKDIR} ${DOCSDIR}/magpierss
.   for FILE in ${MYPORTDOCS}
	@${INSTALL_DATA} ${WRKSRC}/${FILE} ${DOCSDIR}/${FILE}
.   endfor
.endif
	${MKDIR} ${PREFIX}/www/rnews
	${MKDIR} ${PREFIX}/www/rnews/magpierss-0.5.2
	cd ${PREFIX}/www/rnews && ${LN} -s magpierss-0.5.2 magpierss
	${MKDIR} ${PREFIX}/www/rnews/magpierss/cache
	${INSTALL_DATA} -v ${WRKSRC}/*.png ${PREFIX}/www/rnews
	${INSTALL_DATA} -v ${WRKSRC}/*.php ${PREFIX}/www/rnews
	${INSTALL_DATA} -v ${WRKSRC}/*.inc ${PREFIX}/www/rnews
	${INSTALL_DATA} -v ${WRKSRC}/magpierss/*.inc ${PREFIX}/www/rnews/magpierss
	${INSTALL_DATA} -v ${WRKSRC}/magpierss/cookbook ${PREFIX}/www/rnews/magpierss
	${CP} -Rv ${WRKSRC}/magpierss/extlib ${PREFIX}/www/rnews/magpierss
	${CP} -Rv ${WRKSRC}/magpierss/htdocs ${PREFIX}/www/rnews/magpierss
	${CP} -Rv ${WRKSRC}/magpierss/scripts ${PREFIX}/www/rnews/magpierss
	@${CHOWN} ${WWWOWN}:${WWWGRP} ${PREFIX}/www/rnews/magpierss/cache
	@${SED} "s,%%PREFIX%%,${PREFIX},g" ${PKGMESSAGE}

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