]> Pileus Git - ~andy/sunrise/blob - app-text/writer2latex/writer2latex-0.5_beta3.ebuild
sunrise/ app-portage/elog-list/elog-list-0.0.6.ebuild: Update headers for 2010
[~andy/sunrise] / app-text / writer2latex / writer2latex-0.5_beta3.ebuild
1 # Copyright 1999-2010 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 inherit eutils latex-package java-pkg-2 java-ant-2
6
7 MY_PV=${PV//./}
8 MY_PV=${MY_PV/_/}
9 MY_P=${PN}${MY_PV}
10
11 DESCRIPTION="Writer2Latex (w2l) - converter from OpenDocument .odt format"
12 HOMEPAGE="http://www.hj-gym.dk/~hj/writer2latex"
13 SRC_URI="http://www.hj-gym.dk/~hj/${PN}/${MY_P}.zip
14                 http://fc.hj-gym.dk/~hj/${MY_P}.zip"
15
16 SLOT="0"
17 LICENSE="GPL-2"
18 KEYWORDS="~x86"
19 IUSE="doc examples"
20
21 DEPEND="=virtual/jdk-1.4*
22         app-arch/unzip"
23 RDEPEND=">=virtual/jre-1.4"
24
25 S=${WORKDIR}/${PN}05
26
27 src_unpack(){
28         unpack ${A}
29         cd "${S}"
30         rm ${PN}.jar
31         sed -i -e "s:W2LPATH=.*:W2LPATH=/usr/lib/${PN}:" "${S}"/w2l || die "Sed failed"
32 }
33
34 EANT_EXTRA_ARGS="-DOFFICE_HOME=/usr/lib/openoffice"
35 EANT_BUILD_TARGET="all"
36
37 src_install() {
38
39         dobin w2l
40
41         rm build.xml
42         insinto /usr/lib/${PN}
43         doins *.xml
44         doins *.xsl
45         java-pkg_jarinto /usr/lib/${PN}
46         java-pkg_dojar "${S}/target/lib/${PN}.jar"
47
48         cd "${S}"
49         latex-package_src_install
50
51         if use doc ; then
52                 dohtml -r doc
53                 cp doc/*.pdf "${D}"/usr/share/doc/${PF} || die "Failed to copy .pdfs"
54                 cp doc/*.odt "${D}"/usr/share/doc/${PF} || die "Failed to copy .odts"
55
56                 java-pkg_dojavadoc target/javadoc
57
58         fi
59         if use examples; then
60                 cp -R samples "${D}"/usr/share/doc/${PF} || die "Failed to copy samples"
61         fi
62
63         dodoc History.txt Readme.txt changelog05.txt
64 }