summaryrefslogtreecommitdiff
blob: 4fa2a8c1298c68e90db9dd69f13cbfbb726d992d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=5

DESCRIPTION="A simple, object-oriented, PHP Redmine API client"
HOMEPAGE="https://github.com/kbsali/${PN}"
SRC_URI="https://github.com/kbsali/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="MIT"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE="test"

RDEPEND="dev-lang/php:*[curl,json,simplexml]"
DEPEND="test? ( ${RDEPEND} >=dev-php/phpunit-4 )"

src_install() {
	insinto "/usr/share/php/${PN}"
	doins -r lib

	dodoc example.php README.markdown
}

src_test() {
	phpunit || die "test suite failed"
}

pkg_postinst() {
	elog "${PN} has been installed in /usr/share/php/${PN}/."
	elog "To use it in a script, require('${PN}/lib/autoload.php'), and then"
	elog "use the Redmine\\Client class normally. Most of the examples in the"
	elog "documentation should work without modification."
}