1 # $NetBSD: Makefile,v 1.23 2012/10/02 20:11:48 asau Exp $
6 PKGNAME
= ${PHP_PKG_PREFIX}-${DISTNAME
:S
/PEAR
/pear
/}
8 MASTER_SITES
= http
://download.pear.php.net
/package
/
11 MAINTAINER
= pkgsrc-users@NetBSD.org
12 HOMEPAGE
= http
://pear.php.net
/
13 COMMENT
= PEAR Base System for PHP
20 .
include "../../lang/php/phpversion.mk"
22 CONFLICTS
+= php
<5.2.1nb2
24 CONF_FILES
= ${PREFIX}/share
/examples
/pear
/pear.conf \
25 ${PKG_SYSCONFDIR}/pear.conf
27 BUNDLE
= ${WRKSRC}/install/go-pear-bundle
29 # everything else that forms a part of the "base" PEAR install
31 PEAR_SRCS
= ${DISTNAME}${EXTRACT_SUFX}
32 DISTFILES
+= ${PEAR_SRCS}
33 EXTRACT_ONLY
+= ${PEAR_SRCS}
35 ARCHIVE_SRCS
= Archive_Tar-1.3
.11${EXTRACT_SUFX}
36 ARCHIVE_WRKSRC
= ${WRKDIR}/${ARCHIVE_SRCS
:S
/${EXTRACT_SUFX}//}
37 DISTFILES
+= ${ARCHIVE_SRCS}
38 EXTRACT_ONLY
+= ${ARCHIVE_SRCS}
40 CONSOLE_SRCS
= Console_Getopt-1.3
.1${EXTRACT_SUFX}
41 CONSOLE_WRKSRC
= ${WRKDIR}/${CONSOLE_SRCS
:S
/${EXTRACT_SUFX}//}
42 DISTFILES
+= ${CONSOLE_SRCS}
43 EXTRACT_ONLY
+= ${CONSOLE_SRCS}
45 STRUCTURES_SRCS
= Structures_Graph-1.0
.4${EXTRACT_SUFX}
46 DISTFILES
+= ${STRUCTURES_SRCS}
48 XMLUTIL_SRCS
= XML_Util-1.2
.1${EXTRACT_SUFX}
49 DISTFILES
+= ${XMLUTIL_SRCS}
52 # end of base components
54 SUBST_CLASSES
+= config
55 SUBST_STAGE.config
= post-patch
56 SUBST_FILES.config
= install/go-pear.php
57 SUBST_SED.config
= -e
"s|@WRKSRC@|${WRKSRC}|g"
58 SUBST_SED.config
+= -e
"s|@PREFIX@|${PREFIX}|g"
59 SUBST_MESSAGE.config
= Fixing configuration files.
61 REPLACE_SH
+= script
/pear.sh
63 INSTALLATION_DIRS
+= share
/examples
/pear
66 ${RM} ${WRKSRC}/INSTALL
67 ${MKDIR} ${WRKSRC}/install
69 ${CP} ${FILESDIR}/go-pear.php
${WRKSRC}/install
70 ${CP} ${FILESDIR}/PEAR.php
${BUNDLE}
73 ${GZCAT} ${DISTDIR}/${ARCHIVE_SRCS} > \
74 ${BUNDLE}/${ARCHIVE_SRCS
:S
/${EXTRACT_SUFX}/.
tar/}
75 ${GZCAT} ${DISTDIR}/${CONSOLE_SRCS} > \
76 ${BUNDLE}/${CONSOLE_SRCS
:S
/${EXTRACT_SUFX}/.
tar/}
77 ${GZCAT} ${DISTDIR}/${PEAR_SRCS} > \
78 ${BUNDLE}/${PEAR_SRCS
:S
/${EXTRACT_SUFX}/.
tar/}
79 ${GZCAT} ${DISTDIR}/${STRUCTURES_SRCS} > \
80 ${BUNDLE}/${STRUCTURES_SRCS
:S
/${EXTRACT_SUFX}/.
tar/}
81 ${GZCAT} ${DISTDIR}/${XMLUTIL_SRCS} > \
82 ${BUNDLE}/${XMLUTIL_SRCS
:S
/${EXTRACT_SUFX}/.
tar/}
84 ${CP} ${ARCHIVE_WRKSRC}/Archive
/Tar.php
${BUNDLE}
85 ${CP} ${CONSOLE_WRKSRC}/Console
/Getopt.php
${BUNDLE}
88 ${SETENV} ${INSTALL_ENV} ${PREFIX}/bin
/php
${WRKSRC}/install/go-pear.php local
89 ${INSTALL_DATA} ${WRKSRC}/pear.conf \
90 ${DESTDIR}${PREFIX}/share
/examples
/pear
/pear.conf
92 .
include "${PHPPKGSRCDIR}/buildlink3.mk"
94 BUILDLINK_API_DEPENDS.php
+= php
>=5.2.1nb2
96 .
include "../../mk/bsd.pkg.mk"