aboutsummaryrefslogtreecommitdiffstats
path: root/testing/mongo-php7-driver
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@alpinelinux.org>2017-04-07 13:22:06 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2017-04-07 13:22:06 +0000
commite6274e3f89c0e3770d46adbab645f6a67e9a7fc2 (patch)
treed67ecc6d2a7dc53e450593bbe9302a85b2e3a74b /testing/mongo-php7-driver
parentf4965d2c9d05e51079076cdf2af5cb9aff3a062a (diff)
downloadaports-e6274e3f89c0e3770d46adbab645f6a67e9a7fc2.tar.bz2
aports-e6274e3f89c0e3770d46adbab645f6a67e9a7fc2.tar.xz
testing/mongo-php7-driver: new aport
Diffstat (limited to 'testing/mongo-php7-driver')
-rw-r--r--testing/mongo-php7-driver/APKBUILD82
-rw-r--r--testing/mongo-php7-driver/mongodb.ini1
2 files changed, 83 insertions, 0 deletions
diff --git a/testing/mongo-php7-driver/APKBUILD b/testing/mongo-php7-driver/APKBUILD
new file mode 100644
index 0000000000..690d815b56
--- /dev/null
+++ b/testing/mongo-php7-driver/APKBUILD
@@ -0,0 +1,82 @@
+# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
+
+test -e ../libbson/APKBUILD && . ../libbson/APKBUILD && libbson_ver=$pkgver || return 1
+test -e ../mongo-c-driver/APKBUILD && . ../mongo-c-driver/APKBUILD && mongocdrv_ver=$pkgver || return 1
+
+_php=php7
+pkgname=mongo-${_php}-driver
+_realname=mongo-php-driver
+pkgver=1.1.9
+pkgrel=0
+pkgdesc="Low-level PHP driver for MongoDB"
+url="https://github.com/mongodb/mongo-php-driver"
+arch="all"
+license="Apache2"
+makedepends="autoconf automake libressl-dev pkgconfig
+ mongo-c-driver pcre-dev ${_php}-dev"
+options="!check" #fails, is attended
+subpackages=""
+install=""
+source="$pkgname-$pkgver.tar.gz::https://github.com/mongodb/$_realname/archive/$pkgver.tar.gz
+ libbson-${libbson_ver}.tar.gz::https://github.com/mongodb/libbson/archive/${libbson_ver}.tar.gz
+ mongo-c-driver-${mongocdrv_ver}.tar.gz::https://github.com/mongodb/mongo-c-driver/archive/${mongocdrv_ver}.tar.gz
+ mongodb.ini
+ "
+
+builddir="$srcdir"/$_realname-$pkgver
+
+unpack() {
+ local u
+ if [ -z "$force" ]; then
+ verify || return 1
+ initdcheck || return 1
+ fi
+ mkdir -p "$srcdir"
+ for u in $source; do
+ local s="$SRCDEST/$(filename_from_uri $u)"
+ echo $s
+ case "$s" in
+ *$pkgname-$pkgver.*)
+ msg "Unpacking $s..."
+ tar xzf "$s" -C "$srcdir" || return 1;;
+ *libbson*)
+ msg "Unpacking $s..."
+ tar xzf "$s" --strip 1 -C "$srcdir"/$_realname-$pkgver/src/libbson || return 1;;
+ *mongo-c-driver*)
+ msg "Unpacking $s..."
+ tar xzf "$s" --strip 1 -C "$srcdir"/$_realname-$pkgver/src/libmongoc || return 1;;
+ esac
+ done
+}
+
+prepare() {
+ cd "$builddir"
+ phpize || return 1
+}
+
+build() {
+ cd "$builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info
+ make
+}
+
+package() {
+ cd "$builddir"
+ make INSTALL_ROOT="$pkgdir" EXTENSION_DIR="/usr/lib/$_php/modules" \
+ install
+ install -D -m644 "$srcdir"/mongodb.ini \
+ "$pkgdir"/etc/${_php}/conf.d/mongodb.ini
+}
+
+check() {
+ cd "$builddir"
+ make test
+}
+
+sha512sums="7bb82d1f89b907598328e3ade3cbbafc541b6a104531a4eaf10ad9ea1fbc56b1b222618871e1d15410708b9eeceb88464722f0c9eb719781366d785bf5d6a7ca mongo-php7-driver-1.1.9.tar.gz
+cf6fb3e95b0bc49517190ebbf8592e57934866510c4f00ac04406f013ebca4873d3f615d98b4e36437f8b676f0434209d7321e45e5d131e144d294031f06cc59 libbson-1.3.6.tar.gz
+d4f04fe74ca757cbd04d68903dca80a104701e85c809d5acd21ad2b8d98368a24f1951700694b7acc853c405e66d44521aa82c933c23300e7f2c354c01d7bc24 mongo-c-driver-1.3.6.tar.gz
+acc09667ce1ceb1b5854a2d80f635be6ca7539df5a59043ff80e96759150e1715e5d16f8e97612ec43b504e50d08cda71da416b91d5d4da54f8284da1eefa2f3 mongodb.ini"
diff --git a/testing/mongo-php7-driver/mongodb.ini b/testing/mongo-php7-driver/mongodb.ini
new file mode 100644
index 0000000000..45969d065b
--- /dev/null
+++ b/testing/mongo-php7-driver/mongodb.ini
@@ -0,0 +1 @@
+extension=mongodb.so