aboutsummaryrefslogtreecommitdiffstats
path: root/www/p5-ldap-abook/Makefile
blob: 0ee3033540f4b774476adfdbb6a2c81ea9dabe18 (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
# New ports collection makefile for:    p5-abook
# Date created:             November 22, 2004
# Whom:                     Brian Somers <brian@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=   ldap-abook
PORTVERSION=    1.00
CATEGORIES= www perl5
MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
PKGNAMEPREFIX=  p5-

MAINTAINER= ports@FreeBSD.org
COMMENT=    Perl5 CGI script providing an LDAP addressbook web interface

FORBIDDEN=  Arbitrary command execution vulnerability in CGI script

RUN_DEPENDS=    ${SITE_PERL}/AddressBook.pm:${PORTSDIR}/net/p5-AddressBook \
        ${SITE_PERL}/CGI.pm:${PORTSDIR}/www/p5-CGI.pm \
        ${SITE_PERL}/Net/LDAP.pm:${PORTSDIR}/net/p5-perl-ldap

ABOOK=      ${PREFIX}/www/ldap-abook
CONFIG=     ${PREFIX}/etc/AddressBook.conf
USE_PERL5=  yes
NO_BUILD=   yes

post-patch:
    @${PERL} -pi -e 's|(/etc/AddressBook.conf)|${PREFIX}$$1|g' \
       ${WRKSRC}/cgi-bin/abook.cgi

do-install:
    @ ${MKDIR} ${PREFIX}/www/ldap-abook
    ${TAR} -C ${WRKSRC} --exclude '*.orig' -cf - . | \
        ${TAR} -C ${PREFIX}/www/ldap-abook -xf -
    ${INSTALL_DATA} ${FILESDIR}/abook.ldif ${ABOOK}/examples/default
    ${INSTALL_DATA} ${ABOOK}/examples/default/AddressBook.conf \
        ${CONFIG}-dist
    [ -f ${CONFIG} ] || \
        install  -o root -g www -m 640 ${CONFIG}-dist ${CONFIG}

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

.include <bsd.port.mk>