Sophie

Sophie

distrib > Mageia > 5 > x86_64 > media > core-release-src > by-pkgid > c5b9be102d5babca29d3446e0f7bef63 > files > 6

jffi-1.2.7-7.mga5.src.rpm

%define debug_package %{nil}

Name:           jffi
Version:        1.2.7
Release:        %mkrel 7
Summary:        An optimized Java interface to libffi

Group:          Development/Java
License:        LGPLv3+ or ASL 2.0
URL:            http://github.com/jnr/%{name}/
Source0:        https://github.com/jnr/%{name}/archive/%{version}.tar.gz
Patch0:         jffi-fix-dependencies-in-build-xml.patch
Patch1:         jffi-add-built-jar-to-test-classpath.patch
Patch2:         jffi-fix-compilation-flags.patch
Patch3:         jffi-fix-Makefile.patch

BuildRequires:  maven-local
BuildRequires:  pkgconfig(libffi)
BuildRequires:  ant
BuildRequires:  ant-junit
BuildRequires:  junit

%description
An optimized Java interface to libffi.

%package        native
Summary:        %{name} JAR with native bits
Group:          Development/Java

%description    native
This package contains %{name} JAR with native bits.

%package        javadoc
Summary:        Javadoc for %{name}
Group:          Documentation
BuildArch:      noarch

%description    javadoc
This package contains the API documentation for %{name}.

%prep
%setup -q
%patch0
%patch1
%patch2
%patch3 -p1

# remove random executable bit
chmod 0644 jni/jffi/jffi.h

# remove uneccessary directories
rm -rf archive/* jni/libffi/ jni/win32/ lib/CopyLibs/ lib/junit*

find . -name '*.jar' -delete
find . -name '*.class' -delete

build-jar-repository -s -p lib/ junit

%mvn_package 'com.github.jnr:jffi::native:' native
%mvn_file ':{*}' %{name}/@1 @1

%build
# ant will produce JAR with native bits
%ant jar build-native -Duse.system.libffi=1

# maven will look for JAR with native bits in archive/
cp -p dist/jffi-*-Linux.jar archive/

%mvn_build

%install
%mvn_install

%check
# don't fail on unused parameters... (TODO: send patch upstream)
sed -i 's|-Werror||' libtest/GNUmakefile
%ant -Duse.system.libffi=1 test

%files -f .mfiles
%doc COPYING.GPL COPYING.LESSER LICENSE
%dir %{_jnidir}/%{name}
%dir %{_mavenpomdir}/%{name}

%files native -f .mfiles-native
%doc COPYING.GPL COPYING.LESSER LICENSE
%dir %{_jnidir}/%{name}

%files javadoc -f .mfiles-javadoc
%doc COPYING.GPL COPYING.LESSER LICENSE


%changelog
* Fri Feb 20 2015 daviddavid <daviddavid> 1.2.7-7.mga5
+ Revision: 816118
- Sync with fc22:
  * Build jffi-native
  * Introduce javadoc subpackage
- fix dir ownership
- fix Group
- disable debug_package (as it is empty)

* Tue Jan 20 2015 daviddavid <daviddavid> 1.2.7-6.mga5
+ Revision: 811595
- Sync with fc21
- switch to pkgconfig()

* Wed Oct 15 2014 umeabot <umeabot> 1.2.7-5.mga5
+ Revision: 741121
- Second Mageia 5 Mass Rebuild

* Tue Sep 16 2014 umeabot <umeabot> 1.2.7-4.mga5
+ Revision: 680791
- Mageia 5 Mass Rebuild

* Tue Aug 19 2014 pterjan <pterjan> 1.2.7-3.mga5
+ Revision: 665330
- Revert to building with ant, the maven build has too many problems

* Tue Aug 19 2014 pterjan <pterjan> 1.2.7-2.mga5
+ Revision: 665315
- Build with maven (well xmvn) instead of ant

* Fri Aug 15 2014 pterjan <pterjan> 1.2.7-1.mga5
+ Revision: 662559
- Update to final 1.2.7, wanted by jruby

* Mon Oct 21 2013 umeabot <umeabot> 1.2.6-2.mga4
+ Revision: 537270
- Mageia 4 Mass Rebuild

* Thu Sep 26 2013 dmorgan <dmorgan> 1.2.6-1.mga4
+ Revision: 486667
- New version

  + joequant <joequant>
    - remove java-nodeps from buildrequires

* Mon Aug 06 2012 luigiwalser <luigiwalser> 1.0.10-0.0.5874d2a.3.mga3
+ Revision: 279053
- remove invalid compiler option
- rebuild for libffi

* Sat Feb 25 2012 dmorgan <dmorgan> 1.0.10-0.0.5874d2a.2.mga2
+ Revision: 214246
- Rebuild for new pom
- Fix groups
- New version 1.0.10 snapshot
- Clean spec file

  + gil <gil>
    - update to 1.0.10
     add maven pom
    - cleanup
    - update to 1.0.9
    - update to 1.0.9
    - imported package jffi