aboutsummaryrefslogtreecommitdiffstats
path: root/databases/adodb/Makefile
blob: 00c3fcf5e6353e0d56f431693edc14f355a4f9b3 (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
# New ports collection makefile for: adodb
# Date created:     4 May 2001
# Whom:         abgoeree@uwnet.nl
#
# $FreeBSD$
#

PORTNAME=   adodb
PORTVERSION=    4.62
CATEGORIES= databases www
MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= adodb
DISTNAME=   ${PORTNAME}${PORTVERSION:S/.//}
EXTRACT_SUFX=   .tgz

MAINTAINER= martin@matuska.org
COMMENT=    Database library for PHP

USE_PHP=    yes

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

ADODB_DIR?= share/adodb
PLIST_SUB=  ADODB_DIR=${ADODB_DIR}

ADODB_SUBDIRS=  contrib datadict drivers lang pear perf session xsl

.if !defined (WITHOUT_ADODB_OPTIONS)
OPTIONS=    TESTS "Install tests" off
.endif

.include <bsd.port.pre.mk>

.if defined (WITH_TESTS)
PLIST_SUB+= TESTS=
.else
PLIST_SUB+= TESTS="@comment "
.endif

do-install:
    @${MKDIR} ${PREFIX}/${ADODB_DIR}
    @cd ${WRKSRC}; ${FIND} ${ADODB_SUBDIRS} -type d \
        -exec ${MKDIR} ${PREFIX}/${ADODB_DIR}/{} \;
    @cd ${WRKSRC}; ${FIND} . ! -path './*/*' -type f \( -name '*.php' -or -name '*.dtd' -or -name '*.zip' \) \
        -exec ${INSTALL_DATA} ${WRKSRC}/{} ${PREFIX}/${ADODB_DIR}/{} \;
    @cd ${WRKSRC}; ${FIND} ${ADODB_SUBDIRS} -type f \
        -exec ${INSTALL_DATA} ${WRKSRC}/{} ${PREFIX}/${ADODB_DIR}/{} \;

.if defined (WITH_TESTS)
    @${MKDIR} ${PREFIX}/${ADODB_DIR}/tests
    @cd ${WRKSRC}; ${FIND} tests -type f \
        -exec ${INSTALL_DATA} ${WRKSRC}/{} ${PREFIX}/${ADODB_DIR}/{} \;
.endif

post-install:
.if !defined (NOPORTDOCS)
    @${MKDIR} ${DOCSDIR} ${DOCSDIR}/cute_icons_for_site
    @cd ${WRKSRC}; ${FIND} . ! -path './*/*' -type f -name '*.txt' \
        -exec ${INSTALL_MAN} ${WRKSRC}/{} ${DOCSDIR}/{} \;
    @cd ${WRKSRC}/docs; ${FIND} . -type f \
        -exec ${INSTALL_MAN} ${WRKSRC}/docs/{} ${DOCSDIR}/{} \;
    @cd ${WRKSRC}; ${FIND} cute_icons_for_site -type f \
        -exec ${INSTALL_MAN} ${WRKSRC}/{} ${DOCSDIR}/{} \;
.endif
    @${CAT} ${PKGMESSAGE}

.include <bsd.port.post.mk>