java-flexdock/java-flexdock.spec

149 lines
4.2 KiB
RPMSpec

%define javahome /usr/lib/jvm/java
Name: java-flexdock
Version: 0.5.2
Release: 1mamba
Summary: A Java docking framework for use in cross-platform Swing applications
Group: System/Libraries/Java
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://flexdock.dev.java.net
Source: https://flexdock.dev.java.net/files/documents/2037/152436/flexdock-%{version}-src.zip
# remove window stuff, compile native, crosslink for javadoc, set X11 include dir, remove classpath from flexdock demo jar
Patch0: java-flexdock-0.5.2-build_xml.patch
Patch1: java-flexdock-0.5.2-ResourceManager.patch
Patch2: java-flexdock-0.5.2-AllDemos.patch
License: MIT
BuildRequires: apache-ant
BuildRequires: apache-ant-regexp
BuildRequires: jakarta-commons-logging == 1.1.1
BuildRequires: java-openjdk-javadoc
## AUTOBUILDREQ-BEGIN
BuildRequires: apache-ant-commons-logging
BuildRequires: glibc-devel
BuildRequires: java-openjdk
BuildRequires: java-skinlf
BuildRequires: jgoodies-looks
BuildRequires: jpackage-utils
BuildRequires: libX11-devel
## AUTOBUILDREQ-END
Requires: apache-ant-commons-logging
Requires: java-openjdk
Requires: java-skinlf
Requires: jgoodies-looks
Requires: jpackage-utils
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
A Java docking framework for use in cross-platform Swing applications. It offers features you'd expect in any desktop docking framework such as:
* Tabbed and Split Layouts
* Drag-n-Drop capability (with native drag rubber band painting on some platforms)
* Floating windows
* Collapsible Containers to Save Real Estate
* Layout Persistence
%package javadoc
Group: Documentation
Summary: Javadoc for %{name}
%description javadoc
A Java docking framework for use in cross-platform Swing applications.
This package contains documentation for %{name}.
%prep
%setup -q -c %{name}-%{version}
%patch0 -p0
%patch1 -p0
%patch2 -p0
for j in $(find . -name "*.jar"); do
rm -rf $j
done
for o in $(find . -name "*.so"); do
rm -rf $o
done
for d in $(find . -name "*.dll"); do
rm -rf $d
done
# rm -rf ./lib/looks-2.1.1.jar
ln -sf $(build-classpath jgoodies-looks) lib/looks-2.1.1.jar
# rm -rf ./lib/commons-logging-1.1.jar
ln -sf $(build-classpath commons-logging) lib/commons-logging-1.1.jar
# only for flexdock-demo jar
# rm -rf ./lib/jmf/lib/customizer.jar
# rm -rf ./lib/jmf/lib/multiplayer.jar
# rm -rf ./lib/jmf/lib/jmf.jar
# rm -rf ./lib/jmf/lib/mediaplayer.jar
rm -rf src/java/demo/org/flexdock/demos/raw/jmf
# rm -rf ./lib/skinlf.jar
ln -sf $(build-classpath skinlf) lib/skinlf.jar
echo "sdk.home=%javahome" > workingcopy.properties
for i in README-RELEASE LICENSE.txt README release-notes.txt ; do
sed -i 's/\r//' $i
done
%build
export CLASSPATH=$(build-classpath jgoodies-looks ant/ant-apache-regexp ant/ant-commons-logging skinlf commons-logging)
ant -v -Dbuild.sysclasspath=first build.with.native jar
ant -v -Dbuild.sysclasspath=first compile.native
ant -Dj2se.api=%{_javadocdir}/java javadoc
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
mkdir -p %{buildroot}%{_jnidir}
install -pm 644 build/flexdock-%{version}.jar \
%{buildroot}%{_jnidir}/
SOFILE=$(find . -name "libRubberBand*so")
install -pm755 $SOFILE %{buildroot}%{_jnidir}/libRubberBand-0.so
(
cd %{buildroot}%{_jnidir}
for jar in *-%{version}*; do
ln -sf ${jar} ${jar/-%{version}/}
done
)
mkdir -p %{buildroot}%{_javadocdir}/flexdock
cp -pr build/docs/api/* %{buildroot}%{_javadocdir}/flexdock
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files
%defattr(-,root,root)
%{_jnidir}/flexdock-%{version}.jar
%{_jnidir}/flexdock.jar
%{_jnidir}/libRubberBand-0.so
%doc README README-BUILD README-RELEASE
%files javadoc
%defattr(-,root,root)
%{_javadocdir}/flexdock
%changelog
* Fri Feb 04 2011 gil <puntogil@libero.it> 0.5.2-1mamba
- update to 0.5.2
* Fri Feb 04 2011 gil <puntogil@libero.it> 0.5.1-2mamba
- rebuilt with openjdk support
- add sub package: javadoc
- rebuilt with system libraries
- built libRubberBand
* Fri Nov 21 2008 Silvan Calarco <silvan.calarco@mambasoft.it> src-1mamba
- package created by autospec