2008-07-31 14:13:09 +02:00
|
|
|
# Copyright 1999-2008 Gentoo Foundation
|
2007-10-20 15:27:19 +02:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
# $Header: $
|
|
|
|
|
2008-07-31 14:39:25 +02:00
|
|
|
EAPI=1
|
2007-10-20 15:27:19 +02:00
|
|
|
JAVA_PKG_IUSE="doc"
|
2007-10-21 11:35:31 +02:00
|
|
|
inherit java-pkg-2 eutils java-ant-2
|
2007-10-20 15:27:19 +02:00
|
|
|
|
|
|
|
MY_P="${P/_p/-sr}"
|
2007-10-20 17:15:50 +02:00
|
|
|
MY_BV="1"
|
2007-10-20 15:27:19 +02:00
|
|
|
|
|
|
|
DESCRIPTION="A free open source tool to split and merge pdf documents"
|
|
|
|
HOMEPAGE="http://www.pdfsam.org/"
|
2010-05-10 20:43:24 +02:00
|
|
|
SRC_URI="http://ftp.disconnected-by-peer.at/pub/${MY_P}-build-${MY_BV}-src.zip
|
2008-07-31 14:39:25 +02:00
|
|
|
mirror://sourceforge/${PN}/${MY_P}-out-src.zip"
|
2008-07-31 14:13:09 +02:00
|
|
|
LICENSE="GPL-2"
|
2007-10-20 15:27:19 +02:00
|
|
|
SLOT="1.3"
|
2008-07-31 14:39:25 +02:00
|
|
|
KEYWORDS="~amd64 ~x86"
|
2007-10-20 15:27:19 +02:00
|
|
|
IUSE=""
|
|
|
|
|
|
|
|
S="${WORKDIR}"
|
|
|
|
|
2008-07-31 14:39:25 +02:00
|
|
|
COMMON_DEP="dev-java/jcmdline:1.0
|
|
|
|
dev-java/itext
|
|
|
|
dev-java/jaxen:1.1
|
|
|
|
dev-java/bcmail
|
|
|
|
dev-java/bcprov
|
|
|
|
dev-java/jgoodies-looks:2.0
|
|
|
|
dev-java/dom4j:1"
|
2007-10-20 15:27:19 +02:00
|
|
|
RDEPEND=">=virtual/jre-1.5
|
|
|
|
${COMMON_DEP}"
|
|
|
|
DEPEND=">=virtual/jdk-1.5
|
|
|
|
sys-devel/gettext
|
|
|
|
app-arch/unzip
|
|
|
|
${COMMON_DEP}"
|
2008-07-31 14:39:25 +02:00
|
|
|
|
2007-10-20 15:27:19 +02:00
|
|
|
src_unpack() {
|
|
|
|
unpack ${A}
|
2008-07-31 14:39:25 +02:00
|
|
|
cd "${S}"
|
2007-10-20 15:27:19 +02:00
|
|
|
java-pkg_jarfrom jcmdline-1.0
|
|
|
|
java-pkg_jarfrom itext
|
|
|
|
java-pkg_jarfrom dom4j-1
|
|
|
|
java-pkg_jarfrom jaxen-1.1
|
|
|
|
java-pkg_jarfrom bcmail
|
|
|
|
java-pkg_jarfrom bcprov
|
|
|
|
java-pkg_jarfrom jgoodies-looks-2.0
|
|
|
|
}
|
|
|
|
|
|
|
|
src_compile() {
|
2008-07-31 14:39:25 +02:00
|
|
|
eant -Dbuild.dir="${S}"/build \
|
|
|
|
-Dsrc.dir="${S}" \
|
|
|
|
-Djcmdline.location="${S}" \
|
|
|
|
-Ditext.location="${S}" \
|
|
|
|
-Ddom4j.location="${S}" \
|
|
|
|
-Djaxen.location="${S}" \
|
|
|
|
-Dbcmail.location="${S}" \
|
|
|
|
-Dbcprov.location="${S}" \
|
|
|
|
-Djgoodies-looks.location="${S}" ${antflags}
|
2007-10-20 15:27:19 +02:00
|
|
|
|
2008-07-31 14:39:25 +02:00
|
|
|
use doc && eant -Dbuild.dir="${S}"/build \
|
|
|
|
-Dsrc.dir="${S}" \
|
|
|
|
-Djcmdline.location="${S}" \
|
|
|
|
-Ditext.location="${S}" \
|
|
|
|
-Ddom4j.location="${S}" \
|
|
|
|
-Djaxen.location="${S}" \
|
|
|
|
-Dbcmail.location="${S}" \
|
|
|
|
-Dbcprov.location="${S}" \
|
|
|
|
-Djgoodies-looks.location="${S}" ${antflags} javadoc
|
2007-10-20 15:27:19 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
src_install() {
|
|
|
|
insinto /usr/share/${PN}-${SLOT}/lib
|
2008-07-31 14:39:25 +02:00
|
|
|
doins "${S}"/dist/pdfsam-maine/*.xml
|
|
|
|
java-pkg_newjar "${S}"/dist/pdfsam-maine/pdfsam-*.jar pdfsam.jar
|
|
|
|
java-pkg_newjar "${S}"/dist/pdfsam-maine/lib/pdfsam-console-*.jar pdfsam-console.jar
|
|
|
|
java-pkg_newjar "${S}"/dist/pdfsam-maine/lib/pdfsam-langpack-*.jar pdfsam-langpack.jar
|
2007-10-20 17:15:50 +02:00
|
|
|
|
2007-10-20 15:27:19 +02:00
|
|
|
for plugins in merge cover split encrypt mix
|
|
|
|
do
|
2007-10-20 17:15:50 +02:00
|
|
|
java-pkg_jarinto /usr/share/${PN}-${SLOT}/lib/plugins/${plugins}
|
|
|
|
insinto /usr/share/${PN}-${SLOT}/lib/plugins/${plugins}
|
2008-07-31 14:39:25 +02:00
|
|
|
|
|
|
|
java-pkg_dojar "${S}"/dist/pdfsam-maine/plugins/${plugins}/*.jar
|
|
|
|
doins "${S}"/dist/pdfsam-maine/plugins/${plugins}/*.xml
|
2007-10-20 15:27:19 +02:00
|
|
|
done
|
|
|
|
|
2008-07-31 14:39:25 +02:00
|
|
|
java-pkg_dolauncher ${PN}-${SLOT} --main it.pdfsam.GUI.MainGUI --pwd "/usr/share/${PN}-${SLOT}/lib"
|
|
|
|
java-pkg_dolauncher ${PN}-console-${SLOT} --main it.pdfsam.console.MainConsole --pwd "/usr/share/${PN}-${SLOT}/lib"
|
|
|
|
|
|
|
|
newicon "${S}"/pdfsam-maine/images/pdf.png pdfsam-${SLOT}.png
|
2008-07-31 14:44:58 +02:00
|
|
|
make_desktop_entry ${PN} "PDF Split and Merge ${SLOT}" pdfsam-${SLOT}.png Office
|
2007-10-20 15:27:19 +02:00
|
|
|
|
|
|
|
dodoc pdfsam-maine/doc/* || die
|
2008-07-31 14:39:25 +02:00
|
|
|
|
2007-10-20 15:27:19 +02:00
|
|
|
use doc && java-pkg_dojavadoc dist/pdfsam-javadoc
|
|
|
|
}
|