1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 DESCRIPTION="PHP client library for Google's reCAPTCHA service"
7 HOMEPAGE="https://github.com/google/recaptcha"
8 SRC_URI="https://github.com/google/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
14 RESTRICT="!test? ( test )"
16 RDEPEND="dev-lang/php"
17 BDEPEND="test? ( ${RDEPEND} dev-php/phpunit )"
20 insinto "/usr/share/php/${PN}"
21 doins -r src/autoload.php src/ReCaptcha
22 dodoc CONTRIBUTING.md README.md
23 use examples && dodoc -r examples
27 phpunit || die "test suite failed"
31 elog "${PN} has been installed in /usr/share/php/${PN}/."
32 elog "To use it in a script, require('${PN}/autoload.php'),"
33 elog "and then use the ${PN} class normally. Most of the examples in"
34 elog "the documentation should work without further modification."