aboutsummaryrefslogtreecommitdiffstats
path: root/devel/pear-PEAR/Makefile.common
blob: d229ae2403232bb184cc67bd86a749fbba5af982 (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
# $FreeBSD$

# Common code for pear- ports.

MASTER_SITES=   http://pear.php.net/get/
PKGNAMEPREFIX=  pear-
EXTRACT_SUFX=   .tgz
DIST_SUBDIR=    PEAR

NO_BUILD=   yes

.if exists(${LOCALBASE}/bin/php-config)
PHP_BASE!=  ${LOCALBASE}/bin/php-config --prefix
.else
PHP_BASE=   ${LOCALBASE}
.endif
LPEARDIR=   share/pear
PEARDIR=    ${PHP_BASE}/${LPEARDIR}
LPKGREGDIR= ${LPEARDIR}/packages/${PKGNAME}
PKGREGDIR=  ${PHP_BASE}/${LPKGREGDIR}
PLIST_SUB=  PEARDIR=${LPEARDIR} PKGREGDIR=${LPKGREGDIR}
PKGINSTALL= ${.CURDIR}/../../devel/pear-PEAR/pkg-install
PKGDEINSTALL=   ${.CURDIR}/../../devel/pear-PEAR/pkg-deinstall

DOCSDIR=    ${PEARDIR}/docs/${PORTNAME}

pre-install:
.if exists(${LOCALBASE}/lib/php.DIST_PHP)   \
    || exists(${PHP_BASE}/lib/php.DIST_PHP) \
    || exists(${LOCALBASE}/.PEAR.pkg)   \
    || exists(${PHP_BASE}/.PEAR.pkg)
    @${ECHO_MSG} ""
    @${ECHO_MSG} "  Sorry, the PEAR structure has been modified;"
    @${ECHO_MSG} "  Please deinstall your installed pear- ports."
    @${ECHO_MSG} ""
    @${FALSE}
.endif

post-install:
    @${MKDIR} ${PKGREGDIR}
    @${INSTALL_DATA} ${WRKDIR}/package.xml ${PKGREGDIR}
    @${SETENV} PKG_PREFIX=${PREFIX} \
    ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL