aboutsummaryrefslogtreecommitdiffstats
path: root/net-p2p/rtgui/Makefile
blob: 70696727e96866f2080da8c4f167da90af676b1a (plain) (blame)
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
# $FreeBSD$

PORTNAME=   rtgui
PORTVERSION=    0.2.81
CATEGORIES= net-p2p www
MASTER_SITES=   GOOGLE_CODE

MAINTAINER= jadawin@FreeBSD.org
COMMENT=    Web based front end for rTorrent

BUILD_DEPENDS+= xmlrpc-c-config:${PORTSDIR}/net/xmlrpc-c

USES=       tar:tgz

OPTIONS_DEFINE= APACHE LIGHTTPD

OPTIONS_RADIO=  HTTP
OPTIONS_RADIO_HTTP= APACHE LIGHTTPD
OPTIONS_DEFAULTS=   APACHE

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MAPACHE}
USE_APACHE_RUN= 22+
BUILD_DEPENDS+= ${LOCALBASE}/${APACHEMODDIR}/mod_scgi.so:${PORTSDIR}/www/mod_scgi
.endif

.if ${PORT_OPTIONS:MLIGHTTPD}
RUN_DEPENDS+=   lighttpd:${PORTSDIR}/www/lighttpd
.endif

USE_PHP=    xmlrpc session mbstring
WANT_PHP_WEB=   yes

NO_BUILD=   yes
WRKSRC=     ${WRKDIR}/${PORTNAME}

PKGMESSAGE= ${WRKDIR}/pkg-message
SUB_FILES=  pkg-message

post-patch:
    @${REINPLACE_CMD} -e 's/import_request_variables("gp","r_")/extract(\$_REQUEST, EXTR_PREFIX_ALL|EXTR_REFS, "r")/' ${WRKSRC}/*.php
    @${FIND} ${WRKSRC} -name "*.bak"  -delete
    @${FIND} ${WRKSRC} -name "*.php~"  -delete

do-install:
    ${MKDIR} ${STAGEDIR}${WWWDIR}
    ${CP} -r ${WRKSRC}/* ${STAGEDIR}${WWWDIR}

post-install:
    @${CAT} ${PKGMESSAGE}

.include <bsd.port.mk>