aboutsummaryrefslogtreecommitdiffstats
path: root/security/drupal4-ldap_integration/Makefile
blob: edd29103c13dc35b197f278985eea6320836d482 (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
# New ports collection makefile for:    drupal-ldap_integration
# Date created:             12 January 2006
# Whom:                 Brooks Davis <brooks@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=   ldap_integration
PORTVERSION=    4.6.0
CATEGORIES= security www
MASTER_SITES=   http://drupal.org/files/projects/
PKGNAMEPREFIX=  drupal-
DIST_SUBDIR=    drupal

MAINTAINER= brooks@FreeBSD.org
COMMENT=    LDAP user authentication for the Drupal CMS

RUN_DEPENDS=    ${LOCALBASE}/${DRUPDIR}/index.php:${PORTSDIR}/www/drupal

USE_PHP=    ldap

NO_BUILD=   yes

DOCSDIR=    ${PREFIX}/${DRUPDIR}/doc/${PORTNAME}
DRUPMODDIR= ${DRUPDIR}/modules

WRKSRC=     ${WRKDIR}/${PORTNAME}
MODULE_FILES=   ldap_integration.module \
        ldap_integration/LDAPInterface.php \
        zcallbacks.module
MODULE_CONF_FILES=  ldap_integration/conf.php
MODULE_CONF_DIRS=   ldap_integration
DOC_FILES=  CHANGES.txt LICENSE.txt README.txt

.if defined(MODULE_CONF_FILES)
SUB_FILES=  pkg-install
SUB_LIST+=  CONF_FILES=${MODULE_CONF_FILES:C|^|${DRUPMODDIR}/|} \
        CONF_DIRS=${MODULE_CONF_DIRS:C|^|${DRUPMODDIR}/|}
PKGINSTALL= ${WRKDIR}/pkg-install
PKGDEINSTALL=   ${PKGINSTALL}
.endif

PLIST_SUB+= DRUPMODDIR=${DRUPMODDIR}
PLIST_FILES+=   ${MODULE_FILES:C|^|%%DRUPMODDIR%%/|}
PLIST_FILES+=   ${MODULE_CONF_FILES:C|^|%%DRUPMODDIR%%/|:C|$|-dist|}
PLIST_DIRS+=    ${MODULE_DIRS:C|^|%%DRUPMODDIR%%/|}
.if !defined(NOPORTDOCS)
PLIST_FILES+=   ${DOC_FILES:C|^|%%DOCSDIR%%/|}
PLIST_DIRS+=    %%DOCSDIR%%
.endif

.if !defined(DRUPDIR)
pre-fetch:
    @${ECHO_MSG} ""
    @${ECHO_MSG} "Define DRUPDIR to override default of 'www/drupal'."
    @${ECHO_MSG} ""
.endif

DRUPDIR?=   www/drupal

do-install:
.if defined(MODULE_CONF_DIRS)
    @${MKDIR} ${MODULE_CONF_DIRS:C|^|${PREFIX}/${DRUPMODDIR}/|}
.endif
.if defined(MODULE_DIRS)
    @${MKDIR} ${MODULE_DIRS:C|^|${PREFIX}/${DRUPMODDIR}/|}
.endif
.for f in ${MODULE_FILES}
    @${INSTALL_DATA} ${WRKSRC}/${f} ${PREFIX}/${DRUPMODDIR}/${f}
.endfor
.for f in ${MODULE_CONF_FILES}
    @${INSTALL_DATA} ${WRKSRC}/${f} ${PREFIX}/${DRUPMODDIR}/${f}-dist
.endfor
.if !defined(NOPORTDOCS)
    @${MKDIR} ${DOCSDIR}
.for f in ${DOC_FILES}
    @${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}/${f}
.endfor
.endif

.if defined(MODULE_CONF_FILES)
post-install:
    @${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
.endif

.include <bsd.port.mk>