File l2fprod-common.spec of Package l2fprod-common
#
# spec file for package l2fprod-common (Version MACRO)
#
# 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 _cvs_build 1
%define _cvs_version cvs20070317
%define _major_version 7.3
%define _minor_version 20070317
Name: l2fprod-common
Summary: L2FProd.com Common Components
Url: https://l2fprod-common.dev.java.net/
Group: Development/Libraries/Java
Version: %{_major_version}_%{_minor_version}
Release: 3
License: The Apache Software License
BuildRequires: ant
BuildRequires: ant-nodeps
BuildRequires: ant-trax
BuildRequires: java-devel
BuildRequires: jpackage-utils >= 1.5
BuildRequires: jakarta-commons-collections
BuildRequires: jakarta-commons-logging
#BuildRequires: junit >= 3.8
BuildRequires: nachocalendar >= 0.23
BuildRequires: update-alternatives
BuildRequires: xalan-j2
BuildRequires: xml-commons-apis
BuildRequires: jcalendar
BuildRequires: jreleaseinfo
Requires: java >= 1.5
Requires: jakarta-commons-collections
Requires: jakarta-commons-logging
Requires: nachocalendar >= 0.23
Requires: jreleaseinfo
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: %{name}-%{_major_version}.tar.bz2
Source5: %{name}-changelog-text.xsl
Source6: %{name}-CHANGES.txt
Patch0: %{name}-components_xml.patch
# It's hard to build the spring framework yet
Patch1: l2fprod-common-remove-springrcp-component.patch
%description
Swing has lot of components built-in but still some are missing. This
project provides the developer community with these missing components,
components inspired (copied?!) from modern user interfaces.
The Components * JButtonBar it is a bar made of buttons [sic], you
have seen it in Mozilla Firebird, IntelliJ.
* JOutlookBar as seen in Outlook, it stacks components together and
allows only one of the stack to be visible at a given time. The
component extends the JTabbedPane, no surprise regarding its API.
* JFontChooser surprisingly Swing has no font chooser and
JFontChooser address this issue.
* PropertySheet it puts together a list of properties and their
editors. Each property is given a name, a type, a description.It
also supports JavaBeans through BeanInfos and
PropertyDescriptors.
* JTipOfTheDay it brings the famous "Tip Of The Day" dialog to the
Swing toolkit.
Licensed under the Apache License, Version 2.0 (the "License") see
http://www.apache.org/licenses/LICENSE-2.0
%package javadoc
License: The Apache Software License
Summary: L2FProd.com Common Components
Group: Development/Libraries/Java
%description javadoc
Swing has lot of components built-in but still some are missing. This
project provides the developer community with these missing components,
components inspired (copied?!) from modern user interfaces.
The Components * JButtonBar it is a bar made of buttons [sic], you
have seen it in Mozilla Firebird, IntelliJ.
* JOutlookBar as seen in Outlook, it stacks components together and
allows only one of the stack to be visible at a given time. The
component extends the JTabbedPane, no surprise regarding its API.
* JFontChooser surprisingly Swing has no font chooser and
JFontChooser address this issue.
* PropertySheet it puts together a list of properties and their
editors. Each property is given a name, a type, a description.It
also supports JavaBeans through BeanInfos and
PropertyDescriptors.
* JTipOfTheDay it brings the famous "Tip Of The Day" dialog to the
Swing toolkit.
Licensed under the Apache License, Version 2.0 (the "License") see
http://www.apache.org/licenses/LICENSE-2.0
%package demo
License: The Apache Software License
Summary: L2FProd.com Common Components
Group: Development/Libraries/Java
Requires: %{name} = %{version}
%description demo
Swing has lot of components built-in but still some are missing. This
project provides the developer community with these missing components,
components inspired (copied?!) from modern user interfaces.
The Components * JButtonBar it is a bar made of buttons [sic], you
have seen it in Mozilla Firebird, IntelliJ.
* JOutlookBar as seen in Outlook, it stacks components together and
allows only one of the stack to be visible at a given time. The
component extends the JTabbedPane, no surprise regarding its API.
* JFontChooser surprisingly Swing has no font chooser and
JFontChooser address this issue.
* PropertySheet it puts together a list of properties and their
editors. Each property is given a name, a type, a description.It
also supports JavaBeans through BeanInfos and
PropertyDescriptors.
* JTipOfTheDay it brings the famous "Tip Of The Day" dialog to the
Swing toolkit.
Licensed under the Apache License, Version 2.0 (the "License") see
http://www.apache.org/licenses/LICENSE-2.0
%prep
%setup -q -n %{name}
%patch0 -b .sav0
%patch1 -b .sav1
mkdir depend
cp -p %{SOURCE5} depend/changelog-text.xsl
cp %{SOURCE6} CHANGES.txt
%build
export CLASSPATH=$(build-classpath xalan-j2 xalan-j2-serializer)
ln -sf $(build-classpath jcalendar) lib/
ln -sf $(build-classpath jreleaseinfo) lib/
ant -Dant.build.javac.source=1.5 -Dant.build.javac.target=1.5 dist
%install
cd %{name}-%{_major_version}
# l2fprod-common-* jars
install -dm 755 %{buildroot}%{_javadir}/%{name}
for i in all buttonbar directorychooser fontchooser outlookbar \
sandbox shared sheet tasks totd; do
install -m 644 lib/%{name}-$i.jar \
%{buildroot}%{_javadir}/%{name}/%{name}-$i-%{version}.jar
done
(
cd %{buildroot}%{_javadir}/%{name} && \
for jar in *-%{version}*; do \
ln -sf ${jar} $(echo $jar| sed "s|-%{version}||g"); \
done
)
# create link for l2fprod-common-all.jar ==> l2fprod-common-%{version}.jar
ln -s %{_javadir}/%{name}/%{name}-all.jar \
%{buildroot}%{_javadir}/%{name}-%{version}.jar
(
cd %{buildroot}%{_javadir} && \
for jar in *-%{version}*; do \
ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; \
done
)
# javadoc
install -dm 755 %{buildroot}%{_javadocdir}/%{name}-%{version}
cp -pr docs/api/* \
%{buildroot}%{_javadocdir}/%{name}-%{version}
ln -s %{name}-%{version} %{buildroot}%{_javadocdir}/%{name} # ghost symlink
cd ..
# demo
install -dm 755 %{buildroot}%{_datadir}/%{name}
cp -r www/* \
%{buildroot}%{_datadir}/%{name}
# demo start-script
cat > %{buildroot}%{_datadir}/%{name}/%{name}-demo.sh << EOF
#!/bin/bash
java -jar %{_javadir}/%{name}.jar
EOF
%clean
[ -d %{buildroot} -a "%{buildroot}" != "" ] && %__rm -rf %{buildroot}
%files
%defattr(0644,root,root,0755)
%doc %{name}-%{_major_version}/*.txt
%doc CHANGES.txt
%{_javadir}/%{name}*.jar
%dir %{_javadir}/%{name}
%{_javadir}/%{name}/%{name}*.jar
%files javadoc
%defattr(0644,root,root,0755)
%doc %{_javadocdir}/%{name}-%{version}
%doc %{_javadocdir}/%{name}
%files demo
%defattr(0644,root,root,0755)
%doc %{name}-%{_major_version}/*.txt
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/*
%defattr(0755,root,root,0755)
%{_datadir}/%{name}/%{name}-demo.sh
%changelog
* Tue Sep 16 2008 mvyskocil@suse.cz
- -source=1.5 -target=1.5
* Wed Aug 20 2008 mvyskocil@suse.cz
- Initial packaging in SUSE - 7.3