java-pentaho-libxml/java-pentaho-libxml.spec

156 lines
4.2 KiB
RPMSpec
Raw Permalink Normal View History

%define with_gcj 1
%define javahome %{_jvmdir}/jdk
Name: java-pentaho-libxml
Version: 1.1.3
Release: 1mamba
Summary: LibXML is a namespace aware SAX-Parser utility library
Group: Development/Libraries/Java
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://reporting.pentaho.org/
# http://sourceforge.net/projects/jfreereport/
# cvs -d:pserver:anonymous@jfreereport.cvs.sourceforge.net:/cvsroot/jfreereport login
# cvs -z3 -d:pserver:anonymous@jfreereport.cvs.sourceforge.net:/cvsroot/jfreereport co -P libxml
Source0: http://sourceforge.net/projects/jfreereport/files/02.%20Libraries/1.1.3-stable/libxml-1.1.3.zip
Patch0: java-jfree-libxml-1.1.3-build_properties.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: java-jfree-libloader
BuildRequires: java-jfree-libbase
BuildRequires: jakarta-commons-logging
BuildRequires: apache-ant
BuildRequires: java-junit3
BuildRequires: jpackage-utils
Requires: java-jfree-libbase
Requires: java-jfree-libloader
Requires: jpackage-utils
Obsoletes: java-jfree-libxml
Provides: java-jfree-libxml
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
LibXML is a namespace aware SAX-Parser utility library. It eases the pain of implementing non-trivial SAX input handlers. The original code of these classes had been written by Peter Becker for the JCommon library.
LibXML replaces the JCommon-XML classes, which were not namespace aware.
Due to JCommons frozen API, namespace awareness could not be added to the original code without creating a mess.
%if %with_gcj
%package gcj
Group: System/Libraries/Java
Summary: GCJ support for %{name}
Requires: java-gcj-compat
%description gcj
LibXML is a namespace aware SAX-Parser utility library.
This package contains GCJ support for %{name}.
%endif
%package javadoc
Group: Documentation
Summary: Javadoc for %{name}
%description javadoc
LibXML is a namespace aware SAX-Parser utility library.
This package contains documentation for %{name}.
%prep
%setup -q -c -n libxml
%patch0
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 libbase) lib/libbase.jar
%if "%{stage1}" != "1"
ln -sf $(build-classpath libloader) lib/libloader.jar
%endif
ln -sf $(build-classpath junit-3.8.2) lib/junit.jar
ln -sf $(build-classpath commons-logging-api) lib/
ln -s %{_javadir}/ant/* lib/ant-contrib
%build
export CLASSPATH=$(build-classpath ant-contribb3 libbase junit-3.8.2 libloader commons-logging-api)
ant \
jar javadoc
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
mkdir -p %{buildroot}%{_javadir}
install -pm 644 dist/libxml-%{version}.jar %{buildroot}%{_javadir}/libxml-%{version}.jar
(
cd %{buildroot}%{_javadir}
for jar in *-%{version}*; do
ln -sf ${jar} ${jar/-%{version}/}
done
)
mkdir -p %{buildroot}%{_javadocdir}/libxml
cp -pr bin/javadoc/docs/api/* %{buildroot}%{_javadocdir}/libxml
%if %with_gcj
%{_bindir}/aot-compile-rpm
%endif
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files
%defattr(-,root,root)
%{_javadir}/libxml-%{version}.jar
%{_javadir}/libxml.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-pentaho-libxml/libxml-%{version}.jar.db
%{_libdir}/gcj/java-pentaho-libxml/libxml-%{version}.jar.so
%endif
%files javadoc
%defattr(-,root,root)
%{_javadocdir}/libxml
%changelog
* Sat Jan 22 2011 gil <puntogil@libero.it> 1.1.3-1mamba
- update to 1.1.3
* Wed Dec 09 2009 gil <puntogil@libero.it> 1.0.0-2mamba
- rebuilt
* Wed Dec 09 2009 gil <puntogil@libero.it> 1.0.0-1mamba
- update to 1.0.0
* Tue Dec 08 2009 gil <puntogil@libero.it> 0.9.6-1mamba
- package created by autospec