summaryrefslogtreecommitdiff
path: root/databases/adminer/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'databases/adminer/Makefile')
-rw-r--r--databases/adminer/Makefile33
1 files changed, 23 insertions, 10 deletions
diff --git a/databases/adminer/Makefile b/databases/adminer/Makefile
index ff0b2882185c..b8372b3a5209 100644
--- a/databases/adminer/Makefile
+++ b/databases/adminer/Makefile
@@ -1,10 +1,11 @@
PORTNAME= adminer
DISTVERSION= 5.3.0
+PORTREVISION= 1
CATEGORIES= databases www
-MASTER_SITES= https://github.com/vrana/adminer/releases/download/v${DISTVERSION}/
+MASTER_SITES= https://github.com/vrana/${PORTNAME}/releases/download/v${DISTVERSION}/
PKGNAMEPREFIX= ${PHP_PKGNAMEPREFIX}
-EXTRACT_SUFX= .php
-EXTRACT_ONLY=
+DISTFILES= ${PORTNAME}-${DISTVERSION}.php ${PORTNAME}-${DISTVERSION}.zip
+EXTRACT_ONLY= ${PORTNAME}-${DISTVERSION}.zip
MAINTAINER= pkaipila@gmail.com
COMMENT= Full-featured database management tool written in PHP
@@ -12,20 +13,32 @@ WWW= https://www.adminer.org
LICENSE= APACHE20
-USES= cpe php:flavors
-USE_PHP= session
+USES= cpe php:build,flavors
+USE_PHP= phar session zlib
NO_ARCH= yes
-NO_BUILD= yes
-SUB_FILES= pkg-message
-SUB_LIST= PHPVER="${PHP_VER}"
PLIST_SUB= WWWGRP="${WWWGRP}" \
WWWOWN="${WWWOWN}"
+OPTIONS_DEFINE= MYSQL PGSQL SQLITE
+OPTIONS_DEFAULT= MYSQL SQLITE
+
+MYSQL_DESC= MySQL and MariaDB driver
+PGSQL_DESC= PostgreSQL driver
+SQLITE_DESC= SQLite driver
+
+MYSQL_USE= PHP=mysqli
+PGSQL_USE= PHP=pgsql
+SQLITE_USE= PHP=sqlite3
+
+do-build:
+ ${CP} ${DISTDIR}/${PORTNAME}-${DISTVERSION}.php ${WRKSRC}/${PORTNAME}.php
+ ${CP} ${FILESDIR}/makephar.php ${WRKSRC}
+ ${LOCALBASE}/bin/php -d phar.readonly=0 ${WRKSRC}/makephar.php
+
do-install:
${MKDIR} ${STAGEDIR}${WWWDIR}
- ${INSTALL_DATA} ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX} \
- ${STAGEDIR}${WWWDIR}/index.php
+ ${INSTALL_DATA} ${WRKSRC}/index.php ${STAGEDIR}${WWWDIR}
.include <bsd.port.mk>