File matthewlib-java.spec of Package matthewlib-java

#
# spec file for package matthewlib-java (Version 0.7.1)
#
# 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 orig_name libmatthew-java

Name:           matthewlib-java
Version:        0.7.1
Release:        4
Summary:        A few useful Java libraries
Group:          Development/Libraries/Java
License:        GPL v2 only
# actual upstream:
#URL: http://matthew.ath.cx/projects/java/
#Source0: http://matthew.ath.cx/projects/java/%{name}-%{version}.tar.gz
# upstream author is also the debian maintainer for this package.
# he gets newer releases into debian before he puts them up on
# the upstream website. so we use the "original" source from debian
# (ie, the source before debian patches are applied to it)
Url:            http://packages.debian.org/source/sid/libmatthew-java
Source0:        http://ftp.de.debian.org/debian/pool/main/libm/%{orig_name}/%{orig_name}_%{version}.orig.tar.gz
Patch0:         early_upstream.patch
Patch1:         install_doc.patch
Patch3:         classpath_fix.patch
Patch4:         openjdk.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  java-devel
BuildRequires:  jpackage-utils
BuildRequires:  fdupes
Requires:       jre >= 1.5.0
Requires:       jpackage-utils
Provides:       %{orig_name}

%description
A collection of Java libraries: - Unix Sockets Library This is a
   collection of classes and native code to allow you to read and
   write Unix sockets in Java.

- Debug Library This is a comprehensive logging and debugging
   solution.

- CGI Library This is a collection of classes and native code to
   allow you to write CGI applications in Java.

- I/O Library This provides a few much needed extensions to the Java
   I/O subsystem.

- Hexdump This class formats byte-arrays in hex and ascii for display.



Authors:
--------
    Matthew Johnson

%package javadoc
License:        GPL v2 only
Summary:        A few useful Java libraries
Group:          Development/Libraries/Java

%description javadoc
A collection of Java libraries: - Unix Sockets Library This is a
   collection of classes and native code to allow you to read and
   write Unix sockets in Java.

- Debug Library This is a comprehensive logging and debugging
   solution.

- CGI Library This is a collection of classes and native code to
   allow you to write CGI applications in Java.

- I/O Library This provides a few much needed extensions to the Java
   I/O subsystem.

- Hexdump This class formats byte-arrays in hex and ascii for display.



Authors:
--------
    Matthew Johnson

%prep
%setup -q -n %{orig_name}-%{version}
%patch0 -p1
%patch1 -p1
%patch3 -p1
%patch4 -p1

%build
make \
    CFLAGS='%{optflags} -fpic -std=c99' \
    LIBDIR='%{_libdir}' \
    LD='gcc' \
    JCFLAGS='-target 1.5'

%install
make install \
    DESTDIR=$RPM_BUILD_ROOT \
    JARDIR=%{_javadir} \
    LIBDIR=%{_libdir}/ \
    DOCDIR=%{_javadocdir}/%{name}-%{version}
%fdupes -s $RPM_BUILD_ROOT/

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root,-)
%{_javadir}/*jar
%{_libdir}/lib*.so*
%doc COPYING INSTALL README

%files javadoc
%defattr(-,root,root,-)
%{_javadocdir}/%{name}-%{version}

%changelog
* Mon Feb 02 2009 mvyskocil@suse.cz
- fix of bnc#468886: matthewlib-java unix server socket creation crashes due to
  a linking problem
  - use a gcc as a linker
* Thu Sep 04 2008 mvyskocil@suse.cz
- Removal of a jpackage_compliance patch, which seems to be uncecessary
- Removal of makefile patch, all of necessary changes could be done via make
  variables
* Wed Sep 03 2008 mvyskocil@suse.cz
- Initial packaging for SUSE (0.7.1)