%define section free Name: jzlib Version: 1.0.5 Release: 2jpp Epoch: 0 Summary: JZlib re-implementation of zlib in pure Java Group: Development/Libraries/Java License: BSD-style URL: http://www.jcraft.com/jzlib/ Source0: http://www.jcraft.com/jzlib/jzlib-1.0.5.tar.gz Source1: %{name}_build.xml BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root Distribution: JPackage Vendor: JPackage Project BuildArch: noarch BuildRequires: jpackage-utils >= 0:1.5.31, ant >= 0:1.5.4 %description The zlib is designed to be a free, general-purpose, legally unencumbered -- that is, not covered by any patents -- lossless data-compression library for use on virtually any computer hardware and operating system. The zlib was written by Jean-loup Gailly (compression) and Mark Adler (decompression). %package javadoc Summary: Javadoc for %{name} Group: Development/Documentation %description javadoc %{summary}. %package demo Summary: Examples for %{name} Group: Development/Libraries/Java %description demo %{summary}. %prep %setup -q -n %{name}-%{version} cp %{SOURCE1} build.xml mkdir src mv com src %build ant dist javadoc %install # jars rm -rf $RPM_BUILD_ROOT install -Dpm 644 dist/lib/%{name}.jar \ $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar ln -s %{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar # javadoc install -dm 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} cp -pr javadoc/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # ghost symlink # examples install -dm 755 $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version} cp -pr example/* $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version} ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_datadir}/%{name} # ghost symlink %clean rm -rf $RPM_BUILD_ROOT %post javadoc rm -f %{_javadocdir}/%{name} ln -s %{name}-%{version} %{_javadocdir}/%{name} %post demo rm -f %{_datadir}/%{name} ln -s %{name}-%{version} %{_datadir}/%{name} %files %defattr(0644,root,root,0755) %{_javadir}/*.jar %doc LICENSE.txt %files javadoc %defattr(0644,root,root,0755) %doc %{_javadocdir}/%{name}-%{version} %ghost %doc %{_javadocdir}/%{name} %files demo %defattr(0644,root,root,0755) %doc %{_datadir}/%{name}-%{version} %ghost %doc %{_datadir}/%{name} %changelog * Tue Oct 19 2004 David Walluck 0:1.0.5-2jpp - rebuild with jdk 1.4.2 * Tue Oct 19 2004 David Walluck 0:1.0.5-1jpp - 0.1.5 * Sun Aug 23 2004 Randy Watler - 0:1.0.3-2jpp - Rebuild with ant-1.6.2 * Wed Jan 14 2004 Ralph Apel - 0:1.0.3-1jpp - First build.