File swingx.spec of Package swingx

#
# spec file for package swingx (Version 0.9.4)
#
# Copyright (c) 2010 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/
#



Name:           swingx
Version:        0.9.4
Release:        1
Summary:        A collection of Swing components
License:        LGPLv2
Group:          Development/Libraries/Java
Url:            https://swingx.dev.java.net/
Source0:        https://swingx.dev.java.net/files/documents/2981/110622/%{name}-%{version}-src.tar.bz2
# Remove external dependency that's now included in JDK 1.6
# See http://forums.java.net/jive/thread.jspa?messageID=318384
Patch0:         swingx-0.9.4-LoginService.patch
# Remove build dependencies on included binary jars and add system jars
# Remove main class from manifest
Patch1:         swingx-0.9.4-project-properties.patch
# Don't do the "demo taglet" stuff
Patch2:         swingx-0.9.4-swinglabs-build-impl.patch

Requires:       java >= 1.6.0

BuildRequires:  ant ant-nodeps
BuildRequires:  java-devel >= 1.6.0
BuildRequires:  jpackage-utils >= 1.5
BuildRequires:  batik
BuildArch:      noarch
Requires(post): jpackage-utils
Requires(postun): jpackage-utils

BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
SwingX contains a collection of powerful, useful, and just plain fun Swing
components. Each of the Swing components have been extended, providing
data-aware functionality out of the box. New useful components have been
created like the JXDatePicker, JXTaskPane, and JXImagePanel.

%package javadoc
License:        LGPLv2
Summary:        Javadoc for %{name}
Group:          Documentation/HTML

%description javadoc
Documentation for the SwingX widgets

%prep
%setup -q -n %{name}-%{version}-src
%patch0 -p1
%patch1 -p1
%patch2 -p1
rm -rf lib/

%build
ant jar javadoc

%install
mkdir -p ${RPM_BUILD_ROOT}%{_javadocdir}/
cp -r dist/javadoc ${RPM_BUILD_ROOT}%{_javadocdir}/%{name}-%{version}
mkdir -p $RPM_BUILD_ROOT%{_javadir}
cp -p dist/%{name}.jar  $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
ln -s %{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
%add_to_maven_depmap org.jdesktop.swingx %{name} %{version} JPP %{name}

%clean
rm -rf $RPM_BUILD_ROOT

%post
%update_maven_depmap

%postun
%update_maven_depmap

%files
%defattr(-,root,root,-)
%doc COPYING README
%{_javadir}/*.jar
%config(noreplace) %{_mavendepmapfragdir}/%{name}

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

%changelog
openSUSE Build Service is sponsored by