packages jgoodies-looks.spec
      Pages: < 1 >  DOWNLOAD      
%define        pkgver 2_2_2
Name:          jgoodies-looks
Version:       2.2.2
Release:       4mamba
Summary:       Free high-fidelity Windows and multi-platform appearance
Group:         Development/Libraries/Java
Vendor:        openmamba
Distribution:  openmamba
Packager:      Automatic Build System <autodist@...>
URL:           http://www.jgoodies.com/freeware/looks/
Source0:       http://www.jgoodies.com/download/libraries/looks/looks-%{pkgver}.zip
Source1:       http://mirrors.ibiblio.org/pub/mirrors/maven2/com/jgoodies/looks/%{version}/looks-%{version}.pom
Patch0:        jgoodies-looks-2.2.1-build.patch
Patch1:        jgoodies-looks-2.2.1-no-com-sun.patch
Patch2:        jgoodies-looks-2.2.1-remove-jdk-stuff.patch
License:       BSD
BuildRequires: apache-ant
BuildRequires: jgoodies-forms13
BuildRequires: jgoodies-forms
BuildRequires: jpackage-utils
#Obsoletes:     java-looks
#Provides:      java-looks
BuildRoot:     %{_tmppath}/%{name}-%{version}-root

%description
The JGoodies look&feels make your Swing applications and applets look better.
They have been optimized for readability, precise micro-design and usability.

Main Benefits:

* Improved readability, legibility and in turn usability.
* Improved aesthetics - looks good on the majority of desktops
* Simplified multi-platform support
* Precise micro-design

%package javadoc
Summary: Javadoc documentation for %{name}
Group:   Documentation

%description javadoc
The JGoodies look&feels make your Swing applications and applets look better.
They have been optimized for readability, precise micro-design and usability.

This package contains the Javadoc documentation for JGoodies Looks.

%prep

%setup -q -n looks-%{version}
%patch0 -p1

# unzip the look&feel settings from bundled jar before we delete it
# (taken from Gentoo ebuild)
unzip -j looks-%{version}.jar META-INF/services/javax.swing.LookAndFeel \
|| die "unzip of javax.swing.LookAndFeel failed"

mv javax.swing.LookAndFeel all.txt

for j in $(find . -name "*.jar"); do
       mv $j $j.no
done

pushd lib
	ln -sf $(build-classpath jgoodies-forms13) forms-1.3.0pre4.jar
	ln -sf $(build-classpath jgoodies-forms) forms-1.2.1.jar
popd
rm -r docs/api
# Delete the whole Windows L&F because it depends on com.sun.java packages
# (Unless we're compiling with a Sun JVM)
#%patch1 -p1
#rm -r src/core/com/jgoodies/looks/windows

# Delete a file that's a copy of something distributed by Sun, and patch the files that
# use it so they don't.
#rm src/core/com/jgoodies/looks/common/ExtBasicArrowButtonHandler.java
#%patch2 -p1

%build
ant -Ddescriptors.dir=. compile jar javadoc

%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"

mkdir -p %{buildroot}%{_javadir}
mkdir -p %{buildroot}%{_datadir}/maven2/poms

install -pm 644 %{SOURCE1} %{buildroot}%{_datadir}/maven2/poms/JPP-jgoodies-looks.pom
%add_to_maven_depmap com.jgoodies looks %{version} JPP jgoodies-looks

cp -p build/looks.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
cp -p build/looks-win.jar %{buildroot}%{_javadir}/%{name}-win-%{version}.jar
cp -p build/demo.jar  %{buildroot}%{_javadir}/%{name}-demo-%{version}.jar
cp -p build/fonttest.jar %{buildroot}%{_javadir}/%{name}-fonttest-%{version}.jar
cp -p build/plastic.jar %{buildroot}%{_javadir}/%{name}-plastic-%{version}.jar
cp -p build/tiny.jar  %{buildroot}%{_javadir}/%{name}-tiny-%{version}.jar

(
	cd %{buildroot}%{_javadir}
	for jar in *-%{version}.jar; do 
		ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`
	done
)

mkdir -p %{buildroot}%{_javadocdir}/%{name}-%{version}
cp -pr build/docs/api/* %{buildroot}%{_javadocdir}/%{name}-%{version}

for file in *.txt *.html docs/*.* docs/guide/*.*; do
    sed -i 's/\r//' $file
done

(
	cd %{buildroot}%{_javadocdir}
	ln -s %{name}-%{version} %{name}
)

# FIXME gjc support
#{_bindir}/aot-compile-rpm

%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"

%post
%update_maven_depmap

%postun
%update_maven_depmap

%files
%defattr(-,root,root)
%{_javadir}/jgoodies-looks-%{version}.jar
%{_javadir}/jgoodies-looks.jar
%{_javadir}/jgoodies-looks-demo-%{version}.jar
%{_javadir}/jgoodies-looks-demo.jar
%{_javadir}/jgoodies-looks-fonttest-%{version}.jar
%{_javadir}/jgoodies-looks-fonttest.jar
%{_javadir}/jgoodies-looks-plastic-%{version}.jar
%{_javadir}/jgoodies-looks-plastic.jar
%{_javadir}/jgoodies-looks-tiny-%{version}.jar
%{_javadir}/jgoodies-looks-tiny.jar
%{_javadir}/jgoodies-looks-win-%{version}.jar
%{_javadir}/jgoodies-looks-win.jar
%{_datadir}/maven2/poms
%{_mavendepmapfragdir}
%doc RELEASE-NOTES.txt LICENSE.txt README.html docs/

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

%changelog
* Mon Dec 29 2014 Automatic Build System <autodist@...> 2.2.2-4mamba
- automatic rebuild by autodist

* Tue Oct 20 2009 gil <puntogil@...> 2.2.2-3mamba
- rebuilt

* Thu Jul 23 2009 gil <puntogil@...> 2.2.2-2mamba
- rebuilt

* Sun Jul 05 2009 gil <puntogil@...> 2.2.2-1mamba
- update to 2.2.2

* Mon Jan 05 2009 gil <puntogil@...> 2.2.1-1mamba
- package created by autospec