dev-java/sbt-bin: clean up old.
[gentoo.git] / dev-java / edtftpj / edtftpj-2.4.0.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI="5"
5
6 JAVA_PKG_IUSE="doc source"
7
8 inherit java-pkg-2 java-ant-2
9
10 DESCRIPTION="FTP client library written in Java"
11 SRC_URI="https://www.enterprisedt.com/products/edtftpj/download/${P}.zip"
12 HOMEPAGE="https://enterprisedt.com/products/edtftpnet"
13 LICENSE="LGPL-2.1+"
14 SLOT="0"
15 KEYWORDS="amd64 x86"
16 IUSE="examples"
17
18 DEPEND=">=virtual/jdk-1.7
19         app-arch/unzip"
20
21 RDEPEND=">=virtual/jre-1.7"
22
23 EANT_DOC_TARGET="javadocs"
24 EANT_BUILD_XML="src/build.xml"
25
26 java_prepare() {
27         java-pkg_clean
28
29         # Tests are geared for Windows and sit in the main sources.
30         rm -rv src/com/enterprisedt/net/ftp/test || die
31
32         # Delete Windows .bat files.
33         find -name "*.bat" -delete || die
34
35         # Adjust doc URLs to match our layout.
36         find examples -name "*.html" -exec sed -i 's:/doc/manual/:/manual/:g' {} + || die
37 }
38
39 src_install() {
40         java-pkg_dojar lib/${PN}.jar
41
42         use doc && java-pkg_dojavadoc build/doc/api
43         use source && java-pkg_dosrc src/*
44
45         docinto html
46         use doc && dodoc -r doc/manual
47         use examples && dodoc -r examples
48 }