jsonlint-1.4.0.ebuild 878 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. DESCRIPTION="JSON Lint for PHP"
  5. HOMEPAGE="https://github.com/Seldaek/jsonlint"
  6. SRC_URI="https://github.com/Seldaek/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
  7. LICENSE="MIT"
  8. SLOT="0"
  9. KEYWORDS="~amd64 ~x86"
  10. IUSE="test"
  11. RESTRICT="test"
  12. RDEPEND="
  13. dev-lang/php:*
  14. dev-php/fedora-autoloader"
  15. DEPEND="
  16. test? (
  17. ${RDEPEND}
  18. dev-php/phpunit )"
  19. src_prepare() {
  20. default
  21. if use test; then
  22. cp "${FILESDIR}"/autoload.php "${S}"/autoload-test.php || die
  23. sed -i -e "s:__DIR__:'${S}/src/Seld/JsonLint':" "${S}"/autoload-test.php || die
  24. fi
  25. }
  26. src_install() {
  27. insinto "/usr/share/php/Seld/JsonLint"
  28. doins -r src/Seld/JsonLint/. "${FILESDIR}"/autoload.php
  29. dodoc README.mdown
  30. }
  31. src_test() {
  32. phpunit --bootstrap "${S}"/autoload-test.php || die "test suite failed"
  33. }