Blame SPECS/jffi.spec

7c4f10
%{?scl:%scl_package jffi}
7c4f10
%{!?scl:%global pkg_name %{name}}
7c4f10
%{?java_common_find_provides_and_requires}
7c4f10
7c4f10
%global cluster jnr
7c4f10
%global sover 1.2
7c4f10
7c4f10
Name:           %{?scl_prefix}jffi
7c4f10
Version:        1.2.9
7c4f10
Release:        8.1%{?dist}
7c4f10
Summary:        Java Foreign Function Interface
7c4f10
7c4f10
License:        LGPLv3+ or ASL 2.0
7c4f10
URL:            http://github.com/jnr/jffi
7c4f10
Source0:        https://github.com/%{cluster}/%{pkg_name}/archive/%{version}.zip
7c4f10
Source1:        MANIFEST.MF
7c4f10
Source2:        NATIVE-MANIFEST.MF
7c4f10
Source3:        p2.inf
7c4f10
Patch0:         jffi-fix-dependencies-in-build-xml.patch
7c4f10
Patch1:         jffi-add-built-jar-to-test-classpath.patch
7c4f10
Patch2:         jffi-fix-compilation-flags.patch
7c4f10
7c4f10
BuildRequires:  %{?scl_prefix_java_common}maven-local
7c4f10
BuildRequires:  libffi-devel
7c4f10
BuildRequires:  %{?scl_prefix_java_common}ant
7c4f10
BuildRequires:  %{?scl_prefix_java_common}ant-junit
7c4f10
7c4f10
%description
7c4f10
An optimized Java interface to libffi.
7c4f10
7c4f10
%package native
7c4f10
Summary:        %{pkg_name} JAR with native bits
7c4f10
7c4f10
%description native
7c4f10
This package contains %{pkg_name} JAR with native bits.
7c4f10
7c4f10
%package javadoc
7c4f10
Summary:        Javadoc for %{pkg_name}
7c4f10
BuildArch:      noarch
7c4f10
7c4f10
%description javadoc
7c4f10
This package contains the API documentation for %{pkg_name}.
7c4f10
7c4f10
%prep
7c4f10
%{?scl:scl enable %{scl_maven} %{scl} - << "EOF"}
7c4f10
%setup -n %{pkg_name}-%{version} -q
7c4f10
cp %{SOURCE1} .
7c4f10
cp %{SOURCE2} .
7c4f10
sed -i -e's/@VERSION/%{version}/g' MANIFEST.MF
7c4f10
sed -i -e's/@VERSION/%{version}/g' NATIVE-MANIFEST.MF
7c4f10
%patch0
7c4f10
%patch1
7c4f10
%patch2
7c4f10
7c4f10
# ppc{,64} fix
7c4f10
# https://bugzilla.redhat.com/show_bug.cgi?id=561448#c9
7c4f10
sed -i.cpu -e '/m\$(MODEL)/d' jni/GNUmakefile libtest/GNUmakefile
7c4f10
7c4f10
# remove uneccessary directories
7c4f10
rm -rf archive/* jni/libffi/ jni/win32/ lib/CopyLibs/ lib/junit*
7c4f10
7c4f10
find ./ -name '*.jar' -exec rm -f '{}' \; 
7c4f10
find ./ -name '*.class' -exec rm -f '{}' \; 
7c4f10
7c4f10
build-jar-repository -s -p lib/ junit
7c4f10
7c4f10
%mvn_package 'com.github.jnr:jffi::native:' native
7c4f10
%mvn_file ':{*}' %{pkg_name}/@1 @1
7c4f10
%{?scl:EOF}
7c4f10
7c4f10
7c4f10
%build
7c4f10
%{?scl:scl enable %{scl_maven} %{scl} - << "EOF"}
7c4f10
# ant will produce JAR with native bits
7c4f10
ant jar build-native -Duse.system.libffi=1
7c4f10
7c4f10
# maven will look for JAR with native bits in archive/
7c4f10
cp -p dist/jffi-*-Linux.jar archive/
7c4f10
7c4f10
%mvn_build
7c4f10
%{?scl:EOF}
7c4f10
7c4f10
7c4f10
%install
7c4f10
%{?scl:scl enable %{scl_maven} %{scl} - << "EOF"}
7c4f10
%mvn_install
7c4f10
7c4f10
mkdir -p META-INF/
7c4f10
cp %{SOURCE3} META-INF/
7c4f10
jar umf MANIFEST.MF %{buildroot}%{_jnidir}/%{pkg_name}/%{pkg_name}.jar META-INF/p2.inf
7c4f10
7c4f10
# install *.so
7c4f10
install -dm 755 %{buildroot}%{_libdir}/%{pkg_name}
7c4f10
cp -rp target/jni/* %{buildroot}%{_libdir}/%{pkg_name}/
7c4f10
# create version-less symlink for .so file
7c4f10
sofile=`find %{buildroot}%{_libdir}/%{pkg_name} -name lib%{pkg_name}-%{sover}.so`
7c4f10
chmod +x ${sofile}
7c4f10
ln -sr ${sofile} `dirname ${sofile}`/lib%{pkg_name}.so
7c4f10
7c4f10
jar umf NATIVE-MANIFEST.MF %{buildroot}%{_jnidir}/%{pkg_name}/%{pkg_name}-native.jar
7c4f10
%{?scl:EOF}
7c4f10
7c4f10
7c4f10
%check
7c4f10
%{?scl:scl enable %{scl_maven} %{scl} - << "EOF"}
7c4f10
# skip tests on s390 until https://bugzilla.redhat.com/show_bug.cgi?id=1084914 is resolved
7c4f10
%ifnarch s390
7c4f10
# don't fail on unused parameters... (TODO: send patch upstream)
7c4f10
sed -i 's|-Werror||' libtest/GNUmakefile
7c4f10
ant -Duse.system.libffi=1 test
7c4f10
%endif
7c4f10
%{?scl:EOF}
7c4f10
7c4f10
7c4f10
%files -f .mfiles
7c4f10
%doc COPYING.GPL COPYING.LESSER LICENSE
7c4f10
%dir %{_jnidir}/jffi
7c4f10
%dir %{_mavenpomdir}/jffi
7c4f10
7c4f10
%files native -f .mfiles-native
7c4f10
%{_libdir}/%{pkg_name}
7c4f10
%doc COPYING.GPL COPYING.LESSER LICENSE
7c4f10
7c4f10
%files javadoc -f .mfiles-javadoc
7c4f10
%doc COPYING.GPL COPYING.LESSER LICENSE
7c4f10
7c4f10
%changelog
7c4f10
* Mon Jul 13 2015 Mat Booth <mat.booth@redhat.com> - 1.2.9-8.1
7c4f10
- Import latest from Fedora
7c4f10
7c4f10
* Mon Jul 13 2015 Mat Booth <mat.booth@redhat.com> - 1.2.9-8
7c4f10
- Fix unstripped binaries and empty debuginfo package
7c4f10
- Ensure presence of ant-junit at buildtime
7c4f10
- Fixed mixed use of space and tabs
7c4f10
7c4f10
* Thu Jun 25 2015 Roland Grunberg <rgrunber@redhat.com> - 1.2.9-7
7c4f10
- Minor fixes to manifest as we introduce p2.inf file.
7c4f10
7c4f10
* Wed Jun 24 2015 Jeff Johnston <jjohnstn@redhat.com> 1.2.9-6
7c4f10
- Fix manifests so jffi requires com.kenai.jffi.native and native has bundle version.
7c4f10
7c4f10
* Tue Jun 23 2015 Roland Grunberg <rgrunber@redhat.com> - 1.2.9-5
7c4f10
- Add missing Bundle-SymbolicName attribute to manifest.
7c4f10
7c4f10
* Mon Jun 22 2015 Jeff Johnston <jjohnstn@redhat.com> 1.2.9-4
7c4f10
- Fix native MANIFEST.MF
7c4f10
7c4f10
* Thu Jun 18 2015 Jeff Johnston <jjohnstn@redhat.com> 1.2.9-3
7c4f10
- Add MANIFEST.MF.
7c4f10
7c4f10
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.9-2
7c4f10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
7c4f10
7c4f10
* Tue May 5 2015 Alexander Kurtakov <akurtako@redhat.com> 1.2.9-1
7c4f10
- Update to upstream 1.2.9.
7c4f10
7c4f10
* Thu Apr 30 2015 Alexander Kurtakov <akurtako@redhat.com> 1.2.8-1
7c4f10
- Update to upstream 1.2.8.
7c4f10
7c4f10
* Fri Feb 20 2015 Michal Srb <msrb@redhat.com> - 1.2.7-5
7c4f10
- Install version-less symlink for .so file
7c4f10
7c4f10
* Fri Feb 20 2015 Michal Srb <msrb@redhat.com> - 1.2.7-4
7c4f10
- Fix rpmlint warnings
7c4f10
7c4f10
* Fri Feb 20 2015 Michal Srb <msrb@redhat.com> - 1.2.7-3
7c4f10
- Install *.so file to %%{_libdir}/%%{pkg_name}/
7c4f10
7c4f10
* Tue Feb 17 2015 Michal Srb <msrb@redhat.com> - 1.2.7-2
7c4f10
- Build jffi-native
7c4f10
- Introduce javadoc subpackage
7c4f10
7c4f10
* Fri Dec 05 2014 Mo Morsi <mmorsi@redhat.com> - 1.2.7-1
7c4f10
- Update to JFFI 1.2.7
7c4f10
7c4f10
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.6-8
7c4f10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
7c4f10
7c4f10
* Thu Jun 12 2014 Alexander Kurtakov <akurtako@redhat.com> 1.2.6-7
7c4f10
- Fix FTBFS.
7c4f10
7c4f10
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.6-6
7c4f10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
7c4f10
7c4f10
* Mon Apr 07 2014 Dan HorĂ¡k <dan[at]danny.cz> - 1.2.6-5
7c4f10
- skip tests on s390 until https://bugzilla.redhat.com/show_bug.cgi?id=1084914 is resolved
7c4f10
7c4f10
* Fri Mar 28 2014 Michael Simacek <msimacek@redhat.com> - 1.2.6-4
7c4f10
- Use Requires: java-headless rebuild (#1067528)
7c4f10
7c4f10
* Sun Aug 11 2013 Mat Booth <fedora@matbooth.co.uk> - 1.2.6-3
7c4f10
- Remove BR on ant-nodeps, fixes FTBFS rhbz #992622
7c4f10
7c4f10
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.6-2
7c4f10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
7c4f10
7c4f10
* Tue Feb 05 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 1.2.6-1
7c4f10
- Updated to version 1.2.6.
7c4f10
7c4f10
* Wed Dec 19 2012 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.0.10-4
7c4f10
- revbump after jnidir change
7c4f10
7c4f10
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.10-3
7c4f10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
7c4f10
7c4f10
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.10-2
7c4f10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
7c4f10
7c4f10
* Tue Aug 02 2011  Mo Morsi <mmorsi@redhat.com> - 1.0.10-1
7c4f10
- Updated to most recent upstream release
7c4f10
7c4f10
* Wed Jun 01 2011  Mo Morsi <mmorsi@redhat.com> - 1.0.9-1
7c4f10
- Updated to most recent upstream release
7c4f10
7c4f10
* Mon Oct 25 2010  <mmorsi@redhat.com> - 1.0.2-1
7c4f10
- Updated to most recent upstream release
7c4f10
7c4f10
* Wed Apr 14 2010  <mmorsi@redhat.com> - 0.6.5-4
7c4f10
- added Mamoru Tasaka's fix for ppc{,64} to prep
7c4f10
7c4f10
* Mon Mar 08 2010  <mmorsi@redhat.com> - 0.6.5-3
7c4f10
- fixes to jffi from feedback
7c4f10
- don't strip debuginfo, remove extraneous executable bits,
7c4f10
7c4f10
* Tue Feb 23 2010  <mmorsi@redhat.com> - 0.6.5-2
7c4f10
- fixes to jffi compilation process
7c4f10
- fixes to spec to conform to package guidelines
7c4f10
7c4f10
* Wed Feb 17 2010  <mmorsi@redhat.com> - 0.6.5-1
7c4f10
- bumped version
7c4f10
- fixed package to comply to fedora guidelines
7c4f10
7c4f10
* Tue Jan 19 2010  <mmorsi@redhat.com> - 0.6.2-1
7c4f10
- Initial build.