# Use rpmbuild --without gcj to disable native bits %define with_gcj %{!?_without_gcj:1}%{?_without_gcj:0} %define origname libxml Name: pentaho-libxml Version: 0.9.11 Release: 1%{?dist} Summary: Namespace aware SAX-Parser utility library License: LGPLv2+ Group: System Environment/Libraries Source: http://downloads.sourceforge.net/jfreereport/%{origname}-%{version}.tar.gz URL: http://reporting.pentaho.org/ BuildRequires: ant, java-devel, jpackage-utils, jcommon, libloader Buildroot: %{_tmppath}/%{origname}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: java, jpackage-utils, jcommon, libloader >= 0.3.7 %if %{with_gcj} BuildRequires: java-gcj-compat-devel >= 1.0.31 Requires(post): java-gcj-compat >= 1.0.31 Requires(postun): java-gcj-compat >= 1.0.31 %else BuildArch: noarch %endif Patch1: libxml-0.9.11-depends.patch %description Pentaho LibXML is a namespace aware SAX-Parser utility library. It eases the pain of implementing non-trivial SAX input handlers. %package javadoc Summary: Javadoc for %{name} Group: Development/Documentation Requires: %{name} = %{version}-%{release} Requires: jpackage-utils %description javadoc Javadoc for %{name}. %prep %setup -q -n %{origname}-%{version} %patch1 -p1 -b .depends find . -name "*.jar" -exec rm -f {} \; build-jar-repository -s -p lib jcommon libloader %build ant compile javadoc for file in README.txt licence-LGPL.txt ChangeLog.txt; do tr -d '\r' < $file > $file.new mv $file.new $file done %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_javadir} cp -p %{origname}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{origname}.jar mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{origname} cp -rp javadoc $RPM_BUILD_ROOT%{_javadocdir}/%{origname} %if %{with_gcj} %{_bindir}/aot-compile-rpm %endif %clean rm -rf $RPM_BUILD_ROOT %post %if %{with_gcj} if [ -x %{_bindir}/rebuild-gcj-db ] then %{_bindir}/rebuild-gcj-db fi %endif %postun %if %{with_gcj} if [ -x %{_bindir}/rebuild-gcj-db ] then %{_bindir}/rebuild-gcj-db fi %endif %files %defattr(0644,root,root,0755) %doc licence-LGPL.txt README.txt ChangeLog.txt %{_javadir}/*.jar %if %{with_gcj} %attr(-,root,root) %{_libdir}/gcj/%{name} %endif %files javadoc %defattr(0644,root,root,0755) %{_javadocdir}/%{origname} %changelog * Wed May 07 2008 Caolan McNamara 0.9.11-1 - initial fedora import