packages java-jcommon-serializer.spec
      Pages: < 1 >  DOWNLOAD      
%define        with_gcj 1
%define        javahome /usr/lib/jvm/java
Name:          java-jcommon-serializer
Version:       0.3.0
Release:       2mamba
Summary:       JFree Java General Serialization Framework
Group:         Development/Libraries/Java
Vendor:        openmamba
Distribution:  openmamba
Packager:      gil <puntogil@...>
URL:           http://reporting.pentaho.org/
Source0:       http://downloads.sourceforge.net/project/jfreereport/99.%20Archive/07.%20JCommon-Serializer/0.3.0-GA/jcommon-serializer-0.3.0.tar.gz
Source1:       jcommon-serializer-%{version}-build.properties
License:       LGPL
BuildRequires: apache-ant
BuildRequires: jakarta-commons-logging
BuildRequires: java-jfree-libbase
BuildRequires: java-junit3
BuildRequires: jpackage-utils
Requires:      jakarta-commons-logging
Requires:      java-jfree-libbase
Requires:      jpackage-utils
BuildRoot:     %{_tmppath}/%{name}-%{version}-root

%description
Jcommon-serializer is a general serialization framework used by JFreeChart,
JFreeReport and other projects.

%if %with_gcj
%package gcj
Group:         System/Libraries/Java
Summary:       GCJ support for %{name}
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: java-gcj-compat
BuildRequires: libgcc
BuildRequires: libgcj4-devel
BuildRequires: libz-devel
## AUTOBUILDREQ-END
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
JFree Java General Serialization Framework.

This package contains documentation for %{name}.

%prep

%setup -q -n jcommon-serializer-%{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

rm -rf build.properties

cp %{SOURCE1} build.properties
sed -i "s|@VERSION@|%{version}|" build.properties
sed -i "s|@TARGET@|1.2|" build.properties
sed -i "s|@SOURCE@|1.2|" build.properties
sed -i "s|@BUILD_RETRO_TARGET@|1.5|" build.properties
sed -i "s|@BUILD_RETRO@|/usr/lib/jvm/jdk-gcj|" build.properties

mkdir -p lib
ln -sf $(build-classpath commons-logging-api) lib/
ln -sf $(build-classpath libbase) lib/

%build

unset JAVA_HOME
export JAVA_HOME=%{javahome}
export CLASSPATH=$(build-classpath junit-3.8.2 libbase commons-logging commons-logging-api)
ant compile javadoc

%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"

mkdir -p %{buildroot}%{_javadir}

install -pm 644 jcommon-serializer-%{version}.jar %{buildroot}%{_javadir}/

(
  cd %{buildroot}%{_javadir}
  for jar in *-%{version}*; do
    ln -sf ${jar} ${jar/-%{version}/}
  done
)

mkdir -p %{buildroot}%{_javadocdir}/jcommon-serializer
cp -pr javadoc/* %{buildroot}%{_javadocdir}/jcommon-serializer

%if %with_gcj
%{_bindir}/aot-compile-rpm
%endif

%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"

%files
%defattr(-,root,root)
%{_javadir}/jcommon-serializer-%{version}.jar
%{_javadir}/jcommon-serializer.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-jcommon-serializer/jcommon-serializer-%{version}.jar.db
%{_libdir}/gcj/java-jcommon-serializer/jcommon-serializer-%{version}.jar.so
%endif

%files javadoc
%defattr(-,root,root)
%{_javadocdir}/jcommon-serializer

%changelog
* Sat Jan 22 2011 gil <puntogil@...> 0.3.0-2mamba
- rebuilt devel

* Wed Dec 09 2009 gil <puntogil@...> 0.3.0-1mamba
- package created by autospec