summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorryoon <ryoon@pkgsrc.org>2011-12-18 08:38:14 +0000
committerryoon <ryoon@pkgsrc.org>2011-12-18 08:38:14 +0000
commitbb9e176ccbc36cd72c4a5dacc72af1442e3f5ad0 (patch)
tree8ea9b0e118833e2e2b895e6da489cf8e5d605c64
parenta44b18149b0294702fc9517a721e4f7205b592f1 (diff)
downloadpkgsrc-bb9e176ccbc36cd72c4a5dacc72af1442e3f5ad0.tar.gz
Make php-sqlite and php-mysql conditional. Default is sqlite.
Fix typo in MESSAGE. Bump PKGREVISION. Tnanks you, gdt@.
-rw-r--r--www/php-owncloud/MESSAGE9
-rw-r--r--www/php-owncloud/Makefile7
-rw-r--r--www/php-owncloud/options.mk19
3 files changed, 27 insertions, 8 deletions
diff --git a/www/php-owncloud/MESSAGE b/www/php-owncloud/MESSAGE
index 33a707a4043..8c9927e75a1 100644
--- a/www/php-owncloud/MESSAGE
+++ b/www/php-owncloud/MESSAGE
@@ -1,11 +1,10 @@
===========================================================================
-$NetBSD: MESSAGE,v 1.1.1.1 2011/12/11 14:29:21 ryoon Exp $
+$NetBSD: MESSAGE,v 1.2 2011/12/18 08:38:14 ryoon Exp $
To use ownCloud, you will need to perform the following steps.
-1. If you want to use with MySQL server, install databases/mysql5-*
+1. If you want to use with MySQL server, install databases/mysql51-*
and enable it, then create database.
- Without MySQL, ownCloud works well, setting up MySQL is optional.
2. Install apache httpd server, for example www/apache22 and www/ap-php.
@@ -24,8 +23,8 @@ To use ownCloud, you will need to perform the following steps.
extension=zip.so
extension=mbstring.so
extension=json.so
- extension=mysql.so
- extension=sqlite.so
+ extension=sqlite.so ;if you select sqlite backend.
+ extension=mysql.so ;if you select MySQL backend.
5. Start apache httpd.
diff --git a/www/php-owncloud/Makefile b/www/php-owncloud/Makefile
index ab38e3e6a66..a277ff18f70 100644
--- a/www/php-owncloud/Makefile
+++ b/www/php-owncloud/Makefile
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.1.1.1 2011/12/11 14:29:20 ryoon Exp $
+# $NetBSD: Makefile,v 1.2 2011/12/18 08:38:14 ryoon Exp $
#
DISTNAME= owncloud-2.0.1
PKGNAME= ${PHP_PKG_PREFIX}-${DISTNAME}
+PKGREVISION= 1
CATEGORIES= www
MASTER_SITES= http://owncloud.org/releases/
EXTRACT_SUFX= .tar.bz2
@@ -17,8 +18,8 @@ PKG_DESTDIR_SUPPORT= user-destdir
DEPENDS+= ${PHP_PKG_PREFIX}-zip>=5.2.0:../../archivers/php-zip
DEPENDS+= ${PHP_PKG_PREFIX}-json>=5.2.0:../../textproc/php-json
DEPENDS+= ${PHP_PKG_PREFIX}-mbstring>=5.2.0:../../converters/php-mbstring
-DEPENDS+= ${PHP_PKG_PREFIX}-sqlite>=5.2.0:../../databases/php-sqlite
-DEPENDS+= ${PHP_PKG_PREFIX}-mysql>=5.2.0:../../databases/php-mysql
+
+.include "options.mk"
WRKSRC= ${WRKDIR}/owncloud
USE_LANGUAGES= # none
diff --git a/www/php-owncloud/options.mk b/www/php-owncloud/options.mk
new file mode 100644
index 00000000000..812e2ef1174
--- /dev/null
+++ b/www/php-owncloud/options.mk
@@ -0,0 +1,19 @@
+# $NetBSD: options.mk,v 1.1 2011/12/18 08:38:14 ryoon Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.php-owncloud
+
+PKG_OPTIONS_REQUIRED_GROUPS= db
+PKG_OPTIONS_GROUP.db= mysql sqlite
+
+PKG_SUGGESTED_OPTIONS= sqlite
+
+.include "../../mk/bsd.options.mk"
+
+###
+### Use mysql or sqlite backend
+###
+.if !empty(PKG_OPTIONS:Mmysql)
+DEPENDS+= ${PHP_PKG_PREFIX}-mysql>=5.2.0:../../databases/php-mysql
+.elif !empty(PKG_OPTIONS:Msqlite)
+DEPENDS+= ${PHP_PKG_PREFIX}-sqlite>=5.2.0:../../databases/php-sqlite
+.endif