From: Kyle Cavin <kyle.cavin@gmail.com>
To: gentoo-dev@lists.gentoo.org
Subject: [gentoo-dev] gdata-build eclass proposal
Date: Mon, 26 Oct 2009 00:06:09 -0400 [thread overview]
Message-ID: <4AE52031.3020406@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 631 bytes --]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
The Google Data Protocol is a REST-inspired technology for reading,
writing, and modifying information on the web.
LINK: http://code.google.com/apis/gdata/
The upstream distribution packages together 18 separate java libraries.
This eclass separates these packages, permitting trivial ebuilds.
Please tinker and advise.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkrlIDEACgkQWiD4kSM5q3kz4gCcD3G2VsynWxhCZEgPIF/SfIW3
5gQAn3tJI+NvZ3Hql/Wv0ELhvMGuTBwx
=o4aA
-----END PGP SIGNATURE-----
[-- Attachment #2: gdata-tree.tar.bz2 --]
[-- Type: application/x-bzip, Size: 5247 bytes --]
[-- Attachment #3: gdata-build.eclass --]
[-- Type: text/plain, Size: 3212 bytes --]
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
# @ECLASS: gdata-build.eclass
# @BLURB: Eclass for gdata API ebuilds.
# @DESCRIPTION:
# This eclass contains various functions that are used when building gdata APIs.
EAPI="2"
#JAVA_PKG_DEBUG=1
WANT_ANT_TASKS="ant-nodeps"
EANT_BUILD_XML="build-src.xml"
EANT_BUILD_TARGET="build.manifest build.${PN/gdata-/}"
inherit java-utils-2 java-pkg-2 java-ant-2
MY_P="db-${P}"
DESCRIPTION="Google Data APIs${GDATA_EXTRA_DESCRIPTION}"
HOMEPAGE="http://code.google.com/apis/gdata/"
SRC_URI="http://gdata-java-client.googlecode.com/files/gdata-src.java-${PV}.zip"
LICENSE="Apache-2.0"
COMMON_DEPS="${GDATA_EXTRA_DEPS}"
if [ ${PN} == "gdata-core" ]; then
COMMON_DEPS="$COMMON_DEPS
java-virtuals/apt-mirror:0
java-virtuals/javamail:0
>=dev-java/sun-jaf-1.1"
else
COMMON_DEPS="$COMMON_DEPS
>=dev-java/gdata-core-${PV}"
fi
DEPEND="$COMMON_DEPS
>=virtual/jdk-1.6"
RDEPEND="$COMMON_DEPS
>=virtual/jre-1.6"
# @ECLASS-VARIABLE: GDATA_EXTRA_JARS
# @DESCRIPTION:
# Base names for extra jars included by the package. All jars are expected to
# exist in the lib directory of the build tree. If a corresponding meta package
# exists, it will also be installed.
#
# @EXAMPLE:
# To include a jar named gdata-examples-3.0.jar, use following line:
# GDATA_EXTRA_JARS="gdata-examples"
# @ECLASS-VARIABLE: GDATA_EXTRA_DEPS
# @DESCRIPTION:
# Convenience variable to add dependencies to both DEPEND and RDEPEND.
# @ECLASS-VARIABLE: GDATA_EXTRA_DESCRIPTION
# @DESCRIPTION:
# Clarify any ambiguous package names with this variable. Prepend a colon
# to the string so it looks pretty, and stays consistent.
# @ECLASS-VARIABLE: GDATA_TARGET
# @DESCRIPTION:
# Override the default installation jar. The form of this variable is identical
# to that of GDATA_EXTRA_JARS, and defaults to ${PN}.
S="${WORKDIR}/gdata/java"
# @FUNCTION: gdata-build_src_prepare
# @DESCRIPTION: Prepares dependencies and classpath for each build.
gdata-build_src_prepare() {
mkdir gdata_dep
if [ ${PN} != "gdata-core" ]; then
EANT_GENTOO_CLASSPATH="${EANT_GENTOO_CLASSPATH} gdata-core"
else
java-pkg_jar-from google-collect
java-pkg_jar-from sun-jaf {,gdata_dep/}activation.jar
java-pkg_jar-from javamail {,gdata_dep/}mail.jar
EANT_GENTOO_CLASSPATH="${EANT_GENTOO_CLASSPATH} apt-mirror"
fi
sed -i -e 's|/tmp/||' build-src/build.properties
for i in build-src.xml build-src/{core,${PN/gdata-/}}.xml; do
if [ ${PN} != "gdata-core" ]; then
tmp="`basename $i .xml`"
echo "Removing target dependencies for $i"
sed -i -e "/<target name=\"build.$tmp\"/s|depends=[^ />]*||" $i
fi
java-ant_rewrite-classpath $i;
done
rm -f lib/*
}
# @FUNCTION: gdata-build_src_install
# @DESCRIPTION: Installs the required targets.
gdata-build_src_install() {
for pkg in ${GDATA_TARGET-${PN}} ${GDATA_EXTRA_JARS}; do
java-pkg_newjar lib/$pkg-[0-9]*.jar $pkg.jar
[ -f lib/$pkg-meta*.jar ] && \
java-pkg_newjar lib/$pkg-meta*.jar $pkg-meta.jar
done
if [ ${PN} == "gdata-core" ]; then
dodoc ../README-src.txt ../RELEASE_NOTES.txt || die "docs failed"
fi
}
EXPORT_FUNCTIONS src_prepare src_install
[-- Attachment #4: gdata-tree.tar.bz2.sig --]
[-- Type: application/octet-stream, Size: 72 bytes --]
[-- Attachment #5: gdata-build.eclass.sig --]
[-- Type: application/octet-stream, Size: 72 bytes --]
next reply other threads:[~2009-10-26 4:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-26 4:06 Kyle Cavin [this message]
2009-10-26 21:41 ` [gentoo-dev] gdata-build eclass proposal William Hubbs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4AE52031.3020406@gmail.com \
--to=kyle.cavin@gmail.com \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox