]> gitweb.michael.orlitzky.com - mjo-overlay.git/blob - 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
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI=5
6
7 DESCRIPTION="PHP client library for Google's reCAPTCHA service"
8 HOMEPAGE="https://github.com/google/recaptcha/"
9 COMMIT="e90c632d22c1f349fa22d60f69e272fd4bd244ae"
10 SRC_URI="https://github.com/google/recaptcha/archive/${COMMIT}.zip"
11
12 LICENSE="BSD"
13 SLOT="0"
14 KEYWORDS="~amd64 ~x86"
15 IUSE="test"
16
17 DEPEND="app-arch/zip
18 test? ( >=dev-php/phpunit-4 )"
19 RDEPEND="dev-lang/php"
20
21 S="${WORKDIR}/${PN}-${COMMIT}"
22
23 src_test(){
24 phpunit || die "test suite failed"
25 }
26
27 src_install(){
28 insinto "/usr/share/php/${PN}"
29 doins src/autoload.php
30 doins -r src/ReCaptcha
31
32 dodoc CONTRIBUTING.md README.md
33 dodoc -r examples
34 }
35
36 pkg_postinst(){
37 elog "${PN} has been installed in /usr/share/php/${PN}/."
38 elog
39 elog 'To use it in your scripts, include the autoload.php file'
40 elog "from the \"${PN}\" directory; for example,"
41 elog
42 elog " require('${PN}/autoload.php');"
43 elog
44 elog 'After that, the ReCaptcha class will be available to you.'
45 }