[oe-commits] Robert Schuster : commons-logging 1.1.1: New recipe (from Jalimo SVN).

git version control git at git.openembedded.org
Fri Sep 18 14:39:13 UTC 2009


Module: openembedded.git
Branch: org.openembedded.dev
Commit: ff52f57646c898b7377cfda8d1365dc9e1ffe946
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=ff52f57646c898b7377cfda8d1365dc9e1ffe946

Author: Robert Schuster <robertschuster at fsfe.org>
Date:   Fri Sep 18 14:44:01 2009 +0200

commons-logging 1.1.1: New recipe (from Jalimo SVN).
commons-logging-native 1.1.1: Dito.

---

 .../commons-logging-native_1.1.1.bb                |    6 ++
 recipes/jakarta-commons/commons-logging_1.1.1.bb   |   12 ++++
 recipes/jakarta-commons/jakarta-commons.inc        |   62 ++++++++++++++++++++
 3 files changed, 80 insertions(+), 0 deletions(-)

diff --git a/recipes/jakarta-commons/commons-logging-native_1.1.1.bb b/recipes/jakarta-commons/commons-logging-native_1.1.1.bb
new file mode 100644
index 0000000..8437501
--- /dev/null
+++ b/recipes/jakarta-commons/commons-logging-native_1.1.1.bb
@@ -0,0 +1,6 @@
+require commons-logging_${PV}.bb
+
+inherit java-native
+
+DEPENDS = "fastjar-native log4j1.2-native servlet2.3-native logkit-native"
+
diff --git a/recipes/jakarta-commons/commons-logging_1.1.1.bb b/recipes/jakarta-commons/commons-logging_1.1.1.bb
new file mode 100644
index 0000000..f1d94eb
--- /dev/null
+++ b/recipes/jakarta-commons/commons-logging_1.1.1.bb
@@ -0,0 +1,12 @@
+require jakarta-commons.inc
+
+DESCRIPTION = "Java Internet protocol suite library"
+
+SRC_URI = "http://www.apache.org/dist/commons/logging/source/${BP}-src.tar.gz"
+
+DEPENDS += "log4j1.2 servlet2.3 logkit"
+
+CP = "log4j-1.2 servlet-2.3 logkit"
+
+COMPILE_FINDARGS = "-name '*.java' -and -not -name '*Avalon*'"
+
diff --git a/recipes/jakarta-commons/jakarta-commons.inc b/recipes/jakarta-commons/jakarta-commons.inc
new file mode 100644
index 0000000..48cbe17
--- /dev/null
+++ b/recipes/jakarta-commons/jakarta-commons.inc
@@ -0,0 +1,62 @@
+LICENSE = "AL2.0"
+AUTHOR = "Apache Software Foundation"
+
+inherit java-library
+
+DEPENDS = "fastjar-native"
+
+S = "${WORKDIR}/${BP}-src"
+
+# Directory in which the projects sources are located.
+MAINSOURCES = "src/java"
+
+# Directories which should appear in the -sourcepath argument.
+COMPILE_SOURCEPATH = "src/java"
+
+COMPILE_FINDARGS = "-name '*.java'"
+FINDARGS = "-name '*.properties'"
+
+# Directories to be removed after compilation.
+CLEAN_PATH = ""
+
+# Some projects have a replaceable version number in their manifest template.
+do_unpackpost() {
+  if [ -d src/conf ]
+  then
+    find src/conf -exec \
+      sed -i -e "s|@version@|${PV}|" {} \;
+  fi
+}
+
+addtask unpackpost after do_unpack before do_patch
+# Compile step is very similar for Jakarta commons packages
+do_compile() {
+  mkdir -p build
+
+  if [ "${CP}" ]
+  then
+		oe_makeclasspath cp -s ${CP}
+  else
+    cp=.
+  fi
+
+  echo "javac -sourcepath ${COMPILE_SOURCEPATH} -cp $cp -d build \`find ${MAINSOURCES} ${COMPILE_FINDARGS}\`"
+  javac -sourcepath ${COMPILE_SOURCEPATH} -cp $cp -d build `find ${MAINSOURCES} ${COMPILE_FINDARGS}`
+
+  # Copy extraneous files
+  echo "(cd ${MAINSOURCES} && find . ${FINDARGS} -exec cp {} ../../build/{} \;)"
+  (cd ${MAINSOURCES} && find . ${FINDARGS} -exec cp {} ../../build/{} \;)
+
+	# Optionally remove stuff after compilation (needed for sourcepath hacks).
+	if [ ${CLEAN_PATH} ]; then
+		rm -rf ${CLEAN_PATH}
+	fi
+
+  # Some projects have manifest, some have not. This works for both.
+  if [ -f src/conf/MANIFEST.MF ]
+  then
+    fastjar -C build -c -m src/conf/MANIFEST.MF -f ${JARFILENAME} .
+  else
+    fastjar -C build -c -f ${JARFILENAME} .
+  fi
+}





More information about the Openembedded-commits mailing list