msrb pushed to jffi (f22). "Build jffi-native (..more)"

notifications at fedoraproject.org notifications at fedoraproject.org
Thu Mar 26 08:43:01 UTC 2015


>From e5b1f2d430ed800e714bb09345cab19e85300ffe Mon Sep 17 00:00:00 2001
From: Michal Srb <msrb at redhat.com>
Date: Tue, 17 Feb 2015 21:52:02 +0100
Subject: Build jffi-native

- Introduce javadoc subpackage

diff --git a/.gitignore b/.gitignore
index 6be2c8a..289fb03 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@ wmeissner-jffi-bbb81f1.tar.gz
 /jnr-jffi-1.2.6-0-g52af1f2.tar.gz
 /jffi-1.2.7-1.fc20.src.rpm
 /jffi-1.2.7.zip
+/1.2.7.zip
diff --git a/jffi.spec b/jffi.spec
index b1353e7..d00620e 100644
--- a/jffi.spec
+++ b/jffi.spec
@@ -1,32 +1,38 @@
 %global cluster jnr
 
-Name:    jffi
-Version: 1.2.7
-Release: 1%{?dist}
-Summary: An optimized Java interface to libffi 
+Name:           jffi
+Version:        1.2.7
+Release:        2%{?dist}
+Summary:        Java Foreign Function Interface
+
+License:        LGPLv3+ or ASL 2.0
+URL:            http://github.com/jnr/jffi
+Source0:        https://github.com/%{cluster}/%{name}/archive/%{version}.zip
+Patch0:         jffi-fix-dependencies-in-build-xml.patch
+Patch1:         jffi-add-built-jar-to-test-classpath.patch
+Patch2:         jffi-fix-compilation-flags.patch
+
+BuildRequires:  maven-local
+BuildRequires:  libffi-devel
+BuildRequires:  ant
+BuildRequires:  junit
 
-Group:   System Environment/Libraries
-License: LGPLv3+ or ASL 2.0
-URL:     http://github.com/%{cluster}/%{name}/
+%description
+An optimized Java interface to libffi.
 
-# https://github.com/%{cluster}/%{name}/archive/%{version}.zip
-Source0: %{name}-%{version}.zip
-Patch0:  jffi-fix-dependencies-in-build-xml.patch
-Patch1:  jffi-add-built-jar-to-test-classpath.patch
-Patch2:  jffi-fix-compilation-flags.patch
+%package native
+Summary:        %{name} JAR with native bits
 
-BuildRequires: java-devel
-BuildRequires: jpackage-utils
-BuildRequires: libffi-devel
+%description native
+This package contains %{name} JAR with native bits.
 
-BuildRequires: ant
-BuildRequires: ant-junit
-BuildRequires: junit
+%package javadoc
+Summary:        Javadoc for %{name}
+BuildArch:      noarch
 
-Requires: jpackage-utils
+%description javadoc
+This package contains the API documentation for %{name}.
 
-%description
-An optimized Java interface to libffi 
 
 %prep
 %setup
@@ -44,22 +50,22 @@ rm -rf archive/* jni/libffi/ jni/win32/ lib/CopyLibs/ lib/junit*
 find ./ -name '*.jar' -exec rm -f '{}' \; 
 find ./ -name '*.class' -exec rm -f '{}' \; 
 
-%build
 build-jar-repository -s -p lib/ junit
 
-ant -Duse.system.libffi=1
+%mvn_package 'com.github.jnr:jffi::native:' native
+%mvn_file ':{*}' %{name}/@1 @1
 
-%install
-mkdir -p $RPM_BUILD_ROOT%{_libdir}/%{name}
-mkdir -p $RPM_BUILD_ROOT%{_jnidir}/
+%build
+# ant will produce JAR with native bits
+ant jar build-native -Duse.system.libffi=1
 
-cp -p dist/%{name}-complete.jar $RPM_BUILD_ROOT%{_jnidir}/%{name}.jar
+# maven will look for JAR with native bits in archive/
+cp -p dist/jffi-*-Linux.jar archive/
 
-install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
-install -pm 644 pom.xml  \
-        $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom
+%mvn_build
 
-%add_maven_depmap JPP-%{name}.pom %{name}.jar
+%install
+%mvn_install
 
 %check
 # skip tests on s390 until https://bugzilla.redhat.com/show_bug.cgi?id=1084914 is resolved
@@ -71,10 +77,18 @@ ant -Duse.system.libffi=1 test
 
 %files -f .mfiles
 %doc COPYING.GPL COPYING.LESSER LICENSE
-%{_jnidir}/%{name}.jar
-%{_mavenpomdir}/JPP-%{name}.pom
+
+%files native -f .mfiles-native
+%doc COPYING.GPL COPYING.LESSER LICENSE
+
+%files javadoc -f .mfiles-javadoc
+%doc COPYING.GPL COPYING.LESSER LICENSE
 
 %changelog
+* Tue Feb 17 2015 Michal Srb <msrb at redhat.com> - 1.2.7-2
+- Build jffi-native
+- Introduce javadoc subpackage
+
 * Fri Dec 03 2014 Mo Morsi <mmorsi at redhat.com> - 1.2.7-1
 - Update to JFFI 1.2.7
 
diff --git a/sources b/sources
index d35e5c3..84c1758 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-0ee132068e8c90d2ecd835c62dd13ce9  jffi-1.2.7.zip
+0ee132068e8c90d2ecd835c62dd13ce9  1.2.7.zip
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/jffi.git/commit/?h=f22&id=e5b1f2d430ed800e714bb09345cab19e85300ffe


More information about the scm-commits mailing list