aboutsummaryrefslogtreecommitdiffstats
path: root/devel/whups/Makefile
blob: 9b62022b4a18372a5cc08ddb16b90590f5987b55 (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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Ports collection makefile for:  WHUPS
# Date created:           Sun Mar 03, 2002
# Whom:               Thierry Thomas (<thierry@pompo.net>)
#
# $FreeBSD$
#

PORTNAME=   whups
PORTVERSION=    0.0.1.020303
CATEGORIES= devel www
MASTER_SITES=   http://pompo.net/horde/whups/

MAINTAINER= thierry@pompo.net
COMMENT=    WHUPS is a web-based bug tracking system

RUN_DEPENDS=    ${LOCALBASE}/www/horde/index.php:${PORTSDIR}/www/horde2

BROKEN=     "Doesn't run with Horde 2.1 or 2.2"

NO_BUILD=   yes

DOCS=       LICENSE docs/CHANGES
CONFFILE=   conf.php html.php prefs.php
SUB_DIRS=   config graphics lib locale po scripts templates

LHORDEDIR?= www/horde
LWHUPSDIR?= ${LHORDEDIR}/whups

PLIST_SUB=  HORDEDIR=${LHORDEDIR} WHUPSDIR=${LWHUPSDIR}

HORDEDIR=   ${PREFIX}/${LHORDEDIR}
WHUPSDIR=       ${PREFIX}/${LWHUPSDIR}
CONFDIR=    ${WHUPSDIR}/config

HORDE_INC=  ${LOCALBASE}/etc/horde

do-install:
    @${RM} -f ${WRKSRC}/config/conf.php.dist.orig
    @${MKDIR}  ${WHUPSDIR}
.for REP in ${SUB_DIRS}
    @${CP} -Rp ${WRKSRC}/${REP} ${WHUPSDIR}
.endfor
    @${CP} -p  ${WRKSRC}/*.php ${WHUPSDIR}
.for FILE in ${CONFFILE}
    @if [ ! -f ${CONFDIR}/${FILE} ]; then \
      ${CP} ${CONFDIR}/${FILE}.dist ${CONFDIR}/${FILE} ; \
    fi
.endfor
    @${CHOWN} -R www:www ${WHUPSDIR}
    @${CHMOD} -R o-rwx ${CONFDIR}
    @${CP} -p ${FILESDIR}/httpd.conf.whups ${HORDE_INC}
    @${PERL} -pi -e "s:/home/httpd/html/horde/whups:${WHUPSDIR}:g" \
        ${HORDE_INC}/httpd.conf.whups
    @${PERL} -pi -e "s://UNCOMMENTWHENINSTWHUPS::" ${HORDEDIR}/config/registry.php
.if !defined(NOPORTDOCS)
    @${MKDIR} ${DOCSDIR}
.for FILE in ${DOCS}
    @${INSTALL_DATA} ${WRKSRC}/${FILE} ${DOCSDIR}
.endfor
    @${ECHO_MSG} "===> Documentation installed in ${DOCSDIR}."
.endif

post-install:
    @${ECHO_MSG}
    @${CAT} ${PKGMESSAGE} | \
    ${SED} -e "s:%%WHUPSDIR%%:${WHUPSDIR}:g;s:%%PORTSDIR%%:${PORTSDIR}:g;s:%%CONFDIR%%:${CONFDIR}:g;s:%%HORDEDIR%%:${HORDEDIR}:"
    @${ECHO_MSG}

.include <bsd.port.mk>