Blob Blame History Raw
Summary:	Java GNOME bindings
Name:		java-gnome
Version:	4.0.16
Release:	3%{?dist}
URL:		http://java-gnome.sourceforge.net
Source0:	http://ftp.gnome.org/pub/gnome/sources/java-gnome/4.0/java-gnome-%{version}.tar.bz2
# This is the "Classpath" exception.
License:	GPLv2 with exceptions
Group:		System Environment/Libraries
BuildRoot:	%(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRequires:	pkgconfig
BuildRequires:	pkgconfig(atk)
BuildRequires:	pkgconfig(cairo-svg)
BuildRequires:	pkgconfig(enchant)
BuildRequires:	pkgconfig(gdk-2.0)
BuildRequires:	pkgconfig(glib-2.0)
BuildRequires:	pkgconfig(gtk+-2.0)
BuildRequires:	pkgconfig(gtk+-unix-print-2.0)
BuildRequires:	pkgconfig(gtksourceview-2.0)
BuildRequires:	pkgconfig(gtkspell-2.0)
BuildRequires:	pkgconfig(libglade-2.0)
BuildRequires:	pkgconfig(libnotify)
BuildRequires:	pkgconfig(pango)
BuildRequires:	pkgconfig(unique-1.0)
BuildRequires:	gettext
BuildRequires:	junit
BuildRequires:	python
BuildRequires:	java-devel >= 1:1.6.0
BuildRequires:	jpackage-utils
Requires:	java >= 1:1.6.0
Requires:	jpackage-utils
# Pulled from upstream, will be in the next release.
Patch0:	java-gnome-fedorajpkg-compat.patch

%description
These are the Java bindings for GTK and GNOME! Featuring a robust 
engineering design, completely generated internals, a lovingly 
crafted layer presenting the public API, and steadily increasing 
coverage of the underlying libraries.

You can use java-gnome to develop sophisticated user interfaces 
for Linux applications so that they richly integrate with the 
GNOME Desktop while leveraging the power of the Java language 
and your expertise with it.

%package	javadoc
Summary:	Javadoc for %{name}
Group:		Documentation
Requires:	%{name} = %{version}-%{release}
Requires:	jpackage-utils
BuildArch:	noarch

%description	javadoc
This package contains the API documentation for %{name}, along with
design documentation and sample code.

%prep
%setup -q
%patch0 -p0 -b .jpackagecompat

if find -name '*.class' -o -name '*.jar' | grep . >&2; then
    echo >&2 "Prebuilt binaries found in the sources. See https://fedoraproject.org/wiki/Packaging:Java#Pre-built_JAR_files_.2F_Other_bundled_software for instructions."
    exit 1
fi

%build
# It'll get two conflicting --libdir parameters, but the last one
# happens to win which is what we want.
%configure --jardir=%{_libdir}/%{name} --libdir=%{_libdir}/%{name}

# The build system does not support parallell builds, so no
# _smp_mflags.
make V=1 build-java doc

%install
rm -rf %{buildroot}

mkdir -p %{buildroot}%{_javadir}
make install DESTDIR=%{buildroot}

mv %{buildroot}%{_libdir}/%{name}/gtk-4.0.jar %{buildroot}%{_libdir}/%{name}/java-gnome.jar
ln -s java-gnome.jar %{buildroot}%{_libdir}/%{name}/gtk-4.0.jar

mkdir -p %{buildroot}%{_javadocdir}
cp -rp doc/api %{buildroot}%{_javadocdir}/%{name}-%{version}
ln -s %{name}-%{version} %{buildroot}%{_javadocdir}/%{name}

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%doc README NEWS LICENCE
%dir %{_libdir}/%{name}
%{_libdir}/%{name}/*.jar
%{_libdir}/%{name}/*.so

%files javadoc
%defattr(-,root,root,-)
# Note that not all here is javadoc. Two subpackages for documentation
# seems silly.
%doc doc/design doc/examples
%{_javadocdir}/%{name}
%{_javadocdir}/%{name}-%{version}

%changelog
* Mon Jul 19 2010 Alexander Boström <abo@root.snowtree.se> - 4.0.16-3
- remove Xvfb buildreq (not used)

* Sat Jul 17 2010 Alexander Boström <abo@root.snowtree.se> - 4.0.16-2
- rebase configure patch

* Tue Jun 22 2010 Alexander Boström <abo@root.snowtree.se> - 4.0.16-1
- update to 4.0.16
- simplify the configure script patch
- pull configure patch from upstream bzr

* Sun Apr 18 2010 Alexander Boström <abo@root.snowtree.se> - 4.0.15-3
- add back the jar symlink

* Sat Apr 17 2010 Alexander Boström <abo@root.snowtree.se> - 4.0.15-2
- make the javadoc subpackage noarch
- add an unversioned symlink to the javadoc

* Fri Mar 19 2010 Alexander Boström <abo@root.snowtree.se> - 4.0.15-1
- upgrade to 4.0.15
- remove jar symlink that's not actually required

* Sat Jan  2 2010 Alexander Boström <abo@root.snowtree.se> - 4.0.14-3
- rearrange jar symlinks

* Fri Jan  1 2010 Alexander Boström <abo@root.snowtree.se> - 4.0.14-2
- fix license
- fix .jar, .class check

* Thu Dec 31 2009 Alexander Boström <abo@root.snowtree.se> - 4.0.14-1
- upgrade to 4.0.14
- add lots of BuildRequires
- use pkg-config to get values for CFLAGS and LDFLAGS
- rename jar
- various little fixes

* Fri Jul  3 2009 Alexander Boström <abo@root.snowtree.se> - 4.0.11-1
- upgrade to 4.0.11
- make jpackagecompatible patch apply cleanly
- remove jnipath patch, it won't apply and it looks like it's not
  needed anymore
- move JARs and JNI .so according to guidelines
- install javadoc and put it in a subpackage

* Wed May 14 2008 Colin Walters <walters@redhat.com> - 4.0.7-1
- Initial version