Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=xfcetesting.git;a=commitdiff;h=eeade87d81192d1135238f7922ee9839f4a9bc0f

commit eeade87d81192d1135238f7922ee9839f4a9bc0f
Author: Marius Cirsta <[email protected]>
Date:   Sun Oct 2 12:40:27 2011 +0000

* new include to use openjre and openjdk

diff --git a/source/include/openjava.sh b/source/include/openjava.sh
new file mode 100644
index 0000000..3b8222d
--- /dev/null
+++ b/source/include/openjava.sh
@@ -0,0 +1,85 @@
+#!/bin/sh
+
+###
+# = java.sh(3)
+# Miklos Vajna <[email protected]>
+#
+# == NAME
+# java.sh - for Frugalware
+#
+# == SYNOPSIS
+# Common schema for java packages that use openjre and openjdk.
+#
+# == EXAMPLE
+# --------------------------------------------------
+# pkgname=jakarta-regexp
+# pkgver=1.4
+# pkgrel=1
+# pkgdesc="100% Pure Java Regular Expression package"
+# url="http://jakarta.apache.org/regexp";
+# groups=('devel-extra')
+# archs=('i686' 'x86_64')
+# up2date="lynx -dump http://www.apache.org/dist/jakarta/regexp/source/ 
|Flasttar"
+# 
source=(http://www.apache.org/dist/jakarta/regexp/source/jakarta-regexp-$pkgver.tar.gz)
+# signatures=($source.asc)
+# Finclude java
+#
+# build()
+# {
+#         Fcd
+#         Fjavacleanup
+#         Fant
+#         mv build/jakarta-regexp{-$pkgver,}.jar
+#         Fjar build/jakarta-regexp.jar
+# }
+# --------------------------------------------------
+#
+# == OPTIONS
+# * _F_java_no_cleanup: do not delete all jars from source
+
+
+###
+# == APPENDED VARIABLES
+# * depends()
+# * makedepends()
+###
+depends=("${depends[@]}" 'openjre')
+makedepends=("${makedepends[@]}" 'openjdk' 'apache-ant')
+
+###
+# == PROVIDED FUNCTIONS
+# * Fant(): a wrapper for ant to use _F_java_compiler as compiler
+###
+Fant()
+{
+       ant $@ || Fdie
+}
+
+###
+# * Fjar(): installs the jar(s)
+###
+Fjar()
+{
+       local i dir file
+       for i in $@
+       do
+               dir=`dirname $i`
+               file=`basename $i`
+               Ffilerel $dir/$file /usr/share/java/$file
+       done
+}
+
+###
+# * Fjavacleanup(): cleans up the source tree (jar and class files) before
+# building. optional parameter: root of the source tree
+###
+Fjavacleanup()
+{
+
+       if [ -z "$_F_java_no_cleanup" ]; then
+               local root="."
+               [ -n "$1" ] && root=$1
+               find $root -name "*.class" $_F_javacleanup_opts -exec rm -vf {} 
\;
+               find $root -name "*.jar" $_F_javacleanup_opts -exec rm -vf {} \;
+       fi
+}
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to