[java-gnome] Install jar into %%_jnidir per latest guidelines (#1101069)

Yaakov Selkowitz yselkowitz at fedoraproject.org
Thu Jul 31 17:57:03 UTC 2014


commit 8928b699406460cb1f72bf18d8603031f834a598
Author: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>
Date:   Mon Jun 30 11:51:14 2014 -0500

    Install jar into %%_jnidir per latest guidelines (#1101069)
    
    Also:
    Workaround for brp-java-repack-jars skipping top-level dot-files
    Remove obsolete gtkspell BR

 java-gnome-4.1.3-libdir.patch |   53 +++++++++++++++++++++++++++++++++++++++++
 java-gnome.spec               |   22 +++++++++++++----
 2 files changed, 70 insertions(+), 5 deletions(-)
---
diff --git a/java-gnome-4.1.3-libdir.patch b/java-gnome-4.1.3-libdir.patch
new file mode 100644
index 0000000..1faa295
--- /dev/null
+++ b/java-gnome-4.1.3-libdir.patch
@@ -0,0 +1,53 @@
+Workaround for brp-java-repack-jars skipping top-level dot-files
+
+--- java-gnome-4.1.3-orig/configure	2013-05-04 20:08:23.000000000 -0500
++++ java-gnome-4.1.3/configure	2014-05-25 22:41:33.344932567 -0500
+@@ -2293,7 +2293,7 @@
+ 
+ output " - native library location";
+ 
+-open LIBRARY, ">.libdir";
++open LIBRARY, ">libdir.properties";
+ 
+ print LIBRARY <<HERE ;
+ $libdir
+--- java-gnome-4.1.3-orig/Makefile	2013-05-04 20:08:23.000000000 -0500
++++ java-gnome-4.1.3/Makefile	2014-05-25 22:41:22.232100829 -0500
+@@ -60,7 +60,7 @@
+ 	@/bin/echo -e "INSTALL\t$@"
+ 	cp -f $< $@
+ 	@/bin/echo -e "JAR\t$@"
+-	jar uf $@ .libdir
++	jar uf $@ libdir.properties
+ 	@/bin/echo -e "SYMLINK\t$(@D)/gtk.jar -> gtk-$(APIVERSION).jar"
+ 	cd $(@D) && rm -f gtk.jar && ln -s gtk-$(APIVERSION).jar gtk.jar
+ 	
+@@ -114,7 +114,7 @@
+ 
+ distclean: clean
+ 	@/bin/echo -e "RM\tbuild configuration information"
+-	-rm -f .config .config.tmp .libdir
++	-rm -f .config .config.tmp libdir.properties
+ 	@/bin/echo -e "RM\tgenerated documentation"
+ 	-rm -rf doc/api/*
+ 	-rm -f java-gnome-*.tar.bz2
+--- java-gnome-4.1.3-orig/src/bindings/org/freedesktop/bindings/Plumbing.java	2013-05-04 20:08:23.000000000 -0500
++++ java-gnome-4.1.3/src/bindings/org/freedesktop/bindings/Plumbing.java	2014-05-25 22:42:03.203480823 -0500
+@@ -128,7 +128,7 @@
+         }
+     }
+ 
+-    private static final String LIBDIR_FILE = ".libdir";
++    private static final String LIBDIR_FILE = "libdir.properties";
+ 
+     /**
+      * Load the native library. The governing assumption is that the .jar
+@@ -171,7 +171,7 @@
+ 
+         try {
+             /*
+-             * Attmept to load the .libdir file and use its contents as the
++             * Attmept to load the libdir.properties file and use its contents as the
+              * directory which we will load our shared library from.
+              */
+             in = loader.getResourceAsStream(LIBDIR_FILE);
diff --git a/java-gnome.spec b/java-gnome.spec
index b2709df..8787a05 100644
--- a/java-gnome.spec
+++ b/java-gnome.spec
@@ -1,9 +1,11 @@
 Summary:	Java GNOME bindings
 Name:		java-gnome
 Version:	4.1.3
-Release:	4%{?dist}
+Release:	5%{?dist}
 URL:		http://java-gnome.sourceforge.net
 Source0:	http://ftp.gnome.org/pub/gnome/sources/java-gnome/4.1/java-gnome-%{version}.tar.xz
+# Workaround for brp-java-repack-jars skipping top-level dot-files
+Patch0:		java-gnome-4.1.3-libdir.patch
 # This is the "Classpath" exception.
 License:	GPLv2 with exceptions
 Group:		System Environment/Libraries
@@ -16,7 +18,7 @@ BuildRequires:	pkgconfig(glib-2.0)
 BuildRequires:	pkgconfig(gtk+-3.0)
 BuildRequires:	pkgconfig(gtk+-unix-print-3.0)
 BuildRequires:	pkgconfig(gtksourceview-3.0)
-BuildRequires:	pkgconfig(gtkspell-2.0)
+#BuildRequires:	pkgconfig(gtkspell-2.0)
 BuildRequires:	pkgconfig(libnotify)
 BuildRequires:	pkgconfig(pango)
 BuildRequires:	pkgconfig(librsvg-2.0)
@@ -52,6 +54,7 @@ design documentation and sample code.
 
 %prep
 %setup -q
+%patch0 -p1
 
 # Remove all binaries
 find . -name "*.jar" -exec rm -f {} \;
@@ -60,7 +63,7 @@ find . -name "*.class" -exec rm -f {} \;
 %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}
+%configure --jardir=%{_jnidir} --libdir=%{_libdir}/%{name}
 
 # The build system does not support parallell builds, so no
 # _smp_mflags.
@@ -70,8 +73,11 @@ make V=1 build-java doc
 make install DESTDIR=%{buildroot}
 
 # Remove the versioned jar
-rm -rf %{buildroot}%{_libdir}/%{name}/gtk.jar
-mv %{buildroot}%{_libdir}/%{name}/gtk-*.jar %{buildroot}%{_libdir}/%{name}/gtk.jar
+rm -rf %{buildroot}%{_jnidir}/gtk.jar
+mv %{buildroot}%{_jnidir}/gtk-*.jar %{buildroot}%{_jnidir}/gtk.jar
+# for backwards compatibility
+mkdir -p %{buildroot}%{_libdir}/%{name}
+ln -s %{_jnidir}/gtk.jar %{buildroot}%{_libdir}/%{name}/gtk.jar
 
 # Install javadoc
 mkdir -p %{buildroot}%{_javadocdir}
@@ -87,6 +93,7 @@ rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || :
 %dir %{_libdir}/%{name}
 %{_libdir}/%{name}/*.jar
 %{_libdir}/%{name}/*.so
+%{_jnidir}/gtk.jar
 
 %files javadoc
 # Note that not all here is javadoc. Two subpackages for documentation
@@ -95,6 +102,11 @@ rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || :
 %{_javadocdir}/%{name}
 
 %changelog
+* Mon Jun 30 2014 Yaakov Selkowitz <yselkowi at redhat.com> - 4.1.3-5
+- Install jar into %%_jnidir per latest guidelines (#1101069)
+- Workaround for brp-java-repack-jars skipping top-level dot-files
+- Remove obsolete gtkspell BR
+
 * Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 4.1.3-4
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 


More information about the scm-commits mailing list