aboutsummaryrefslogtreecommitdiffstats
path: root/devel/horde-chora/Makefile
blob: 413a8a96fde9da76bcc46cec33a583e159ff2307 (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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# Ports collection makefile for:  Chora
# Date created:           Mon Nov 26, 2001
# Whom:               Thierry Thomas (<thierry@pompo.net>)
#
# $FreeBSD$
#

PORTNAME=   chora
PORTVERSION=    1.0
PORTREVISION=   1
CATEGORIES= devel www
MASTER_SITES=   ftp://ftp.horde.org/pub/chora/tarballs/ \
        ftp://ftp.uk.horde.org/mirrors/ftp.horde.org/pub/chora/tarballs/

MAINTAINER= thierry@pompo.net

#-----------------------------------------------------------------------
# You may define these options:
#
# - WITHOUT_ENSCRIPT    : if you do not need syntax highlighting;
#
# - A4 or DJ        : if you run enscript with this paper size.
#
#-----------------------------------------------------------------------

RUN_DEPENDS=    ${LOCALBASE}/www/horde/index.php:${PORTSDIR}/www/horde2
.if !defined(WITHOUT_ENSCRIPT)
.if defined(A4)
RUN_DEPENDS+=   ${LOCALBASE}/bin/enscript:${PORTSDIR}/print/enscript-a4
.elif defined(DJ)
RUN_DEPENDS+=   ${LOCALBASE}/bin/enscript:${PORTSDIR}/print/enscript-letterdj
.else
RUN_DEPENDS+=   ${LOCALBASE}/bin/enscript:${PORTSDIR}/print/enscript-letter
.endif
.endif

NO_BUILD=   yes

# Specify where your repository belongs.
# (You can reconfigure it after installation anyway)
.if defined(PACKAGE_BUILDING) || !defined(CVSROOT) || empty(CVSROOT)
CVSROOT=    /home/cvs
.endif

DOCS=       COPYING README  docs/BUGS docs/CHANGES docs/CREDITS \
        docs/GOALS docs/INSTALL
CONFFILE=   conf.php cvsroots.php html.php longIntro.txt \
        mime_drivers.php

LHORDEDIR?= www/horde
LCHORADIR?= ${LHORDEDIR}/chora

PLIST_SUB=  HORDEDIR=${LHORDEDIR} CHORADIR=${LCHORADIR}

HORDEDIR=   ${PREFIX}/${LHORDEDIR}
CHORADIR=   ${PREFIX}/${LCHORADIR}
CONFDIR=    ${CHORADIR}/config

HORDE_INC=  ${LOCALBASE}/etc/horde

do-install:
    @${MKDIR}  ${CHORADIR}
    @${CP} -Rp ${WRKSRC}/config ${WRKSRC}/graphics ${WRKSRC}/lib ${CHORADIR}
    @${CP} -Rp ${WRKSRC}/locale ${WRKSRC}/po ${WRKSRC}/templates ${CHORADIR}
    @${CP} -p  ${WRKSRC}/*.php ${CHORADIR}
.for FILE in ${CONFFILE}
    @if [ ! -f ${CONFDIR}/${FILE} ]; then \
      ${CP} ${CONFDIR}/${FILE}.dist ${CONFDIR}/${FILE} ; \
    fi
.endfor
    @${PERL} -pi -e "s:%%CVSROOT%%:${CVSROOT}:;s:%%CONFDIR%%:${CONFDIR}:" \
        ${CONFDIR}/cvsroots.php
    @${CHOWN} -R www:www ${CHORADIR}
    @${CHMOD} -R o-rwx ${CONFDIR}
    @${CP} -p ${FILESDIR}/httpd.conf.chora ${HORDE_INC}
    @${PERL} -pi -e "s:/home/httpd/html/horde/chora:${CHORADIR}:g" \
        ${HORDE_INC}/httpd.conf.chora
    @${PERL} -pi -e "s://UNCOMMENTWHENINSTCHORA::" \
        ${HORDEDIR}/config/registry.php
.if !defined(WITHOUT_ENSCRIPT)
    @${PERL} -pi -e "s://UNCOMMENTWHENINSTCHORA::" \
        ${HORDEDIR}/config/mime_drivers.php
.endif
.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:%%CHORADIR%%:${CHORADIR}:g;s:%%PORTSDIR%%:${PORTSDIR}:g;s:%%CONFDIR%%:${CONFDIR}:g"
    @${ECHO_MSG}

.include <bsd.port.mk>