Lines 6-64
Link Here
|
6 |
# |
6 |
# |
7 |
|
7 |
|
8 |
PORTNAME= sqlite |
8 |
PORTNAME= sqlite |
9 |
PORTVERSION= 1.0.2 |
9 |
PORTVERSION= 1.0.3 |
10 |
CATEGORIES= databases www pear |
10 |
CATEGORIES= databases www |
|
|
11 |
MASTER_SITES= http://pecl.php.net/get/ |
12 |
PKGNAMEPREFIX= pecl- |
13 |
DISTNAME= SQLite-${PORTVERSION} |
14 |
EXTRACT_SUFX= .tgz |
15 |
DIST_SUBDIR= PECL |
11 |
|
16 |
|
12 |
MAINTAINER= mat@FreeBSD.org |
17 |
MAINTAINER= mat@FreeBSD.org |
13 |
COMMENT= PEAR classes to access sqlite databases |
18 |
COMMENT= PECL classes to access sqlite databases |
14 |
|
|
|
15 |
BUILD_DEPENDS= ${PEARDIR}/PEAR.php:${PORTSDIR}/devel/pear-PEAR |
16 |
RUN_DEPENDS= ${BUILD_DEPENDS} |
17 |
|
19 |
|
18 |
WRKSRC= ${WRKDIR}/SQLite-${PORTVERSION} |
20 |
WRKSRC= ${WRKDIR}/SQLite-${PORTVERSION} |
19 |
PKGMESSAGE= ${WRKDIR}/pkg-message |
21 |
PKGMESSAGE= ${WRKDIR}/pkg-message |
20 |
|
22 |
|
21 |
USE_PHP= yes |
23 |
USE_PHP= yes |
22 |
USE_PHPIZE= yes |
24 |
USE_PHPIZE= yes |
|
|
25 |
USE_PHPEXT= yes |
26 |
PHP_MODNAME= sqlite |
27 |
|
28 |
CONFIGURE_ARGS= --with-sqlite |
29 |
|
30 |
DOCSDIR= ${PREFIX}/share/doc/${PKGNAMEPREFIX}${PORTNAME} |
31 |
EXAMPLESDIR= ${PREFIX}/share/examples/${PKGNAMEPREFIX}${PORTNAME} |
23 |
|
32 |
|
24 |
.include <bsd.port.pre.mk> |
33 |
.include <bsd.port.pre.mk> |
25 |
.include "${PORTSDIR}/devel/pear-PEAR/Makefile.common" |
|
|
26 |
|
34 |
|
27 |
.if exists(${LOCALBASE}/bin/php-config) |
35 |
.if ${PHP_VER} == 5 |
28 |
EXT_DIR!= ${LOCALBASE}/bin/php-config --extension-dir | ${SED} -e \ |
36 |
BROKEN= Please use databases/php${PHP_VER}-sqlite |
29 |
"s:${PHP_BASE}/::" |
37 |
.endif |
|
|
38 |
|
39 |
.if !defined(NOPORTDOCS) |
40 |
PORTDOCS= * |
30 |
.endif |
41 |
.endif |
31 |
PHP_DIR?= ${LOCALBASE}/etc |
42 |
|
32 |
PHP_INI= ${PHP_DIR}/php.ini |
43 |
post-install: |
33 |
PLIST_SUB+= EXTDIR=${EXT_DIR} |
|
|
34 |
|
35 |
DOCSDIR= ${PEARDIR}/docs/${PORTNAME} |
36 |
DOCS= CREDITS README |
37 |
TESTDIR= ${PEARDIR}/tests/${PORTNAME} |
38 |
|
39 |
post-install-script: |
40 |
@${STRIP_CMD} ${PHP_BASE}/${EXT_DIR}/sqlite.so |
41 |
# Configure extension_dir |
42 |
@if [ ! -f ${PHP_INI} ]; then \ |
43 |
${ECHO_MSG} "===> Creating ${PHP_INI} for PHP" ; \ |
44 |
${CP} -p ${PHP_INI}-dist ${PHP_INI} ; \ |
45 |
fi |
46 |
.if !defined(NOPORTDOCS) |
44 |
.if !defined(NOPORTDOCS) |
47 |
@${MKDIR} ${DOCSDIR} |
45 |
@${MKDIR} ${DOCSDIR} |
48 |
.for FILE in ${DOCS} |
46 |
@${MKDIR} ${DOCSDIR}/tests |
49 |
@${INSTALL_DATA} ${WRKSRC}/${FILE} ${DOCSDIR} |
47 |
@${INSTALL_DATA} ${WRKSRC}/CREDITS ${DOCSDIR} |
50 |
.endfor |
48 |
@${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR} |
51 |
@${ECHO_MSG} "===> Documentation installed in ${DOCSDIR}." |
49 |
@${INSTALL_DATA} ${WRKSRC}/tests/* ${DOCSDIR}/tests |
52 |
@${MKDIR} ${TESTDIR} |
50 |
|
53 |
@${CP} -Rp ${WRKSRC}/tests/* ${TESTDIR} |
51 |
@${MKDIR} ${EXAMPLESDIR} |
54 |
@${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${TESTDIR} |
52 |
@${INSTALL_DATA} ${WRKSRC}/sqlite.php ${EXAMPLESDIR} |
55 |
@${ECHO_MSG} "===> Examples installed in ${TESTDIR}." |
|
|
56 |
.endif |
53 |
.endif |
57 |
@${ECHO_MSG} |
|
|
58 |
@${SED} -e "s:%%INI%%:${PHP_INI}:" \ |
59 |
-e "s:%%BASE%%:${PHP_BASE}/${EXT_DIR}:" \ |
60 |
${.CURDIR}/pkg-message > ${PKGMESSAGE} |
61 |
@${CAT} ${PKGMESSAGE} |
62 |
@${ECHO_MSG} |
63 |
|
54 |
|
64 |
.include <bsd.port.post.mk> |
55 |
.include <bsd.port.post.mk> |