Author: pawelz                       Date: Mon Mar 30 20:36:54 2009 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- build using ant
- now it builds with both jdks
- jdk bcond
- some BRs
- enable test by default
- TODO: tests fails

---- Files affected:
SPECS:
   java-commons-net.spec (1.24 -> 1.25) 

---- Diffs:

================================================================
Index: SPECS/java-commons-net.spec
diff -u SPECS/java-commons-net.spec:1.24 SPECS/java-commons-net.spec:1.25
--- SPECS/java-commons-net.spec:1.24    Thu Mar 26 19:59:29 2009
+++ SPECS/java-commons-net.spec Mon Mar 30 22:36:49 2009
@@ -1,9 +1,12 @@
 # $Revision$, $Date$
-# TODO:
-# - does not build with java_gcj_compat
-
 %bcond_without javadoc         # don't build javadoc
-%bcond_with    java_sun        # use java_sun
+%bcond_without tests           # build and run unit tests
+
+%if "%{pld_release}" == "ti"
+%bcond_without java_sun        # build with gcj
+%else
+%bcond_with    java_sun        # build with java-sun
+%endif
 
 %include        /usr/lib/rpm/macros.java
 
@@ -17,15 +20,17 @@
 Group:         Libraries/Java
 Source0:       
http://www.apache.org/dist/commons/net/source/commons-net-%{version}-src.tar.gz
 # Source0-md5: 583630202369df3cf996cbdba4d8634b
+Source1:       java-commons-net-build.xml
 URL:           http://commons.apache.org/net/
-BuildRequires: ant >= 1.5
+BuildRequires: ant
+%{?with_tests:BuildRequires:   ant-junit}
 BuildRequires: jakarta-oro >= 2.0.8
 %{!?with_java_sun:BuildRequires:       java-gcj-compat-devel}
 %{!?with_java_sun:BuildRequires:       java-gnu-classpath}
 %{?with_java_sun:BuildRequires:        java-sun}
-#BuildRequires:        jaxp
 BuildRequires: jpackage-utils
-BuildRequires: junit
+%{?with_tests:BuildRequires:   junit}
+BuildRequires: rpm >= 4.4.9-56
 BuildRequires: rpmbuild(macros) >= 1.300
 Requires:      jakarta-oro >= 2.0.8
 Provides:      jakarta-commons-net
@@ -59,28 +64,35 @@
 
 %build
 
+cp %{SOURCE1} build.xml
+
 # java.util.regexp from libgcj-4.3 does not provide Mather.toMatchResult()
 # method, so we have to use one provided by glibj (from gnu-classpath).
 # toMatchResult is implemented in libgcj-4.4, so most probably, when gcc-4.4
-# will be released, we can can drop gnu-classpath dependency
+# will be released, we can drop gnu-classpath dependency
 
 %if %{without java_sun}
   glibj_jar=$(find-jar glibj)
 %endif
 
-CLASSPATH=$CLASSPATH:$(build-classpath oro junit)
-export CLASSPATH
-export JAVA_HOME="%{java_home}"
-
-install -d build
-
-%javac \
-       -classpath $CLASSPATH \
-       -d build \
-       -source 1.5 \
-       -target 1.5 \
-       %{!?with_java_sun:-bootclasspath "$glibj_jar"} \
-       $(find src/main/java/org -name '*.java')
+%if %{with java_sun}
+%define compiler sun
+%else
+%define compiler gcj
+%endif
+
+CLASSPATH=$(build-classpath oro)
+
+%ant clean compile-%{compiler} jar \
+       -Dversion=%{version} \
+       %{!?with_java_sun:-Dbootstrap=$glibj_jar} \
+
+%if %{with tests}
+CLASSPATH=$CLASSPATH:$(build-classpath junit)
+%ant tests-compile-%{compiler} tests \
+       -Dversion=%{version} \
+       %{!?with_java_sun:-Dbootstrap=$glibj_jar} \
+%endif
 
 %if %{with javadoc}
 %javadoc -d apidocs \
@@ -126,6 +138,14 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.25  2009/03/30 20:36:49  pawelz
+- build using ant
+- now it builds with both jdks
+- jdk bcond
+- some BRs
+- enable test by default
+- TODO: tests fails
+
 Revision 1.24  2009/03/26 18:59:29  paszczus
 - use install instead of mkdir
 
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/java-commons-net.spec?r1=1.24&r2=1.25&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to