aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testing/php5-amqp/APKBUILD46
-rw-r--r--testing/php5-amqp/package_version.patch31
2 files changed, 77 insertions, 0 deletions
diff --git a/testing/php5-amqp/APKBUILD b/testing/php5-amqp/APKBUILD
new file mode 100644
index 0000000000..250e39452c
--- /dev/null
+++ b/testing/php5-amqp/APKBUILD
@@ -0,0 +1,46 @@
+# Contributor: Nathan Johnson <nathan@nathanjohnson.info>
+# Maintainer: Nathan Johnson <nathan@nathanjohnson.info>
+pkgname=php5-amqp
+_pkgreal=amqp
+pkgver=1.7.0
+pkgrel=0
+pkgdesc="PHP extension couchbase"
+url="http://pecl.php.net/package/$_pkgreal"
+arch="all"
+license="PHP"
+depends=""
+pecldepends="php5-dev autoconf"
+makedepends="$pecldepends rabbitmq-c-dev"
+source="http://pecl.php.net/get/$_pkgreal-$pkgver.tgz
+ package_version.patch"
+builddir="$srcdir/$_pkgreal-$pkgver"
+
+build() {
+ cd "$builddir"
+
+ [ -f ./package.xml ] || mv ../package.xml . || return 1
+ phpize || return 1
+ ./configure --prefix=/usr || return 1
+ make || return 1
+
+ # In order to run the unit tests, you must have a rabbitmq server
+ # available. Run the tests locally to ensure everything works,
+ # but probably not a useful thing to tax the build server with this.
+ # I have tested this for version 1.7.0 -- nj
+ # make test || return 1
+}
+
+package() {
+ cd "$builddir"
+
+ make INSTALL_ROOT="$pkgdir"/ install || return 1
+ install -d "$pkgdir"/etc/php5/conf.d || return 1
+ echo "extension=$_pkgreal.so" > "$pkgdir"/etc/php5/conf.d/$_pkgreal.ini
+}
+
+md5sums="5a701987a5c9d1f1b70b359e14d5162e amqp-1.7.0.tgz
+e4e9757fb1ae53b9d627bf52b2a8f157 package_version.patch"
+sha256sums="b9a642c0ae60cc5e049c169a017cc355bfc0f2478db588b20925eaa63d358e83 amqp-1.7.0.tgz
+717f407b667e11aaa7528555e311dbf468518480a33d57319e8a94d8a7bf865d package_version.patch"
+sha512sums="7fb16c1f49814e8eb74635672e80023bbe8655536efb28f9899c55ef328574dd806d51b7a39f972777cc643105acc6918b10009af09e4106b395b246c3463116 amqp-1.7.0.tgz
+dcc1fc97528c8b8a04c13d6e9249f1afc0c77bb4bb8ae504c4579a76665e71727b99e547a4fbd1601a72ac5f503854f7dddf1f7e267c90ab32f5d81f52b092d6 package_version.patch"
diff --git a/testing/php5-amqp/package_version.patch b/testing/php5-amqp/package_version.patch
new file mode 100644
index 0000000000..65cfd568fe
--- /dev/null
+++ b/testing/php5-amqp/package_version.patch
@@ -0,0 +1,31 @@
+--- a/config.m4
++++ b/config.m4
+@@ -104,27 +104,7 @@
+
+ PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $AMQP_DIR/$PHP_LIBDIR, AMQP_SHARED_LIBADD)
+ PHP_SUBST(AMQP_SHARED_LIBADD)
+-
+- if test -z "$TRAVIS" ; then
+- type git &>/dev/null
+-
+- if test $? -eq 0 ; then
+- git describe --abbrev=0 --tags &>/dev/null
+-
+- if test $? -eq 0 ; then
+- AC_DEFINE_UNQUOTED([PHP_AMQP_VERSION], ["`git describe --abbrev=0 --tags`-`git rev-parse --abbrev-ref HEAD`-dev"], [git version])
+- fi
+-
+- git rev-parse --short HEAD &>/dev/null
+-
+- if test $? -eq 0 ; then
+- AC_DEFINE_UNQUOTED([PHP_AMQP_REVISION], ["`git rev-parse --short HEAD`"], [git revision])
+- fi
+- else
+- AC_MSG_NOTICE([git not installed. Cannot obtain php_amqp version tag. Install git.])
+- fi
+- fi
+-
++ AC_DEFINE_UNQUOTED([PHP_AMQP_VERSION], ["`echo ${PWD##*/amqp-}`"], ["AMQP Module Version"])
+ AMQP_SOURCES="amqp.c amqp_exchange.c amqp_queue.c amqp_connection.c amqp_connection_resource.c amqp_channel.c amqp_envelope.c"
+
+ PHP_NEW_EXTENSION(amqp, $AMQP_SOURCES, $ext_shared)