/[gentoo-x86]/net-p2p/vuze/vuze-4.5.0.4.ebuild
Gentoo

Contents of /net-p2p/vuze/vuze-4.5.0.4.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Thu Sep 9 21:46:45 2010 UTC (9 years, 2 months ago) by caster
Branch: MAIN
Version bump.

(Portage version: 2.2_rc77/cvs/Linux x86_64)

1 # Copyright 1999-2010 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-p2p/vuze/vuze-4.5.0.2.ebuild,v 1.1 2010/08/26 10:19:46 caster Exp $
4
5 EAPI=2
6
7 JAVA_PKG_IUSE="source"
8
9 inherit eutils fdo-mime java-pkg-2 java-ant-2 versionator
10
11 MY_PV=$(replace_all_version_separators "")
12
13 PATCHSET_VER="4.5.0.2"
14 PATCHSET_DIR="${PN}-${PATCHSET_VER}-gentoo-patches"
15 PATCHSET="${PATCHSET_DIR}.tar.bz2"
16 SRC_TARBALL="Vuze_${MY_PV}_source.zip"
17
18 DESCRIPTION="BitTorrent client in Java, formerly called Azureus"
19 HOMEPAGE="http://www.vuze.com/"
20 SRC_URI="mirror://sourceforge/azureus/${PN}/Vuze_${MY_PV}/${SRC_TARBALL}
21 mirror://gentoo/${PATCHSET}"
22 LICENSE="GPL-2 BSD"
23
24 SLOT="0"
25 KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
26 IUSE=""
27
28 # bundles parts of commons-lang, but modified
29 # bundles parts of http://www.programmers-friend.org/
30 RDEPEND="
31 dev-java/json-simple:0
32 dev-java/bcprov:1.3
33 >=dev-java/commons-cli-1.0:1
34 >=dev-java/log4j-1.2.8:0
35 dev-java/swt:3.6[cairo,xulrunner]
36 !net-p2p/azureus-bin
37 >=virtual/jre-1.5"
38
39 DEPEND="${RDEPEND}
40 app-arch/unzip
41 dev-util/desktop-file-utils
42 >=virtual/jdk-1.5"
43
44 PDEPEND="~net-p2p/vuze-coreplugins-${PV}"
45
46 src_unpack() {
47 unpack ${PATCHSET}
48 mkdir "${S}" && cd "${S}" || die
49 unpack ${SRC_TARBALL}
50 }
51
52 java_prepare() {
53 # build.xml disappeared from 4.4.0.0 although it was there in 4.3.1.4
54 # hopefully that's just a packaging mistake
55 [[ -f build.xml ]] && die "upstream has build.xml again, don't overwrite"
56 cp "${FILESDIR}/build.xml" . || die "failed to copy build.xml"
57
58 EPATCH_FORCE="yes" EPATCH_SUFFIX="patch" epatch "${WORKDIR}/${PATCHSET_DIR}/"
59
60 ### Removes OS X files and entries.
61 rm -rv "org/gudy/azureus2/platform/macosx" \
62 "org/gudy/azureus2/ui/swt/osx" || die
63
64 ### Removes Windows files.
65 rm -v ./org/gudy/azureus2/ui/swt/win32/Win32UIEnhancer.java || die
66
67 ### Removes test files.
68 rm -rv org/gudy/azureus2/ui/console/multiuser/TestUserManager.java || die
69
70 ### Removes bouncycastle (we use our own bcprov).
71 rm -rv "org/bouncycastle" || die
72
73 ### Removes bundled json
74 rm -rv "org/json" || die
75
76 ### The Tree2 file does not compile against Linux SWT and is used only on Windows.
77 ### It's runtime-conditional use is thus patched out in the patchset.
78 rm -rf "org/eclipse" || die
79
80 mkdir -p build/libs || die
81 }
82
83 JAVA_ANT_REWRITE_CLASSPATH="true"
84 EANT_GENTOO_CLASSPATH="swt-3.6,bcprov-1.3,json-simple,log4j,commons-cli-1"
85
86 src_compile() {
87 local mem
88 use amd64 && mem="256"
89 use x86 && mem="192"
90 use ppc && mem="192"
91 use ppc64 && mem="256"
92 export ANT_OPTS="-Xmx${mem}m"
93 java-pkg-2_src_compile
94
95 # bug #302058 - build.xml excludes .txt but upstream jar has it...
96 jar uf dist/Azureus2.jar ChangeLog.txt || die
97 }
98
99 src_install() {
100 java-pkg_dojar dist/Azureus2.jar
101 dodoc ChangeLog.txt || die
102
103 java-pkg_dolauncher "${PN}" \
104 --main org.gudy.azureus2.ui.common.Main -pre "${FILESDIR}/${PN}-4.1.0.0-pre" \
105 --java_args '-Dazureus.install.path=/usr/share/vuze/ ${JAVA_OPTIONS}' \
106 --pkg_args '--ui=${UI}'
107 dosym vuze /usr/bin/azureus
108
109 # https://bugs.gentoo.org/show_bug.cgi?id=204132
110 java-pkg_register-environment-variable MOZ_PLUGIN_PATH /usr/lib/nsbrowser/plugins
111
112 newicon "${S}"/org/gudy/azureus2/ui/icons/a32.png vuze.png
113 domenu "${FILESDIR}/${PN}.desktop"
114
115 use source && java-pkg_dosrc "${S}"/{com,edu,org}
116 }
117
118 pkg_postinst() {
119 ewarn "Running Vuze as root is not supported and may result in untracked"
120 ewarn "updates to shared components and then collisions on updates via ebuilds"
121
122 elog "Vuze has been formerly called Azureus and many references to the old name remain."
123 elog
124 elog "After running Vuze for the first time, configuration"
125 elog "options will be placed in '~/.azureus/gentoo.config'."
126 elog "If you need to change some startup options, you should"
127 elog "modify this file, rather than the startup script."
128 elog "Using this config file you can start the console UI."
129 elog
130
131 fdo-mime_desktop_database_update
132 }
133
134 pkg_postrm() {
135 fdo-mime_desktop_database_update
136 }

  ViewVC Help
Powered by ViewVC 1.1.20