aboutsummaryrefslogtreecommitdiffstats
path: root/testing/mongo-php5-driver/APKBUILD
blob: 998616802514a88ff4e15fc7e480b0da9100977e (plain)
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# 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=php5
pkgname=mongo-${_php}-driver
_realname=mongo-php-driver
pkgver=1.1.9
pkgrel=1
pkgdesc="Low-level PHP driver for MongoDB"
url="https://github.com/mongodb/mongo-php-driver"
arch="all"
license="Apache2"
depends=
depends_dev=
makedepends="$depends_dev autoconf automake libressl-dev pkgconfig
	mongo-c-driver pcre-dev ${_php}-dev"
install=
subpackages=
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 || return 1
}

package() {
	cd "$builddir"
	make INSTALL_ROOT="$pkgdir" install || return 1
	install -D -m644 "$srcdir"/mongodb.ini \
		"$pkgdir"/etc/${_php}/conf.d/mongodb.ini || return 1
}

md5sums="055a42ad282adf2c26701ff321611493  mongo-php5-driver-1.1.9.tar.gz
5d79d5504a05d5a4cd952062e73ac781  libbson-1.3.6.tar.gz
c28ea267a44ffe64c4dff64cad6bfc77  mongo-c-driver-1.3.6.tar.gz
6655e8bd293351ad3c110213ef42e2e5  mongodb.ini"
sha256sums="cf70d3016181b12108799e9fb7a8db7c859180d2544babf370b43b7f49d9b0f6  mongo-php5-driver-1.1.9.tar.gz
13f3358acf71e4d52bc006d68c7dcfb28a410e4f9b24470d9935ec8eed37fcd3  libbson-1.3.6.tar.gz
c8d48cb1fdf054447a31381ff173733fdcf79e718ce360c7e9b8d506f60d8411  mongo-c-driver-1.3.6.tar.gz
8b1a82a80dff7ec4cec7c0d4c8e41cb5d3487d2de810d05c07ac550f4196d332  mongodb.ini"
sha512sums="7bb82d1f89b907598328e3ade3cbbafc541b6a104531a4eaf10ad9ea1fbc56b1b222618871e1d15410708b9eeceb88464722f0c9eb719781366d785bf5d6a7ca  mongo-php5-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"