2001-01-19 13:53:37 +01:00
|
|
|
# New ports collection makefile for: phpMyAdmin
|
|
|
|
# Date created: 19 Jan 2001
|
|
|
|
# Whom: nbm
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
2002-03-23 13:24:12 +01:00
|
|
|
PORTNAME= phpMyAdmin
|
2012-02-15 01:01:21 +01:00
|
|
|
DISTVERSION= 3.4.10
|
2001-01-19 13:53:37 +01:00
|
|
|
CATEGORIES= databases www
|
2011-09-15 01:26:28 +02:00
|
|
|
MASTER_SITES= SF/${PORTNAME:L}/${PORTNAME}/${DISTVERSION}
|
2008-06-29 01:45:06 +02:00
|
|
|
DISTNAME= ${PORTNAME}-${DISTVERSION}-all-languages
|
2001-01-19 13:53:37 +01:00
|
|
|
|
2012-02-09 18:09:51 +01:00
|
|
|
MAINTAINER= matthew@FreeBSD.org
|
2004-10-12 03:06:15 +02:00
|
|
|
COMMENT= A set of PHP-scripts to manage MySQL over the web
|
2001-01-19 13:53:37 +01:00
|
|
|
|
2010-06-30 03:38:20 +02:00
|
|
|
LICENSE= GPLv2
|
|
|
|
|
2008-10-15 16:51:53 +02:00
|
|
|
IGNORE_WITH_PHP= 4
|
2011-12-16 02:43:54 +01:00
|
|
|
USE_XZ= yes
|
2002-03-23 13:24:12 +01:00
|
|
|
NO_BUILD= yes
|
2007-01-18 07:56:59 +01:00
|
|
|
.if !defined(WITHOUT_PHP_DEPENDS)
|
2012-02-15 01:01:21 +01:00
|
|
|
USE_PHP= ctype session filter mbstring json spl
|
2007-01-18 07:56:59 +01:00
|
|
|
.endif
|
2002-03-23 13:24:12 +01:00
|
|
|
|
2011-03-19 20:58:15 +01:00
|
|
|
# Note: default settings will pull in X11 client support. If you don't
|
|
|
|
# want this, either turn off GD in the config dialog, or else turn off
|
|
|
|
# FONTCONFIG in the graphics/gd port options.
|
|
|
|
|
2011-05-16 16:49:33 +02:00
|
|
|
OPTIONS= SUPHP "suPHP support" off \
|
|
|
|
BZ2 "bzip2 library support" on \
|
|
|
|
GD "GD library support (requires X11)" on \
|
2012-02-15 01:01:21 +01:00
|
|
|
MYSQL "MySQL support via mysql client" off \
|
|
|
|
MYSQLI "Improved MySQL client support" off \
|
2011-05-16 16:49:33 +02:00
|
|
|
OPENSSL "OpenSSL support" on \
|
|
|
|
PDF "PDFlib support" on \
|
|
|
|
ZLIB "ZLIB support" on \
|
|
|
|
MCRYPT "MCrypt library support" on \
|
|
|
|
ZIP "Zip compression support" on \
|
|
|
|
APC "APC (animated progress bar) support" on
|
2009-12-22 12:48:41 +01:00
|
|
|
|
|
|
|
.include <bsd.port.options.mk>
|
2004-10-12 03:06:15 +02:00
|
|
|
|
|
|
|
.if defined(WITH_SUPHP) && !defined(WITHOUT_SUPHP)
|
2004-05-20 18:29:49 +02:00
|
|
|
|
|
|
|
PKGNAMESUFFIX= -suphp
|
2004-07-24 19:39:18 +02:00
|
|
|
RUN_DEPENDS+= ${LOCALBASE}/sbin/suphp:${PORTSDIR}/www/suphp
|
|
|
|
WANT_PHP_CGI= yes
|
2004-05-20 18:29:49 +02:00
|
|
|
|
|
|
|
.else
|
|
|
|
|
|
|
|
WANT_PHP_WEB= yes
|
|
|
|
|
|
|
|
.endif
|
|
|
|
|
2009-12-22 12:48:41 +01:00
|
|
|
# USERS is only used WITH_SUPHP
|
|
|
|
GROUPS?= ${WWWGRP}
|
2008-01-21 11:58:20 +01:00
|
|
|
CFGFILE= config.inc.php
|
|
|
|
|
|
|
|
PLIST= ${WRKDIR}/plist
|
2009-12-22 12:48:41 +01:00
|
|
|
PLIST_SUB+= PMA_GRP=${GROUPS}
|
2008-01-21 11:58:20 +01:00
|
|
|
|
|
|
|
.if defined(WITH_SUPHP) && !defined(WITHOUT_SUPHP)
|
|
|
|
|
2009-12-22 12:48:41 +01:00
|
|
|
USERS?= _pma
|
|
|
|
|
|
|
|
SUB_LIST+= PMA_USR=${USERS} \
|
|
|
|
PMA_GRP=${GROUPS}
|
2008-01-21 11:58:20 +01:00
|
|
|
SUB_FILES+= pkg-install pkg-deinstall
|
|
|
|
|
|
|
|
.endif
|
|
|
|
|
|
|
|
SUB_LIST+= PKGNAME=${PKGNAME}
|
|
|
|
SUB_FILES+= pkg-message
|
|
|
|
|
2004-10-12 03:06:15 +02:00
|
|
|
LATEST_LINK= ${PORTNAME}${PKGNAMESUFFIX}
|
|
|
|
|
2007-01-18 07:56:59 +01:00
|
|
|
.if !defined(WITHOUT_PHP_DEPENDS)
|
2010-05-16 11:28:51 +02:00
|
|
|
|
2004-10-13 10:54:07 +02:00
|
|
|
# Options that default to on:
|
2011-05-16 16:49:33 +02:00
|
|
|
.for opt in BZ2 GD OPENSSL PDF ZLIB MCRYPT MBSTRING ZIP APC
|
2004-10-12 03:06:15 +02:00
|
|
|
. if !defined(WITHOUT_${opt}) || defined(WITH_${opt})
|
|
|
|
USE_PHP+= ${opt:L}
|
|
|
|
. endif
|
|
|
|
.endfor
|
|
|
|
|
2004-10-13 10:54:07 +02:00
|
|
|
# Options that default to off:
|
|
|
|
.for opt in MYSQLI
|
|
|
|
. if defined(WITH_${opt}) && !defined(WITHOUT_${opt})
|
|
|
|
USE_PHP+= ${opt:L}
|
|
|
|
. endif
|
|
|
|
.endfor
|
2007-01-18 07:56:59 +01:00
|
|
|
.endif
|
2004-10-13 10:54:07 +02:00
|
|
|
|
2004-05-20 18:29:49 +02:00
|
|
|
.SILENT:
|
|
|
|
|
2007-03-07 22:34:20 +01:00
|
|
|
# When creating a package, empty directories will not be generated
|
2009-12-22 12:48:41 +01:00
|
|
|
# from the pkg tarball. Therefore make sure no directories are empty.
|
2007-03-07 22:34:20 +01:00
|
|
|
|
2002-03-23 13:24:12 +01:00
|
|
|
post-patch:
|
2007-03-07 22:34:20 +01:00
|
|
|
cd ${WRKSRC} ; \
|
|
|
|
for emptydir in $$( ${FIND} . -type d -empty -print ) ; do \
|
|
|
|
${TOUCH} $${emptydir}/.keep-me ; \
|
2010-03-09 00:24:47 +01:00
|
|
|
done ; \
|
|
|
|
${CP} ${FILESDIR}/${CFGFILE}.sample ${WRKSRC}/${CFGFILE}.sample ; \
|
|
|
|
${FIND} . ! -type d ! -name ${CFGFILE}.sample ! -name '*.bak' | \
|
|
|
|
${SORT} | ${SED} -e "s,^\.,%%WWWDIR%%," >${PLIST} ; \
|
2009-12-22 12:48:41 +01:00
|
|
|
${CAT} ${PKGDIR}/pkg-plist-chunk >>${PLIST} ; \
|
2004-05-20 18:29:49 +02:00
|
|
|
${FIND} . -type d | ${SORT} -r | ${SED} \
|
2010-03-09 00:24:47 +01:00
|
|
|
-e "s,^\.$$,@dirrmtry %%WWWDIR%%," \
|
|
|
|
-e "s,^\.,@dirrm %%WWWDIR%%," >>${PLIST}
|
2004-05-20 18:29:49 +02:00
|
|
|
|
|
|
|
do-install: install-app install-conf
|
|
|
|
|
|
|
|
install-app:
|
|
|
|
cd ${WRKSRC} ; \
|
2010-03-09 00:24:47 +01:00
|
|
|
for src in $$( ${FIND} . ! -name .cvsignore ! -name '*.bak' ) ; do \
|
2008-01-21 11:58:20 +01:00
|
|
|
dst=${WWWDIR}$${src#.} ; \
|
2010-03-09 00:24:47 +01:00
|
|
|
if ${TEST} -d "$$src" ; then \
|
|
|
|
${MKDIR} "$$dst" ; \
|
2004-05-20 18:29:49 +02:00
|
|
|
else \
|
2010-03-09 00:24:47 +01:00
|
|
|
${INSTALL_DATA} "$$src" "$$dst" ; \
|
2004-05-20 18:29:49 +02:00
|
|
|
fi \
|
|
|
|
done
|
|
|
|
|
|
|
|
install-conf: install-app
|
2008-01-21 11:58:20 +01:00
|
|
|
cd ${WWWDIR} ; \
|
2004-05-20 18:29:49 +02:00
|
|
|
${CHMOD} 0640 ${CFGFILE}.sample ; \
|
2009-12-22 12:48:41 +01:00
|
|
|
${CHGRP} ${WWWGRP} ${CFGFILE}.sample ; \
|
2004-05-20 18:29:49 +02:00
|
|
|
if ${TEST} ! -f ${CFGFILE} ; then \
|
|
|
|
${CP} -p ${CFGFILE}.sample ${CFGFILE} ; \
|
|
|
|
fi
|
|
|
|
|
|
|
|
post-install:
|
|
|
|
.if defined(WITH_SUPHP)
|
|
|
|
${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
|
|
|
|
.endif
|
|
|
|
${CAT} ${PKGMESSAGE}
|
2001-01-19 13:53:37 +01:00
|
|
|
|
2012-02-15 01:01:21 +01:00
|
|
|
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
|
|
|
# phpMyAdmin can use the mysql native drivers which are available by
|
|
|
|
# default when using the lang/php5 port. If you're using lang/php52
|
|
|
|
# then you will need either WITH_MYSQL or WITH_MYSQLI enabled.
|
|
|
|
|
|
|
|
.if ${PHP_VER} == "52" && !defined(WITH_MYSQL) && !defined(WITH_MYSQLI)
|
|
|
|
BROKEN= ${PKGNAME} needs one of WITH_MYSQL or WITH_MYSQLI in order to work with php-5.2.x
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.include <bsd.port.post.mk>
|