File jgoodies-forms.spec of Package jgoodies-forms
#
# spec file for package jgoodies-forms (Version 1.2.1)
#
# Copyright (c) 2008 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/
#
# norootforbuild
%define _shortname forms
Name: jgoodies-forms
Summary: jgoodies-forms
Url: http://jgoodies.com
Group: Development/Languages/Java
Version: 1.2.1
Release: 2
License: BSD 3-Clause
BuildRequires: ant
BuildRequires: jpackage-utils
BuildRequires: java-devel
BuildRequires: update-alternatives
BuildRequires: xml-commons-apis
BuildRequires: xml-commons-resolver
Requires: jre >= 1.5
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: http://www.jgoodies.com/download/libraries/%{_shortname}-%{version}.tar.bz2
%description
The Forms framework helps you lay out and implement elegant Swing
panels quickly and consistently. It makes simple things easy and the
hard stuff possible, the good design easy and the bad difficult.
Main Benefits: * Powerful, flexible and precise layout
* Easy to work with and quite easy to learn
* Faster UI production
* Better UI code readability
* Leads to better style guide compliance
Authors:
--------
Karsten Lentzsch
%package javadoc
License: BSD 3-Clause
Summary: jgoodies-forms
Group: Development/Languages/Java
PreReq: coreutils
%description javadoc
The Forms framework helps you lay out and implement elegant Swing
panels quickly and consistently. It makes simple things easy and the
hard stuff possible, the good design easy and the bad difficult.
Main Benefits: * Powerful, flexible and precise layout
* Easy to work with and quite easy to learn
* Faster UI production
* Better UI code readability
* Leads to better style guide compliance
Authors:
--------
Karsten Lentzsch
%package manual
License: BSD 3-Clause
Summary: jgoodies-forms
Group: Development/Languages/Java
%description manual
The Forms framework helps you lay out and implement elegant Swing
panels quickly and consistently. It makes simple things easy and the
hard stuff possible, the good design easy and the bad difficult.
Main Benefits: * Powerful, flexible and precise layout
* Easy to work with and quite easy to learn
* Faster UI production
* Better UI code readability
* Leads to better style guide compliance
Authors:
--------
Karsten Lentzsch
%package demo
License: BSD 3-Clause
Summary: jgoodies-forms
Group: Development/Languages/Java
Requires: %{name} = %{version}
%description demo
The Forms framework helps you lay out and implement elegant Swing
panels quickly and consistently. It makes simple things easy and the
hard stuff possible, the good design easy and the bad difficult.
Main Benefits: * Powerful, flexible and precise layout
* Easy to work with and quite easy to learn
* Faster UI production
* Better UI code readability
* Leads to better style guide compliance
Authors:
--------
Karsten Lentzsch
%prep
%setup -q -n %{_shortname}-%{version}
# clean up some files
%__rm -f %{_shortname}-%{version}.jar
# wrong end of line encoding and rigths
sed -i -e 's/.$//' LICENSE.txt README.html RELEASE-NOTES.txt
#chmod 644 LICENSE.txt README.html RELEASE-NOTES.txt
find docs -iname '*.html' | xargs sed -i -e 's/.$//'
#find docs -iname '*.html' | xargs chmod 644
%build
unset CLASSPATH
export CLASSPATH=%{java_home}/jre/lib/rt.jar
%ant compile jar javadoc
%install
# jars
%__install -dm 755 %{buildroot}%{_javadir}
%__install -pm 644 build/%{_shortname}.jar \
%{buildroot}%{_javadir}/%{_shortname}-%{version}.jar
pushd %{buildroot}%{_javadir}
for jar in *-%{version}*; do
ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`
done
popd
# javadoc
%__install -dm 755 %{buildroot}%{_javadocdir}/%{name}-%{version}
%__cp -pr build/docs/api/* \
%{buildroot}%{_javadocdir}/%{name}-%{version}
ln -s %{name}-%{version} %{buildroot}%{_javadocdir}/%{name}
# demo
%__install -dm 755 %{buildroot}%{_datadir}/%{name}
%__cp -pr src/tutorial/* \
%{buildroot}%{_datadir}/%{name}
%__cp -pr build/classes/tutorial/* \
%{buildroot}%{_datadir}/%{name}
%__cat > %{name}.sh << EOF
#!/bin/bash
cd %{_datadir}/%{name}
%java -cp .:%{_javadir}/forms.jar \
com/jgoodies/forms/tutorial/QuickStartExample
EOF
%__install -dm 755 %{buildroot}%{_bindir}
%__install -m 755 %{name}.sh \
%{buildroot}%{_bindir}
%clean
[ -d %{buildroot} -a "%{buildroot}" != "" ] && %__rm -rf %{buildroot}
%files
%defattr(-,root,root)
%doc LICENSE.txt README.html RELEASE-NOTES.txt
%{_javadir}/%{_shortname}*.jar
%files javadoc
%defattr(-,root,root)
%doc %{_javadocdir}/%{name}-%{version}
%doc %{_javadocdir}/%{name}
%files manual
%defattr(-,root,root,-)
%doc LICENSE.txt README.html RELEASE-NOTES.txt
%doc docs/references.html
%doc docs/tips.html
%doc docs/visualbuilders.html
%doc docs/*.pdf
%doc docs/style.css
%doc docs/reference
%doc docs/images/
%files demo
%defattr(644,root,root,755)
%doc LICENSE.txt README.html RELEASE-NOTES.txt
%doc docs/tutorial
%{_datadir}/%{name}
%defattr(755,root,root,755)
%{_bindir}/%{name}.sh
%changelog
* Tue Aug 19 2008 mvyskocil@suse.cz
- Initial packaging (based on Packman source rpm)