Author: pawelz                       Date: Wed Apr 22 14:39:08 2009 GMT
Module: SPECS                         Tag: JAVA_COMMONS_NET_1_4
---- Log message:
- unify javadocs
- unify jdk bconds
- build-classpath error should break rpmbuild
- CLASSPATH do not have to be exported
- branched as JAVA_COMMONS_NET_1_4 (HEAD is 2.0 now, and it does not build)
- it is no longer part of jakarta project (fixed secriptions)
- s/jakarta/java/ in BRs
- rel 4

---- Files affected:
SPECS:
   java-commons-net.spec (1.18 -> 1.18.2.1) 

---- Diffs:

================================================================
Index: SPECS/java-commons-net.spec
diff -u SPECS/java-commons-net.spec:1.18 SPECS/java-commons-net.spec:1.18.2.1
--- SPECS/java-commons-net.spec:1.18    Mon Feb  2 13:22:45 2009
+++ SPECS/java-commons-net.spec Wed Apr 22 16:39:03 2009
@@ -2,48 +2,63 @@
 # TODO:
 #      - check why the tests fail and fix that
 #        maybe it depends on network, vserver or so? WFM
-#
-Summary:       Jakarta Commons Net - utility functions and components
-Summary(pl.UTF-8):     Jakarta Commons Net - funkcje i komponenty narzędziowe
+
+# Conditional build:
+%bcond_without javadoc         # don't build javadoc
+
+%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
+
+%define                srcname         commons-net
+Summary:       Commons Net - utility functions and components
+Summary(pl.UTF-8):     Commons Net - funkcje i komponenty narzędziowe
 Name:          java-commons-net
 Version:       1.4.1
-Release:       3
+Release:       4
 License:       Apache v2.0
 Group:         Libraries/Java
 Source0:       
http://www.apache.org/dist/jakarta/commons/net/source/commons-net-%{version}-src.tar.gz
 # Source0-md5: ccbb3f67b55e8a7a676499db4386673c
-Patch0:                %{name}-disable_tests.patch
+Patch0:                %{srcname}-disable_tests.patch
 URL:           http://jakarta.apache.org/commons/net/
 BuildRequires: ant >= 1.5
+%{!?with_java_sun:BuildRequires:       java-gcj-compat-devel}
+%{?with_java_sun:BuildRequires:        java-sun}
 BuildRequires: jakarta-oro >= 2.0.8
 BuildRequires: jaxp
 BuildRequires: jpackage-utils
 BuildRequires: junit
+BuildRequires: rpm >= 4.4.9-56
 BuildRequires: rpmbuild(macros) >= 1.300
-Requires:      jakarta-oro >= 2.0.8
+Requires:      java-oro >= 2.0.8
 Requires:      jre
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
-Jakarta Commons Net is a set of utility functions and reusable
-components that should be a help in any Java environment.
+Commons Net is a set of utility functions and reusable components that should
+be a help in any Java environment.
 
 %description -l pl.UTF-8
-Jakarta Commons Net to zestaw funkcji narzędziowych i komponentów
-wielokrotnego użycia, które mogą być pomocne w każdym środowisku Javy.
+Commons Net to zestaw funkcji narzędziowych i komponentów wielokrotnego
+użycia, które mogą być pomocne w każdym środowisku Javy.
 
 %package javadoc
-Summary:       Jakarta Commons Net documentation
-Summary(pl.UTF-8):     Dokumentacja do Jakarta Commons Net
+Summary:       Commons Net documentation
+Summary(pl.UTF-8):     Dokumentacja do Commons Net
 Group:         Documentation
 Requires:      jpackage-utils
 
 %description javadoc
-Jakarta Commons Net documentation.
+Commons Net documentation.
 
 %description javadoc -l pl.UTF-8
-Dokumentacja do Jakarta Commons Net.
+Dokumentacja do Commons Net.
 
 %prep
 %setup -q -n commons-net-%{version}
@@ -51,7 +66,7 @@
 
 %build
 cp LICENSE.txt LICENSE
-export CLASSPATH="`build-classpath oro junit`"
+CLASSPATH="$(build-classpath oro junit)"
 export JAVA_HOME="%{java_home}"
 
 # needed for tests, for some reason they ignore $CLASSPATH
@@ -63,24 +78,35 @@
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_javadir},%{_javadocdir}/%{name}-%{version}}
+install -d $RPM_BUILD_ROOT%{_javadir}
 
 install dist/*.jar $RPM_BUILD_ROOT%{_javadir}
 ln -sf commons-net-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/commons-net.jar
 
+# javadoc
+%if %{with javadoc}
+install -d $RPM_BUILD_ROOT%{_javadocdir}/%{srcname}-%{version}
 cp -R dist/docs/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
+ln -s %{srcname}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{srcname} # ghost 
symlink
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%post javadoc
+ln -nfs %{srcname}-%{version} %{_javadocdir}/%{srcname}
+
 %files
 %defattr(644,root,root,755)
 %doc dist/LICENSE
 %{_javadir}/*.jar
 
+%if %{with javadoc}
 %files javadoc
 %defattr(644,root,root,755)
-%doc %{_javadocdir}/%{name}-%{version}
+%{_javadocdir}/%{srcname}-%{version}
+%ghost %{_javadocdir}/%{srcname}
+%endif
 
 %define        date    %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 
@@ -89,6 +115,16 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.18.2.1  2009/04/22 14:39:03  pawelz
+- unify javadocs
+- unify jdk bconds
+- build-classpath error should break rpmbuild
+- CLASSPATH do not have to be exported
+- branched as JAVA_COMMONS_NET_1_4 (HEAD is 2.0 now, and it does not build)
+- it is no longer part of jakarta project (fixed secriptions)
+- s/jakarta/java/ in BRs
+- rel 4
+
 Revision 1.18  2009/02/02 12:22:45  glen
 - rename package, groups, drop ea
 
================================================================

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

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

Reply via email to