aboutsummaryrefslogtreecommitdiffstats
path: root/databases/adodb/Makefile
blob: c8595db819593745af5a9d371770e1941a174e62 (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
# Created by: abgoeree@uwnet.nl
# $FreeBSD$

PORTNAME=   adodb
PORTVERSION=    4.99.2
CATEGORIES= databases www
MASTER_SITES=   SF/${PORTNAME}/${PORTNAME}-php-4-and-5/${PORTNAME}-${PORTVERSION:S/.//g}-for-php
DISTNAME=   ${PORTNAME}${PORTVERSION:S/.//g}
EXTRACT_SUFX=   .tgz

MAINTAINER= joehorn@gmail.com
COMMENT=    Database library for PHP

LICENSE=    BSD

USE_PHP=    pcre

CONFLICTS=  adodb-5.*

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

ADODB_SUBDIRS=  contrib datadict drivers lang pear perf session xsl

OPTIONS_DEFINE= TESTS DOCS
TESTS_DESC= Install tests

.include <bsd.port.options.mk>

SUB_FILES+= pkg-message

.if ${PORT_OPTIONS:MTESTS}
PLIST_SUB+= TESTS=
.else
PLIST_SUB+= TESTS="@comment "
.endif

post-patch:
    @cd ${WRKSRC}; ${RM} -f cute_icons_for_site/Thumbs.db

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

.if ${PORT_OPTIONS:MTESTS}
    @${MKDIR} ${STAGEDIR}${DATADIR}/tests
    @cd ${WRKSRC}; ${FIND} tests -type f \
        -exec ${INSTALL_DATA} ${WRKSRC}/{} ${STAGEDIR}${DATADIR}/{} \;
.endif

post-install:
.if ${PORT_OPTIONS:MDOCS}
    @${MKDIR} ${STAGEDIR}${DOCSDIR} ${STAGEDIR}${DOCSDIR}/cute_icons_for_site
    @cd ${WRKSRC}; ${FIND} . ! -path './*/*' -type f -name '*.txt' \
        -exec ${INSTALL_MAN} ${WRKSRC}/{} ${STAGEDIR}${DOCSDIR}/{} \;
    @cd ${WRKSRC}/docs; ${FIND} . -type f \
        -exec ${INSTALL_MAN} ${WRKSRC}/docs/{} ${STAGEDIR}${DOCSDIR}/{} \;
    @cd ${WRKSRC}; ${FIND} cute_icons_for_site -type f \
        -exec ${INSTALL_MAN} ${WRKSRC}/{} ${STAGEDIR}${DOCSDIR}/{} \;
.endif

.include <bsd.port.mk>