aboutsummaryrefslogtreecommitdiffstats
path: root/databases/phppgadmin/Makefile
blob: df046d3489859e67a5829aa085dad1c39437c62d (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
# Created by: nbm
# $FreeBSD$

PORTNAME=   phppgadmin
PORTVERSION=    5.1
CATEGORIES= databases www
MASTER_SITES=   SF/${PORTNAME}/phpPgAdmin%20%5Bstable%5D/phpPgAdmin-5.1
DISTNAME=   phpPgAdmin-${PORTVERSION}

MAINTAINER= dinoex@FreeBSD.org
COMMENT=    Web Based Postgres Administration

LICENSE=    GPLv2

USE_BZIP2=  YES
.if !defined(WITHOUT_PHP_DEPENDS)
USE_PHP=    pgsql pcre session
.endif
NO_BUILD=   YES
PGADMDIR?=  www/phpPgAdmin
PLIST_SUB+= PGADMDIR=${PGADMDIR}
PGADMOLDDIR?=   www/data-dist/phpPgAdmin
PLIST_SUB+= PGADMOLDDIR=${PGADMOLDDIR}

NO_STAGE=   yes
pre-everything::
    @${ECHO_CMD} "# you can customize the installation directory"
    @${ECHO_CMD} "# by setting PGADMDIR in /etc/make.conf"

do-configure:
    ${REINPLACE_CMD} -e "s|/usr/bin/pg|${LOCALBASE}/bin/pg|" \
        ${WRKSRC}/conf/config.inc.php-dist
    ${RM} -f ${WRKSRC}/conf/config.inc.php \
        ${WRKSRC}/conf/config.inc.php-dist.bak

.include <bsd.port.pre.mk>

do-install:
    ${MKDIR} ${PREFIX}/${PGADMDIR}
    ${RM} -f ${WRKSRC}/classes/database/Postgres81.php.orig
    ${CP} -Rp ${WRKSRC}/ ${PREFIX}/${PGADMDIR}/
.if exists(${PREFIX}/${PGADMOLDDIR}/conf/config.inc.php)
    ${CP} -np ${PREFIX}/${PGADMOLDDIR}/conf/config.inc.php \
        ${PREFIX}/${PGADMDIR}/conf/config.inc.php || ${TRUE}
.endif
    ${CP} -np ${PREFIX}/${PGADMDIR}/conf/config.inc.php-dist \
        ${PREFIX}/${PGADMDIR}/conf/config.inc.php || ${TRUE}

.include <bsd.port.post.mk>