%if "%{stage1}" != "1" %define with_gcj 1 %else %define with_gcj 0 %endif %define javahome %{_jvmdir}/jdk Name: java-jfree-libbase Version: 1.1.3 Release: 1mamba Summary: JFree Base Services Group: System/Libraries/Java Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco URL: http://reporting.pentaho.org/ #Source: http://downloads.sourceforge.net/project/jfreereport/30.%20OpenOffice%20Branches/OOo31/libbase-%{version}-OOo31.zip Source: http://sourceforge.net/projects/jfreereport/files/02.%20Libraries/1.1.3-stable/libbase-1.1.3.zip Patch0: java-jfree-libbase-1.1.3-build_properties.patch Patch1: java-jfree-libbase-1.1.3-crosslink.patch License: LGPL ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel BuildRequires: java-gcj-compat BuildRequires: libgcc BuildRequires: libgcj4-devel BuildRequires: libz-devel ## AUTOBUILDREQ-END BuildRequires: ant-contribb3 BuildRequires: apache-ant BuildRequires: apache-ant-nodeps BuildRequires: java-junit3 ## AUTOBUILDREQ-BEGIN BuildRequires: jakarta-commons-logging BuildRequires: jpackage-utils ## AUTOBUILDREQ-END Requires: jakarta-commons-logging Requires: jpackage-utils BuildRoot: %{_tmppath}/%{name}-%{version}-root %description LibBase is a library developed to provide base services like logging, configuration and initialization to other libraries and applications. The library is the root library for all Pentaho-Reporting projects. %if %with_gcj %package gcj Group: System/Libraries/Java Summary: GCJ support for %{name} Requires: java-gcj-compat %description gcj JFree Base Services. This package contains GCJ support for %{name}. %endif %package javadoc Group: Documentation Summary: Javadoc for %{name} %description javadoc JFree Base Services. This package contains documentation for %{name}. %prep %setup -q -c %{name}-%{version} %patch0 %patch1 for j in $(find . -name "*.jar"); do rm -rf $j done for txt in ChangeLog.txt licence-LGPL.txt README.txt; do %{__perl} -pi -e 's/\r$//g' $txt done mkdir -p lib/ant-contrib ln -sf $(build-classpath commons-logging) lib/commons-logging.jar ln -s %{_javadir}/ant/* lib/ant-contrib %build unset JAVA_HOME export JAVA_HOME=%{javahome} export CLASSPATH=$(build-classpath ant-contribb3 junit-3.8.2 commons-logging) ant \ -Dj2se.api=%{_javadocdir}/java \ jar javadoc %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" mkdir -p %{buildroot}%{_javadir} install -pm 644 dist/libbase-%{version}.jar %{buildroot}%{_javadir}/libbase-%{version}.jar ( cd %{buildroot}%{_javadir} for jar in *-%{version}*; do ln -sf ${jar} ${jar/-%{version}/} done ) mkdir -p %{buildroot}%{_javadocdir}/libbase cp -pr bin/javadoc/docs/api/* %{buildroot}%{_javadocdir}/libbase %if %with_gcj %{_bindir}/aot-compile-rpm %endif %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %files %defattr(-,root,root) %{_javadir}/libbase-%{version}.jar %{_javadir}/libbase.jar %doc ChangeLog.txt licence-LGPL.txt README.txt %if %with_gcj %post gcj if [ -x %{_bindir}/rebuild-gcj-db ] ; then %{_bindir}/rebuild-gcj-db fi %postun gcj if [ -x %{_bindir}/rebuild-gcj-db ] ; then %{_bindir}/rebuild-gcj-db fi %files gcj %defattr(-,root,root) %{_libdir}/gcj/java-jfree-libbase/libbase-%{version}.jar.db %{_libdir}/gcj/java-jfree-libbase/libbase-%{version}.jar.so %endif %files javadoc %defattr(-,root,root) #%{_javadocdir}/libbase-%{version} %{_javadocdir}/libbase %changelog * Sat Jan 22 2011 gil 1.1.3-1mamba - update to 1.1.3 * Wed Dec 09 2009 gil 1.0.0-1mamba - package created by autospec