update to 3.4.0
This commit is contained in:
parent
680b7f1b91
commit
f63a5dd2a9
@ -1,11 +0,0 @@
|
|||||||
diff -up ./build.xml.tests-headless ./build.xml
|
|
||||||
--- ./build.xml.tests-headless 2009-11-09 10:35:40.000000000 +0100
|
|
||||||
+++ ./build.xml 2009-11-09 10:36:06.000000000 +0100
|
|
||||||
@@ -466,6 +466,7 @@
|
|
||||||
<jvmarg value="-Djna.protected=true"/>
|
|
||||||
<jvmarg value="-Djna.builddir=${build}"/>
|
|
||||||
<jvmarg value="${vmopt.arch}"/>
|
|
||||||
+ <jvmarg value="-Djava.awt.headless=true"/>
|
|
||||||
<classpath><path refid="test.runpath"/></classpath>
|
|
||||||
<formatter type="xml"/>
|
|
||||||
<batchtest todir="${results.junit}">
|
|
@ -1,37 +0,0 @@
|
|||||||
diff -up ./build.xml.junit ./build.xml
|
|
||||||
--- ./build.xml.junit 2010-05-01 12:18:55.547238394 +0200
|
|
||||||
+++ ./build.xml 2010-05-01 12:20:49.253989440 +0200
|
|
||||||
@@ -161,9 +161,6 @@
|
|
||||||
<path id="compile-test.path">
|
|
||||||
<pathelement path="${test.src}"/>
|
|
||||||
<path id="test.libs">
|
|
||||||
- <fileset dir="lib">
|
|
||||||
- <include name="junit.jar"/>
|
|
||||||
- </fileset>
|
|
||||||
<pathelement path="${classes}"/>
|
|
||||||
</path>
|
|
||||||
<path id="compile.path">
|
|
||||||
@@ -419,13 +416,12 @@
|
|
||||||
<mkdir dir="${build}/jws"/>
|
|
||||||
<copy todir="${build}/jws" file="${build}/${jar}"/>
|
|
||||||
<copy todir="${build}/jws" file="${build}/${testjar}"/>
|
|
||||||
- <copy todir="${build}/jws" file="lib/junit.jar"/>
|
|
||||||
<copy todir="${build}/jws" file="lib/clover.jar"/>
|
|
||||||
<jar jarfile="${build}/jws/jnidispatch.jar">
|
|
||||||
<fileset dir="${build.native}" includes="*jnidispatch.*"/>
|
|
||||||
</jar>
|
|
||||||
<signjar alias="jna" keystore="jna.keystore" storepass="jnadev" lazy="true">
|
|
||||||
- <fileset dir="${build}/jws" includes="jna.jar,jna-test.jar,junit.jar,jnidispatch.jar,clover.jar"/>
|
|
||||||
+ <fileset dir="${build}/jws" includes="jna.jar,jna-test.jar,jnidispatch.jar,clover.jar"/>
|
|
||||||
</signjar>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
@@ -633,7 +629,7 @@
|
|
||||||
<!-- Full sources required to build and test everything -->
|
|
||||||
<zip zipfile="${dist}/src-full.zip">
|
|
||||||
<zipfileset src="${dist}/src.zip"/>
|
|
||||||
- <zipfileset dir="lib" includes="junit.jar,clover.jar" prefix="lib"/>
|
|
||||||
+ <zipfileset dir="lib" includes="clover.jar" prefix="lib"/>
|
|
||||||
<zipfileset dir="." includes=".classpath,.project"/>
|
|
||||||
<zipfileset dir="nbproject" includes="**/*" prefix="nbproject"/>
|
|
||||||
<zipfileset dir="${native}" includes="libffi,libffi/**/*" prefix="native"/>
|
|
61
jna-3.4.0-junit.patch
Normal file
61
jna-3.4.0-junit.patch
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
diff -up ./build.xml.junit ./build.xml
|
||||||
|
--- ./build.xml.junit 2012-03-07 12:01:58.716741284 +0100
|
||||||
|
+++ ./build.xml 2012-03-07 12:03:39.669022092 +0100
|
||||||
|
@@ -188,9 +188,6 @@
|
||||||
|
<target name="-setup" depends="-dynamic-properties">
|
||||||
|
<path id="compile-test.path">
|
||||||
|
<path id="test.libs">
|
||||||
|
- <fileset dir="lib">
|
||||||
|
- <include name="junit.jar"/>
|
||||||
|
- </fileset>
|
||||||
|
<pathelement path="${classes}"/>
|
||||||
|
</path>
|
||||||
|
</path>
|
||||||
|
@@ -253,7 +250,6 @@
|
||||||
|
<subant target="jar">
|
||||||
|
<property name="file.reference.jna.build" location="${build}"/>
|
||||||
|
<property name="file.reference.jna.jar" location="${build}/${jar}"/>
|
||||||
|
- <property name="libs.junit.classpath" location="lib/junit.jar"/>
|
||||||
|
<fileset dir="${contrib}" includes="platform/build.xml" />
|
||||||
|
</subant>
|
||||||
|
</target>
|
||||||
|
@@ -262,7 +258,6 @@
|
||||||
|
<subant target="jar">
|
||||||
|
<property name="file.reference.jna.build" location="${build}"/>
|
||||||
|
<property name="file.reference.jna.jar" location="${build}/${jar}"/>
|
||||||
|
- <property name="libs.junit.classpath" location="lib/junit.jar"/>
|
||||||
|
<fileset dir="${contrib}" includes="*/build.xml" excludes="platform/build.xml"/>
|
||||||
|
</subant>
|
||||||
|
</target>
|
||||||
|
@@ -491,13 +486,12 @@
|
||||||
|
<mkdir dir="${build}/jws"/>
|
||||||
|
<copy todir="${build}/jws" file="${build}/${jar}"/>
|
||||||
|
<copy todir="${build}/jws" file="${build}/${testjar}"/>
|
||||||
|
- <copy todir="${build}/jws" file="lib/junit.jar"/>
|
||||||
|
<copy todir="${build}/jws" file="lib/clover.jar"/>
|
||||||
|
<jar jarfile="${build}/jws/jnidispatch.jar">
|
||||||
|
<fileset dir="${build.native}" includes="*jnidispatch.*"/>
|
||||||
|
</jar>
|
||||||
|
<signjar alias="jna" keystore="jna.keystore" storepass="jnadev" lazy="true">
|
||||||
|
- <fileset dir="${build}/jws" includes="jna.jar,jna-test.jar,junit.jar,jnidispatch.jar,clover.jar"/>
|
||||||
|
+ <fileset dir="${build}/jws" includes="jna.jar,jna-test.jar,jnidispatch.jar,clover.jar"/>
|
||||||
|
</signjar>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
@@ -587,7 +581,6 @@
|
||||||
|
<subant target="test">
|
||||||
|
<property name="file.reference.jna.build" location="${build}"/>
|
||||||
|
<property name="file.reference.jna.jar" location="${build}/${jar}"/>
|
||||||
|
- <property name="libs.junit.classpath" location="lib/junit.jar"/>
|
||||||
|
<fileset dir="${contrib}" includes="platform/build.xml"/>
|
||||||
|
</subant>
|
||||||
|
</target>
|
||||||
|
@@ -813,7 +806,7 @@ osname=macos,
|
||||||
|
<!-- Full sources required to build and test everything -->
|
||||||
|
<zip zipfile="${dist}/src-full.zip">
|
||||||
|
<zipfileset src="${dist}/src.zip"/>
|
||||||
|
- <zipfileset dir="lib" includes="junit.jar,clover.jar" prefix="lib"/>
|
||||||
|
+ <zipfileset dir="lib" includes="clover.jar" prefix="lib"/>
|
||||||
|
<zipfileset dir="." includes=".classpath,.project"/>
|
||||||
|
<zipfileset dir="${native}" includes="libffi,libffi/**/*" prefix="native"/>
|
||||||
|
</zip>
|
@ -1,36 +1,37 @@
|
|||||||
diff -up ./src/com/sun/jna/Native.java.loadlib ./src/com/sun/jna/Native.java
|
diff -up ./src/com/sun/jna/Native.java.loadlib ./src/com/sun/jna/Native.java
|
||||||
--- ./src/com/sun/jna/Native.java.loadlib 2010-05-01 10:54:09.949779524 +0200
|
--- ./src/com/sun/jna/Native.java.loadlib 2012-03-07 11:41:53.378594071 +0100
|
||||||
+++ ./src/com/sun/jna/Native.java 2010-05-01 10:55:08.405824567 +0200
|
+++ ./src/com/sun/jna/Native.java 2012-03-07 11:52:18.537721064 +0100
|
||||||
@@ -631,131 +631,19 @@ public final class Native {
|
@@ -634,148 +634,18 @@ public final class Native {
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
- * Loads the JNA stub library. It will first attempt to load this library
|
* Loads the JNA stub library.
|
||||||
- * from the directories specified in jna.boot.library.path. If that fails,
|
- * First tries jna.boot.library.path, then the system path, then from the
|
||||||
- * it will fallback to loading from the system library paths. Finally it will
|
- * jar file.
|
||||||
- * attempt to extract the stub library from from the JNA jar file, and load it.
|
+ * MODIFIED FROM UPSTREAM - we rip out all sorts of gunk here that is
|
||||||
- * <p>
|
+ * unnecessary when JNA is properly installed with the OS.
|
||||||
- * The jna.boot.library.path property is mainly to support jna.jar being
|
|
||||||
- * included in -Xbootclasspath, where java.library.path and LD_LIBRARY_PATH
|
|
||||||
- * are ignored. It might also be useful in other situations.
|
|
||||||
- * </p>
|
|
||||||
+ * Loads the JNA stub library.
|
|
||||||
+ *
|
|
||||||
+ ** MODIFIED FROM UPSTREAM - we rip out all sorts of gunk here that is
|
|
||||||
+ ** unnecessary when JNA is properly installed with the OS.
|
|
||||||
*/
|
*/
|
||||||
private static void loadNativeLibrary() {
|
private static void loadNativeLibrary() {
|
||||||
- String libName = "jnidispatch";
|
removeTemporaryFiles();
|
||||||
|
|
||||||
|
- String libName = System.getProperty("jna.boot.library.name", "jnidispatch");
|
||||||
- String bootPath = System.getProperty("jna.boot.library.path");
|
- String bootPath = System.getProperty("jna.boot.library.path");
|
||||||
- if (bootPath != null) {
|
- if (bootPath != null) {
|
||||||
- String[] dirs = bootPath.split(File.pathSeparator);
|
- // String.split not available in 1.4
|
||||||
- for (int i = 0; i < dirs.length; ++i) {
|
- StringTokenizer dirs = new StringTokenizer(bootPath, File.pathSeparator);
|
||||||
- String path = new File(new File(dirs[i]), System.mapLibraryName(libName)).getAbsolutePath();
|
- while (dirs.hasMoreTokens()) {
|
||||||
- try {
|
- String dir = dirs.nextToken();
|
||||||
- System.load(path);
|
- File file = new File(new File(dir), System.mapLibraryName(libName));
|
||||||
- nativeLibraryPath = path;
|
- String path = file.getAbsolutePath();
|
||||||
- return;
|
- if (file.exists()) {
|
||||||
- } catch (UnsatisfiedLinkError ex) {
|
- try {
|
||||||
|
- System.load(path);
|
||||||
|
- nativeLibraryPath = path;
|
||||||
|
- return;
|
||||||
|
- } catch (UnsatisfiedLinkError ex) {
|
||||||
|
- // Not a problem if already loaded in anoteher class loader
|
||||||
|
- // Unfortunately we can't distinguish the difference...
|
||||||
|
- //System.out.println("File found at " + file + " but not loadable: " + ex.getMessage());
|
||||||
|
- }
|
||||||
- }
|
- }
|
||||||
- if (Platform.isMac()) {
|
- if (Platform.isMac()) {
|
||||||
- String orig, ext;
|
- String orig, ext;
|
||||||
@ -41,25 +42,37 @@ diff -up ./src/com/sun/jna/Native.java.loadlib ./src/com/sun/jna/Native.java
|
|||||||
- orig = "jnilib";
|
- orig = "jnilib";
|
||||||
- ext = "dylib";
|
- ext = "dylib";
|
||||||
- }
|
- }
|
||||||
- try {
|
- path = path.substring(0, path.lastIndexOf(orig)) + ext;
|
||||||
- path = path.substring(0, path.lastIndexOf(orig)) + ext;
|
- if (new File(path).exists()) {
|
||||||
- System.load(path);
|
- try {
|
||||||
- nativeLibraryPath = path;
|
- System.load(path);
|
||||||
- return;
|
- nativeLibraryPath = path;
|
||||||
- } catch (UnsatisfiedLinkError ex) {
|
- return;
|
||||||
|
- } catch (UnsatisfiedLinkError ex) {
|
||||||
|
- System.err.println("File found at " + path + " but not loadable: " + ex.getMessage());
|
||||||
|
- }
|
||||||
- }
|
- }
|
||||||
- }
|
- }
|
||||||
- }
|
- }
|
||||||
- }
|
- }
|
||||||
try {
|
try {
|
||||||
- System.loadLibrary(libName);
|
- if (!Boolean.getBoolean("jna.nosys")) {
|
||||||
- nativeLibraryPath = libName;
|
- System.loadLibrary(libName);
|
||||||
|
- return;
|
||||||
|
- }
|
||||||
+ System.load("@JNIPATH@/" + System.mapLibraryName("jnidispatch"));
|
+ System.load("@JNIPATH@/" + System.mapLibraryName("jnidispatch"));
|
||||||
+ nativeLibraryPath = "@JNIPATH@/" + System.mapLibraryName("jnidispatch");
|
+ nativeLibraryPath = "@JNIPATH@/" + System.mapLibraryName("jnidispatch");
|
||||||
}
|
}
|
||||||
catch(UnsatisfiedLinkError e) {
|
catch(UnsatisfiedLinkError e) {
|
||||||
- loadNativeLibraryFromJar();
|
- if (Boolean.getBoolean("jna.nounpack")) {
|
||||||
|
- throw e;
|
||||||
|
- }
|
||||||
- }
|
- }
|
||||||
|
- if (!Boolean.getBoolean("jna.nounpack")) {
|
||||||
|
- loadNativeLibraryFromJar();
|
||||||
|
- return;
|
||||||
|
- }
|
||||||
|
- throw new UnsatisfiedLinkError("Native jnidispatch library not found");
|
||||||
- }
|
- }
|
||||||
-
|
-
|
||||||
- /**
|
- /**
|
||||||
@ -72,6 +85,7 @@ diff -up ./src/com/sun/jna/Native.java.loadlib ./src/com/sun/jna/Native.java
|
|||||||
- String name = System.getProperty("os.name");
|
- String name = System.getProperty("os.name");
|
||||||
- String resourceName = getNativeLibraryResourcePath(Platform.getOSType(), arch, name) + "/" + libname;
|
- String resourceName = getNativeLibraryResourcePath(Platform.getOSType(), arch, name) + "/" + libname;
|
||||||
- URL url = Native.class.getResource(resourceName);
|
- URL url = Native.class.getResource(resourceName);
|
||||||
|
- boolean unpacked = false;
|
||||||
-
|
-
|
||||||
- // Add an ugly hack for OpenJDK (soylatte) - JNI libs use the usual
|
- // Add an ugly hack for OpenJDK (soylatte) - JNI libs use the usual
|
||||||
- // .dylib extension
|
- // .dylib extension
|
||||||
@ -108,20 +122,16 @@ diff -up ./src/com/sun/jna/Native.java.loadlib ./src/com/sun/jna/Native.java
|
|||||||
- // Suffix is required on windows, or library fails to load
|
- // Suffix is required on windows, or library fails to load
|
||||||
- // Let Java pick the suffix, except on windows, to avoid
|
- // Let Java pick the suffix, except on windows, to avoid
|
||||||
- // problems with Web Start.
|
- // problems with Web Start.
|
||||||
- lib = File.createTempFile("jna", Platform.isWindows()?".dll":null);
|
- File dir = getTempDir();
|
||||||
|
- lib = File.createTempFile("jna", Platform.isWindows()?".dll":null, dir);
|
||||||
- lib.deleteOnExit();
|
- lib.deleteOnExit();
|
||||||
- ClassLoader cl = Native.class.getClassLoader();
|
|
||||||
- if (Platform.deleteNativeLibraryAfterVMExit()
|
|
||||||
- && (cl == null
|
|
||||||
- || cl.equals(ClassLoader.getSystemClassLoader()))) {
|
|
||||||
- Runtime.getRuntime().addShutdownHook(new DeleteNativeLibrary(lib));
|
|
||||||
- }
|
|
||||||
- fos = new FileOutputStream(lib);
|
- fos = new FileOutputStream(lib);
|
||||||
- int count;
|
- int count;
|
||||||
- byte[] buf = new byte[1024];
|
- byte[] buf = new byte[1024];
|
||||||
- while ((count = is.read(buf, 0, buf.length)) > 0) {
|
- while ((count = is.read(buf, 0, buf.length)) > 0) {
|
||||||
- fos.write(buf, 0, count);
|
- fos.write(buf, 0, count);
|
||||||
- }
|
- }
|
||||||
|
- unpacked = true;
|
||||||
- }
|
- }
|
||||||
- catch(IOException e) {
|
- catch(IOException e) {
|
||||||
- throw new Error("Failed to create temporary file for jnidispatch library: " + e);
|
- throw new Error("Failed to create temporary file for jnidispatch library: " + e);
|
||||||
@ -132,11 +142,16 @@ diff -up ./src/com/sun/jna/Native.java.loadlib ./src/com/sun/jna/Native.java
|
|||||||
- try { fos.close(); } catch(IOException e) { }
|
- try { fos.close(); } catch(IOException e) { }
|
||||||
- }
|
- }
|
||||||
- }
|
- }
|
||||||
- unpacked = true;
|
- }
|
||||||
+ throw new RuntimeException(e);
|
|
||||||
}
|
|
||||||
- System.load(lib.getAbsolutePath());
|
- System.load(lib.getAbsolutePath());
|
||||||
- nativeLibraryPath = lib.getAbsolutePath();
|
- nativeLibraryPath = lib.getAbsolutePath();
|
||||||
|
- // Attempt to delete immediately once jnidispatch is successfully
|
||||||
|
- // loaded. This avoids the complexity of trying to do so on "exit",
|
||||||
|
- // which point can vary under different circumstances (native
|
||||||
|
- // compilation, dynamically loaded modules, normal application, etc).
|
||||||
|
- if (unpacked) {
|
||||||
|
- deleteNativeLibrary(lib.getAbsolutePath());
|
||||||
|
+ throw new RuntimeException(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
11
jna-3.4.0-tests-headless.patch
Normal file
11
jna-3.4.0-tests-headless.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
diff -up ./build.xml.tests-headless ./build.xml
|
||||||
|
--- ./build.xml.tests-headless 2012-03-07 11:56:41.702657823 +0100
|
||||||
|
+++ ./build.xml 2012-03-07 11:57:12.635887659 +0100
|
||||||
|
@@ -561,6 +561,7 @@
|
||||||
|
<sysproperty key="jna.protected" value="true"/>
|
||||||
|
<sysproperty key="jna.builddir" file="${build}"/>
|
||||||
|
<jvmarg value="${vmopt.arch}"/>
|
||||||
|
+ <jvmarg value="-Djava.awt.headless=true"/>
|
||||||
|
<classpath><path refid="test.runpath"/></classpath>
|
||||||
|
<formatter type="brief" usefile="false"/>
|
||||||
|
<formatter type="xml"/>
|
45
jna.spec
45
jna.spec
@ -1,6 +1,6 @@
|
|||||||
Name: jna
|
Name: jna
|
||||||
Version: 3.2.7
|
Version: 3.4.0
|
||||||
Release: 13%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Pure Java access to native libraries
|
Summary: Pure Java access to native libraries
|
||||||
|
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
@ -8,32 +8,34 @@ License: LGPLv2+
|
|||||||
URL: https://jna.dev.java.net/
|
URL: https://jna.dev.java.net/
|
||||||
# The source for this package was pulled from upstream's vcs. Use the
|
# The source for this package was pulled from upstream's vcs. Use the
|
||||||
# following commands to generate the tarball:
|
# following commands to generate the tarball:
|
||||||
# svn export https://jna.dev.java.net/svn/jna/tags/%{version}/jnalib/ --username guest jna-%{version}
|
# https://github.com/twall/jna/tarball/%{version}
|
||||||
# rm -rf jna-%{version}/dist/*
|
# tar xzf twall-jna-%{version}*.tar.gz
|
||||||
|
# mv twall-jna-* jna-%{version}
|
||||||
|
# rm -rf jna-%{version}/{dist,www}
|
||||||
# tar cjf ~/rpm/SOURCES/jna-%{version}.tar.bz2 jna-%{version}
|
# tar cjf ~/rpm/SOURCES/jna-%{version}.tar.bz2 jna-%{version}
|
||||||
Source0: %{name}-%{version}.tar.bz2
|
Source0: %{name}-%{version}.tar.bz2
|
||||||
Source1: %{name}-pom.xml
|
Source1: pom-%{name}.xml
|
||||||
|
Source2: pom-platform.xml
|
||||||
# This patch is Fedora-specific for now until we get the huge
|
# This patch is Fedora-specific for now until we get the huge
|
||||||
# JNI library location mess sorted upstream
|
# JNI library location mess sorted upstream
|
||||||
Patch1: jna-3.2.5-loadlibrary.patch
|
Patch1: jna-3.4.0-loadlibrary.patch
|
||||||
# The X11 tests currently segfault; overall I think the X11 JNA stuff is just a
|
# The X11 tests currently segfault; overall I think the X11 JNA stuff is just a
|
||||||
# Really Bad Idea, for relying on AWT internals, using the X11 API at all,
|
# Really Bad Idea, for relying on AWT internals, using the X11 API at all,
|
||||||
# and using a complex API like X11 through JNA just increases the potential
|
# and using a complex API like X11 through JNA just increases the potential
|
||||||
# for problems.
|
# for problems.
|
||||||
Patch2: jna-3.2.4-tests-headless.patch
|
Patch2: jna-3.4.0-tests-headless.patch
|
||||||
Patch3: jna-3.2.7-javadoc.patch
|
|
||||||
# Build using GCJ javadoc
|
# Build using GCJ javadoc
|
||||||
Patch4: jna-3.2.7-gcj-javadoc.patch
|
Patch4: jna-3.2.7-gcj-javadoc.patch
|
||||||
# junit cames from rpm
|
# junit cames from rpm
|
||||||
Patch5: jna-3.2.5-junit.patch
|
Patch5: jna-3.4.0-junit.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
# We manually require libffi because find-requires doesn't work
|
# We manually require libffi because find-requires doesn't work
|
||||||
# inside jars.
|
# inside jars.
|
||||||
Requires: java >= 1:1.6.0, jpackage-utils, libffi
|
Requires: java, jpackage-utils, libffi
|
||||||
Requires(post): jpackage-utils
|
Requires(post): jpackage-utils
|
||||||
Requires(postun): jpackage-utils
|
Requires(postun): jpackage-utils
|
||||||
BuildRequires: java-devel >= 1:1.6.0, jpackage-utils, libffi-devel
|
BuildRequires: java-devel, jpackage-utils, libffi-devel
|
||||||
BuildRequires: ant, ant-junit, ant-nodeps, ant-trax, junit
|
BuildRequires: ant, ant-junit, ant-nodeps, ant-trax, junit
|
||||||
BuildRequires: libX11-devel, libXt-devel
|
BuildRequires: libX11-devel, libXt-devel
|
||||||
# for ExclusiveArch see bug: 468831 640005 548099
|
# for ExclusiveArch see bug: 468831 640005 548099
|
||||||
@ -81,12 +83,10 @@ This package contains the contributed examples for %{name}.
|
|||||||
%setup -q -n %{name}-%{version}
|
%setup -q -n %{name}-%{version}
|
||||||
sed -e 's|@JNIPATH@|%{_libdir}/%{name}|' %{PATCH1} | patch -p1
|
sed -e 's|@JNIPATH@|%{_libdir}/%{name}|' %{PATCH1} | patch -p1
|
||||||
%patch2 -p1 -b .tests-headless
|
%patch2 -p1 -b .tests-headless
|
||||||
%patch3 -p1 -b .javadoc
|
|
||||||
# temporary hach for patch3 on epel5
|
|
||||||
chmod -Rf a+rX,u+w,g-w,o-w .
|
chmod -Rf a+rX,u+w,g-w,o-w .
|
||||||
%patch4 -p0 -b .gcj-javadoc
|
%patch4 -p0 -b .gcj-javadoc
|
||||||
%patch5 -p1 -b .junit
|
%patch5 -p1 -b .junit
|
||||||
cp %{SOURCE1} ./
|
cp %{SOURCE1} %{SOURCE2} ./
|
||||||
|
|
||||||
# UnloadTest fail during build since we modify class loading
|
# UnloadTest fail during build since we modify class loading
|
||||||
rm test/com/sun/jna/JNAUnloadTest.java
|
rm test/com/sun/jna/JNAUnloadTest.java
|
||||||
@ -102,9 +102,9 @@ find . -name '*.class' -delete
|
|||||||
rm -rf native/libffi
|
rm -rf native/libffi
|
||||||
|
|
||||||
# clean LICENSE.txt
|
# clean LICENSE.txt
|
||||||
sed -i 's/\r//' LICENSE.txt
|
sed -i 's/\r//' LICENSE
|
||||||
|
|
||||||
chmod -c 0644 LICENSE.txt OTHERS release-notes.html
|
chmod -c 0644 LICENSE OTHERS CHANGES.md
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -113,7 +113,7 @@ chmod -c 0644 LICENSE.txt OTHERS release-notes.html
|
|||||||
ant -Dcflags_extra.native="%{optflags}" -Ddynlink.native=true -Dnomixedjar.native=true jar contrib-jars javadoc
|
ant -Dcflags_extra.native="%{optflags}" -Ddynlink.native=true -Dnomixedjar.native=true jar contrib-jars javadoc
|
||||||
# remove compiled contribs
|
# remove compiled contribs
|
||||||
find contrib -name build -exec rm -rf {} \; || :
|
find contrib -name build -exec rm -rf {} \; || :
|
||||||
sed -i "s/VERSION/%{version}/" %{name}-pom.xml
|
sed -i "s/VERSION/%{version}/" pom-%{name}.xml pom-platform.xml
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
@ -130,10 +130,12 @@ install -m 755 build*/native/libjnidispatch*.so %{buildroot}%{_libdir}/%{name}/
|
|||||||
|
|
||||||
%if 0%{?fedora} >= 9 || 0%{?rhel} > 5
|
%if 0%{?fedora} >= 9 || 0%{?rhel} > 5
|
||||||
# install maven pom file
|
# install maven pom file
|
||||||
install -Dm 644 %{name}-pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
|
install -Dm 644 pom-%{name}.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
|
||||||
|
install -Dm 644 pom-platform.xml %{buildroot}%{_mavenpomdir}/JPP-platform.pom
|
||||||
|
|
||||||
# ... and maven depmap
|
# ... and maven depmap
|
||||||
%add_to_maven_depmap net.java.dev.jna %{name} %{version} JPP %{name}
|
%add_to_maven_depmap net.java.dev.jna %{name} %{version} JPP %{name}
|
||||||
|
%add_to_maven_depmap net.java.dev.jna %{name} %{version} JPP platform
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# javadocs
|
# javadocs
|
||||||
@ -166,7 +168,7 @@ rm -rf %{buildroot}
|
|||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc LICENSE.txt OTHERS release-notes.html TODO
|
%doc LICENSE OTHERS README.md CHANGES.md TODO
|
||||||
%{_libdir}/%{name}
|
%{_libdir}/%{name}
|
||||||
%{_javadir}/%{name}.jar
|
%{_javadir}/%{name}.jar
|
||||||
%if 0%{?fedora} >= 9 || 0%{?rhel} > 5
|
%if 0%{?fedora} >= 9 || 0%{?rhel} > 5
|
||||||
@ -177,7 +179,7 @@ rm -rf %{buildroot}
|
|||||||
|
|
||||||
%files javadoc
|
%files javadoc
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc LICENSE.txt
|
%doc LICENSE
|
||||||
%{_javadocdir}/%{name}
|
%{_javadocdir}/%{name}
|
||||||
|
|
||||||
|
|
||||||
@ -187,6 +189,9 @@ rm -rf %{buildroot}
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Mar 7 2012 Levente Farkas <lfarkas@lfarkas.org> - 3.4.0-1
|
||||||
|
- Update to 3.4.0
|
||||||
|
|
||||||
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.7-13
|
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.7-13
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
||||||
|
|
||||||
|
@ -8,14 +8,33 @@
|
|||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<version>VERSION</version>
|
<version>VERSION</version>
|
||||||
<name>Java Native Access</name>
|
<name>Java Native Access</name>
|
||||||
|
<description>Java Native Access</description>
|
||||||
|
<url>https://github.com/twall/jna</url>
|
||||||
|
|
||||||
|
<licenses>
|
||||||
|
<license>
|
||||||
|
<name>LGPL, version 2.1</name>
|
||||||
|
<url>http://creativecommons.org/licenses/LGPL/2.1/</url>
|
||||||
|
<distribution>repo</distribution>
|
||||||
|
</license>
|
||||||
|
</licenses>
|
||||||
|
|
||||||
|
<scm>
|
||||||
|
<connection>scm:git:https://github.com/twall/jna</connection>
|
||||||
|
<developerConnection>scm:git:ssh://git@github.com/twall/jna.git</developerConnection>
|
||||||
|
<url>https://github.com/twall/jna</url>
|
||||||
|
</scm>
|
||||||
|
|
||||||
|
<developers>
|
||||||
|
<developer>
|
||||||
|
<id>twall</id>
|
||||||
|
<name>Timotyh Wall</name>
|
||||||
|
<roles>
|
||||||
|
<role>Owner</role>
|
||||||
|
</roles>
|
||||||
|
</developer>
|
||||||
|
</developers>
|
||||||
|
|
||||||
<distributionManagement>
|
|
||||||
<repository>
|
|
||||||
<uniqueVersion>false</uniqueVersion>
|
|
||||||
<id>java.net-maven2-repository</id>
|
|
||||||
<url>java-net:/maven2-repository/trunk/repository/</url>
|
|
||||||
</repository>
|
|
||||||
</distributionManagement>
|
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
@ -33,6 +52,7 @@
|
|||||||
<tasks>
|
<tasks>
|
||||||
<!--<ant dir="." target="dist" />-->
|
<!--<ant dir="." target="dist" />-->
|
||||||
<attachArtifact file="dist/jna.jar" />
|
<attachArtifact file="dist/jna.jar" />
|
||||||
|
<attachArtifact file="dist/platform.jar" classifier="platform" type="jar" />
|
||||||
<attachArtifact file="dist/src-mvn.zip" classifier="sources" type="jar"/>
|
<attachArtifact file="dist/src-mvn.zip" classifier="sources" type="jar"/>
|
||||||
</tasks>
|
</tasks>
|
||||||
</configuration>
|
</configuration>
|
||||||
@ -44,9 +64,8 @@
|
|||||||
<extension>
|
<extension>
|
||||||
<groupId>org.jvnet.wagon-svn</groupId>
|
<groupId>org.jvnet.wagon-svn</groupId>
|
||||||
<artifactId>wagon-svn</artifactId>
|
<artifactId>wagon-svn</artifactId>
|
||||||
<version>1.8</version>
|
<version>1.12</version>
|
||||||
</extension>
|
</extension>
|
||||||
</extensions>
|
</extensions>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
</project>
|
</project>
|
79
pom-platform.xml
Normal file
79
pom-platform.xml
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
|
||||||
|
http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>net.java.dev.jna</groupId>
|
||||||
|
<artifactId>platform</artifactId>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
<version>VERSION</version>
|
||||||
|
<name>Java Native Access Platform</name>
|
||||||
|
<description>Java Native Access Platform</description>
|
||||||
|
<url>https://github.com/twall/jna</url>
|
||||||
|
|
||||||
|
<licenses>
|
||||||
|
<license>
|
||||||
|
<name>LGPL, version 2.1</name>
|
||||||
|
<url>http://creativecommons.org/licenses/LGPL/2.1/</url>
|
||||||
|
<distribution>repo</distribution>
|
||||||
|
</license>
|
||||||
|
</licenses>
|
||||||
|
|
||||||
|
|
||||||
|
<distributionManagement>
|
||||||
|
<repository>
|
||||||
|
<uniqueVersion>false</uniqueVersion>
|
||||||
|
<id>java.net-m2-repository</id>
|
||||||
|
<url>java-net:/maven2-repository~svn/trunk/repository/</url>
|
||||||
|
</repository>
|
||||||
|
</distributionManagement>
|
||||||
|
|
||||||
|
<scm>
|
||||||
|
<connection>scm:git:https://github.com/twall/jna</connection>
|
||||||
|
<developerConnection>scm:git:ssh://git@github.com/twall/jna.git</developerConnection>
|
||||||
|
<url>https://github.com/twall/jna</url>
|
||||||
|
</scm>
|
||||||
|
|
||||||
|
<developers>
|
||||||
|
<developer>
|
||||||
|
<id>twall</id>
|
||||||
|
<name>Timotyh Wall</name>
|
||||||
|
<roles>
|
||||||
|
<role>Owner</role>
|
||||||
|
</roles>
|
||||||
|
</developer>
|
||||||
|
</developers>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<!-- fake out maven and install the binary artifact -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.jvnet.maven-antrun-extended-plugin</groupId>
|
||||||
|
<artifactId>maven-antrun-extended-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>run</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<tasks>
|
||||||
|
<!--<ant dir="." target="dist" />-->
|
||||||
|
<attachArtifact file="dist/jna.jar"/>
|
||||||
|
<attachArtifact file="dist/platform.jar" classifier="platform" type="jar"/>
|
||||||
|
<attachArtifact file="dist/src-mvn.zip" classifier="sources" type="jar"/>
|
||||||
|
</tasks>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
<extensions>
|
||||||
|
<extension>
|
||||||
|
<groupId>org.jvnet.wagon-svn</groupId>
|
||||||
|
<artifactId>wagon-svn</artifactId>
|
||||||
|
<version>1.12</version>
|
||||||
|
</extension>
|
||||||
|
</extensions>
|
||||||
|
</build>
|
||||||
|
</project>
|
Loading…
Reference in New Issue
Block a user