source: app-text/pdfsam/pdfsam-2.1.0e.ebuild @ 5e5dcc5

Revision 5e5dcc5, 6.6 KB checked in by geos_one <geos_one@…>, 11 years ago (diff)

app-text/pdfsam: Bump to new upstream version

git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/linamh@1784 6952d904-891a-0410-993b-d76249ca496b

  • Property mode set to 100644
Line 
1# Copyright 1999-2009 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2
3# $Header: $
4
5EAPI=1
6JAVA_PKG_IUSE="doc"
7inherit java-pkg-2 eutils java-ant-2
8
9DESCRIPTION="A free open source tool to split and merge pdf documents"
10HOMEPAGE="http://www.pdfsam.org/"
11SRC_URI="mirror://sourceforge/${PN}/${P}-out-src.zip"
12LICENSE="GPL-2"
13SLOT="2.0"
14KEYWORDS="~amd64 ~x86"
15IUSE=""
16
17S="${WORKDIR}/pdfsam"
18
19COMMON_DEP="dev-java/dom4j:1
20        dev-java/log4j
21        dev-java/itext
22        dev-java/jaxen:1.1
23        dev-java/bcmail
24        dev-java/bcprov
25        dev-java/jgoodies-looks:2.0
26        dev-java/commons-lang:2.1
27        dev-java/iscwt
28        dev-java/isfreetype
29        dev-java/isnativec
30        dev-java/isrt
31        dev-java/jPod
32        dev-java/jPodRenderer
33        dev-java/sun-jai-bin
34        dev-java/sun-jai-imageio
35        dev-java/jbig2
36        dev-java/jna
37        dev-java/swt:3.4"
38RDEPEND=">=virtual/jre-1.5
39        ${COMMON_DEP}"
40DEPEND=">=virtual/jdk-1.5
41        sys-devel/gettext
42        app-arch/unzip
43        ${COMMON_DEP}"
44
45src_unpack() {
46        unpack ${A} || die "unpack failed"
47        mkdir "${S}"
48        cd "${S}"
49        for zip in "${WORKDIR}"/*.zip
50        do
51            unzip -oq ${zip} || die "unpacking ${zip} failed"
52        done
53
54        for bldprop in emp4j jcmdline pdfsam-maine pdfsam-console pdfsam-cover \
55            pdfsam-decrypt pdfsam-docinfo pdfsam-encrypt pdfsam-langpack \
56            pdfsam-merge pdfsam-mix pdfsam-rotate pdfsam-setviewer pdfsam-split \
57            pdfsam-unpack pdfsam-vcomposer pdfsam-vpagereorder
58        do
59            echo > ${S}/${bldprop}/ant/build.properties
60            echo "pdfsam.deploy.dir=${S}/deploy" >> ${S}/${bldprop}/ant/build.properties
61            echo "template.dir=${S}/template-enhanced-2" >> ${S}/${bldprop}/ant/build.properties
62            echo "workspace.dir=${S}" >> ${S}/${bldprop}/ant/build.properties
63            echo "build.dir=${S}/build" >> ${S}/${bldprop}/ant/build.properties
64            echo "libs.dir=${S}" >> ${S}/${bldprop}/ant/build.properties
65            echo "pdfsam.version=enhanced" >> ${S}/${bldprop}/ant/build.properties
66            echo "itext.jar.name=iText" >> ${S}/${bldprop}/ant/build.properties
67            echo "log4j.jar.name=log4j" >> ${S}/${bldprop}/ant/build.properties
68            echo "dom4j.jar.name=dom4j" >> ${S}/${bldprop}/ant/build.properties
69            echo "jaxen.jar.name=jaxen" >> ${S}/${bldprop}/ant/build.properties
70            echo "bcmail.jar.name=bcmail" >> ${S}/${bldprop}/ant/build.properties
71            echo "bcprov.jar.name=bcprov" >> ${S}/${bldprop}/ant/build.properties
72            echo "looks.jar.name=looks" >> ${S}/${bldprop}/ant/build.properties
73            echo "commons-lang.jar.name=commons-lang" >> ${S}/${bldprop}/ant/build.properties
74            echo "iscwt.jar.name=iscwt" >> ${S}/${bldprop}/ant/build.properties
75            echo "isfreetype.jar.name=isfreetype" >> ${S}/${bldprop}/ant/build.properties
76            echo "isnativec.jar.name=isnativec" >> ${S}/${bldprop}/ant/build.properties
77            echo "isrt.jar.name=isrt" >> ${S}/${bldprop}/ant/build.properties
78            echo "jPod.jar.name=jPod" >> ${S}/${bldprop}/ant/build.properties
79            echo "jPodFonts.jar.name=jPodFonts" >> ${S}/${bldprop}/ant/build.properties
80            echo "jPodRenderer.jar.name=jPodRenderer" >> ${S}/${bldprop}/ant/build.properties
81            echo "jai_codec.jar.name=jai_codec" >> ${S}/${bldprop}/ant/build.properties
82            echo "jai_core.jar.name=jai_core" >> ${S}/${bldprop}/ant/build.properties
83            echo "jai_imageio.jar.name=jai_imageio" >> ${S}/${bldprop}/ant/build.properties
84            echo "jcmdline.jar.name=pdfsam-jcmdline" >> ${S}/${bldprop}/ant/build.properties
85            echo "emp4j.jar.name=emp4j" >> ${S}/${bldprop}/ant/build.properties
86            echo "pdfsam.jar.name=pdfsam" >> ${S}/${bldprop}/ant/build.properties
87            echo "pdfsam-console.jar.name=pdfsam-console" >> ${S}/${bldprop}/ant/build.properties
88            echo "pdfsam-split.jar.name=pdfsam-split" >> ${S}/${bldprop}/ant/build.properties
89            echo "pdfsam-merge.jar.name=pdfsam-merge" >> ${S}/${bldprop}/ant/build.properties
90            echo "pdfsam-cover.jar.name=pdfsam-cover" >> ${S}/${bldprop}/ant/build.properties
91            echo "pdfsam-encrypt.jar.name=pdfsam-encrypt" >> ${S}/${bldprop}/ant/build.properties
92            echo "pdfsam-decrypt.jar.name=pdfsam-decrypt" >> ${S}/${bldprop}/ant/build.properties
93            echo "pdfsam-mix.jar.name=pdfsam-mix" >> ${S}/${bldprop}/ant/build.properties
94            echo "pdfsam-unpack.jar.name=pdfsam-unpack" >> ${S}/${bldprop}/ant/build.properties
95            echo "pdfsam-langpack.jar.name=pdfsam-langpack" >> ${S}/${bldprop}/ant/build.properties
96            echo "pdfsam-setviewer.jar.name=pdfsam-setviewer" >> ${S}/${bldprop}/ant/build.properties
97            echo "pdfsam-vpagereorder.jar.name=pdfsam-vpagereorder" >> ${S}/${bldprop}/ant/build.properties
98            echo "pdfsam-vcomposer.jar.name=pdfsam-vcomposer" >> ${S}/${bldprop}/ant/build.properties
99            echo "pdfsam-docinfo.jar.name=pdfsam-docinfo" >> ${S}/${bldprop}/ant/build.properties
100            echo "pdfsam-rotate.jar.name=pdfsam-rotate" >> ${S}/${bldprop}/ant/build.properties
101
102        done
103
104        java-pkg_jarfrom itext
105        java-pkg_jarfrom dom4j-1
106        java-pkg_jarfrom log4j
107        java-pkg_jarfrom jaxen-1.1
108        java-pkg_jarfrom bcmail
109        java-pkg_jarfrom bcprov
110        java-pkg_jarfrom jgoodies-looks-2.0
111        java-pkg_jarfrom isrt
112        java-pkg_jarfrom isnativec
113        java-pkg_jarfrom isfreetype
114        java-pkg_jarfrom iscwt
115        java-pkg_jarfrom jPod
116        java-pkg_jarfrom jPodRenderer
117        java-pkg_jarfrom sun-jai-bin
118        java-pkg_jarfrom sun-jai-imageio
119        java-pkg_jarfrom swt-3.4
120        java-pkg_jarfrom commons-lang-2.1
121}
122
123src_compile() {
124        eant -buildfile pdfsam-maine/ant/build.xml || die "build failed"
125
126        use doc && eant -buildfile pdfsam-maine/ant/build.xml javadoc
127}
128
129src_install() {
130        insinto /usr/share/${PN}-${SLOT}/lib
131        doins build/pdfsam-maine/release/dist/pdfsam-enhanced/*.xml || die "config install failed"
132        java-pkg_dojar build/pdfsam-maine/release/dist/pdfsam-enhanced/pdfsam.jar
133        java-pkg_dojar build/pdfsam-maine/release/dist/pdfsam-enhanced/lib/pdfsam-*.jar
134        java-pkg_dojar build/pdfsam-maine/release/dist/pdfsam-enhanced/lib/emp4j.jar
135
136        for plugins in cover decrypt docinfo  encrypt merge mix rotate setviewer split unpack vcomposer vpagereorder
137        do
138            java-pkg_jarinto /usr/share/${PN}-${SLOT}/lib/plugins/${plugins}
139            insinto /usr/share/${PN}-${SLOT}/lib/plugins/${plugins}
140
141            java-pkg_dojar build/pdfsam-maine/release/dist/pdfsam-enhanced/plugins/${plugins}/*.jar
142            doins build/pdfsam-maine/release/dist/pdfsam-enhanced/plugins/${plugins}/*.xml || die "config install failed"
143        done
144
145        java-pkg_dolauncher ${PN}-${SLOT} --main org.pdfsam.guiclient.GuiClient --pwd "/usr/share/${PN}-${SLOT}/lib"
146        java-pkg_dolauncher ${PN}-console-${SLOT} --main org.pdfsam.console.ConsoleClient --pwd "/usr/share/${PN}-${SLOT}/lib"
147
148        newicon pdfsam-maine/images/pdf.png pdfsam-${SLOT}.png
149        make_desktop_entry ${PN} "PDF Split and Merge ${PV}" pdfsam-${SLOT}.png Office
150
151        use doc && dodoc pdfsam-maine/doc/enhanced/*
152
153        use doc && java-pkg_dojavadoc build/pdfsam-maine/apidocs
154}
Note: See TracBrowser for help on using the repository browser.