]> gitweb.michael.orlitzky.com - mjo-overlay.git/blobdiff - dev-php/recaptcha/recaptcha-20150616.ebuild
dev-php/recaptcha: new package (waiting for a real release).
[mjo-overlay.git] / dev-php / recaptcha / recaptcha-20150616.ebuild
diff --git a/dev-php/recaptcha/recaptcha-20150616.ebuild b/dev-php/recaptcha/recaptcha-20150616.ebuild
new file mode 100644 (file)
index 0000000..27b9b38
--- /dev/null
@@ -0,0 +1,45 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+DESCRIPTION="PHP client library for Google's reCAPTCHA service"
+HOMEPAGE="https://github.com/google/recaptcha/"
+COMMIT="e90c632d22c1f349fa22d60f69e272fd4bd244ae"
+SRC_URI="https://github.com/google/recaptcha/archive/${COMMIT}.zip"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+DEPEND="app-arch/zip
+       test? ( >=dev-php/phpunit-4 )"
+RDEPEND="dev-lang/php"
+
+S="${WORKDIR}/${PN}-${COMMIT}"
+
+src_test(){
+       phpunit || die "test suite failed"
+}
+
+src_install(){
+       insinto "/usr/share/php/${PN}"
+       doins    src/autoload.php
+       doins -r src/ReCaptcha
+
+       dodoc    CONTRIBUTING.md README.md
+       dodoc -r examples
+}
+
+pkg_postinst(){
+       elog "${PN} has been installed in /usr/share/php/${PN}/."
+       elog
+       elog 'To use it in your scripts, include the autoload.php file'
+       elog "from the \"${PN}\" directory; for example,"
+       elog
+       elog "  require('${PN}/autoload.php');"
+       elog
+       elog 'After that, the ReCaptcha class will be available to you.'
+}