java-jfree-liblayout/java-jfree-liblayout.spec

161 lines
4.3 KiB
RPMSpec

%define with_gcj 1
%define javahome %{_jvmdir}/jdk
Name: java-jfree-liblayout
Version: 0.2.10
Release: 1mamba
Summary: CSS based layouting framework
Group: Development/Libraries/Java
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://reporting.pentaho.org/
Source: http://downloads.sourceforge.net/project/jfreereport/10.%20Flow%20Engine/0.9.4/liblayout-0.2.10.zip
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: jakarta-commons-logging
BuildRequires: java-flute
BuildRequires: java-iText
BuildRequires: java-jfree-librepository
BuildRequires: java-sac
BuildRequires: java-jfree-libfonts
BuildRequires: java-jfree-libbase
BuildRequires: java-jfree-libloader
BuildRequires: java-pentaho-libxml
BuildRequires: java-junit3
BuildRequires: xml-commons-apis
Requires: java-flute
Requires: java-jfree-libbase
Requires: java-jfree-libloader
Requires: java-jfree-libfonts
Requires: java-jfree-librepository
Requires: java-sac
Requires: java-pentaho-libxml
Requires: jpackage-utils
Requires: xml-commons-apis
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
LibLayout is a layouting framework. It is based on the Cascading StyleSheets standard (in the upcoming version 3). The layouting expects to receive its content as a DOM structure (although it does not rely on the W3C-DOM API).
%if %with_gcj
%package gcj
Group: System/Libraries/Java
Summary: GCJ support for %{name}
Requires: java-gcj-compat
%description gcj
JFree Java General Serialization Framework Library.
This package contains GCJ support for %{name}.
%endif
%package javadoc
Group: Documentation
Summary: Javadoc for %{name}
%description javadoc
LibLayout is a layouting framework.
This package contains documentation for %{name}.
%prep
%setup -q -c %{name}-%{version}
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 -sf $(build-classpath flute) lib/
ln -sf $(build-classpath libbase) lib/libbase.jar
ln -sf $(build-classpath libloader) lib/
ln -sf $(build-classpath sac) lib/
ln -sf $(build-classpath itext) lib/
ln -sf $(build-classpath librepository) lib/
ln -sf $(build-classpath libfonts) lib/
ln -sf $(build-classpath libxml) lib/
ln -sf $(build-classpath xml-commons-apis-ext) lib/
%build
unset JAVA_HOME
export JAVA_HOME=%{javahome}
export CLASSPATH=""
CLASSPATH=$CLASSPATH:$(build-classpath ant-contribb3 junit-3.8.2 libbase commons-logging commons-logging-api)
CLASSPATH=$CLASSPATH:$(build-classpath flute libfonts libloader librepository libxml itext sac xml-commons-apis-ext)
ant \
jar javadoc
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
mkdir -p %{buildroot}%{_javadir}
install -pm 644 build/lib/liblayout.jar %{buildroot}%{_javadir}/liblayout-%{version}.jar
(
cd %{buildroot}%{_javadir}
for jar in *-%{version}*; do
ln -sf ${jar} ${jar/-%{version}/}
done
)
mkdir -p %{buildroot}%{_javadocdir}/liblayout
cp -pr build/api/* %{buildroot}%{_javadocdir}/liblayout
%if %with_gcj
%{_bindir}/aot-compile-rpm
%endif
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files
%defattr(-,root,root)
%{_javadir}/liblayout-%{version}.jar
%{_javadir}/liblayout.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-liblayout/liblayout-%{version}.jar.db
%{_libdir}/gcj/java-jfree-liblayout/liblayout-%{version}.jar.so
%endif
%files javadoc
%defattr(-,root,root)
%{_javadocdir}/liblayout
%changelog
* Sat Jan 22 2011 gil <puntogil@libero.it> 0.2.10-1mamba
- update to 0.2.10
* Wed Dec 09 2009 gil <puntogil@libero.it> 0.2.9-2mamba
- rebuilt
* Wed Dec 09 2009 gil <puntogil@libero.it> 0.2.9-1mamba
- package created by autospec