jzlib/jzlib.spec
OBS User autobuild daf16db6b2 Accepting request 20290 from Java:packages
Copy from Java:packages/jzlib based on submit request 20290 from user mvyskocil

OBS-URL: https://build.opensuse.org/request/show/20290
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/jzlib?expand=0&rev=3
2009-09-10 10:53:54 +00:00

124 lines
3.9 KiB
RPMSpec

#
# spec file for package jzlib (Version 1.0.7)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define section free
Name: jzlib
Version: 1.0.7
Release: 4
Summary: JZlib re-implementation of zlib in pure Java
Group: Development/Libraries/Java
License: BSD 3-clause (or similar)
Url: http://www.jcraft.com/jzlib/
Source0: http://www.jcraft.com/jzlib/jzlib-1.0.7.tar.gz
Source1: %{name}_build.xml
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
BuildRequires: jpackage-utils >= 1.6
BuildRequires: java-devel
BuildRequires: ant >= 1.6
%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
License: BSD 3-clause (or similar)
Summary: JZlib re-implementation of zlib in pure Java
Group: Development/Libraries/Java
Requires(post): %{__rm}
Requires(post): /bin/ln
Requires(postun): %{__rm}
%description javadoc
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 demo
License: BSD 3-clause (or similar)
Summary: JZlib re-implementation of zlib in pure Java
Group: Development/Libraries/Java
Requires(post): %{__rm}
Requires(post): /bin/ln
Requires(postun): %{__rm}
%description demo
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).
%prep
%setup -q -n %{name}-%{version}
cp %{SOURCE1} build.xml
mkdir src
mv com src
# bnc#500524
# be sure that we don't distribute GPL derived code marked as BSD
rm misc/mindtermsrc-v121-compression.patch
%build
ant -Dant.build.javac.source=1.5 -Dant.build.javac.target=1.5 dist javadoc
%install
# jars
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}
# bnc#536215 - be compatible with older Packman package
# ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_datadir}/%{name} # ghost symlink
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(0644,root,root,0755)
%{_javadir}/*.jar
%doc LICENSE.txt
%files javadoc
%defattr(0644,root,root,0755)
%doc %{_javadocdir}/%{name}-%{version}
%doc %{_javadocdir}/%{name}
%files demo
%defattr(0644,root,root,0755)
%doc %{_datadir}/%{name}-%{version}
%changelog