# Use rpmbuild --without gcj to disable native bits %define with_gcj %{!?_without_gcj:1}%{?_without_gcj:0} Name: liblayout Version: 0.2.9 Release: 1%{?dist} Summary: CSS based layouting framework License: LGPLv2+ Group: System Environment/Libraries Source: http://downloads.sourceforge.net/jfreereport/%{name}-%{version}.tar.gz URL: http://reporting.pentaho.org/ BuildRequires: ant, java-devel, jpackage-utils, jcommon, flute, libloader BuildRequires: librepository, pentaho-libxml, libfonts, sac Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: java, jpackage-utils, jcommon, flute, libloader >= 0.3.7 Requires: librepository >= 0.1.6, libfonts >= 0.3.4, sac, xml-commons-apis Requires: pentaho-libxml %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: liblayout-0.2.9-depends.patch %description LibLayout is a layouting framework. It is based on the Cascading StyleSheets standard. The layouting expects to receive its content as a DOM structure (although it does not rely on the W3C-DOM API). %package javadoc Summary: Javadoc for %{name} Group: Development/Documentation Requires: %{name} = %{version}-%{release} Requires: jpackage-utils %description javadoc Javadoc for %{name}. %prep %setup -q %patch1 -p1 -b .depends find . -name "*.jar" -exec rm -f {} \; build-jar-repository -s -p lib jcommon flute libloader librepository libxml libfonts sac jaxp %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 %{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name} cp -rp javadoc $RPM_BUILD_ROOT%{_javadocdir}/%{name} %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}/%{name} %changelog * Wed May 07 2008 Caolan McNamara 0.2.9-1 - initial fedora import