jna/jna.spec

303 lines
9.7 KiB
RPMSpec
Raw Normal View History

2008-04-04 23:46:58 +00:00
Name: jna
2010-07-22 09:58:03 +00:00
Version: 3.2.7
2010-10-12 07:24:48 +00:00
Release: 8%{?dist}
2008-04-04 23:46:58 +00:00
Summary: Pure Java access to native libraries
Group: Development/Libraries
License: LGPLv2+
URL: https://jna.dev.java.net/
# The source for this package was pulled from upstream's vcs. Use the
# following commands to generate the tarball:
# svn export https://jna.dev.java.net/svn/jna/tags/%{version}/jnalib/ --username guest jna-%{version}
2010-07-22 09:58:03 +00:00
# rm -rf jna-%{version}/dist/*
# tar cjf ~/rpm/SOURCES/jna-%{version}.tar.bz2 jna-%{version}
2008-11-01 01:05:21 +00:00
Source0: %{name}-%{version}.tar.bz2
2010-07-22 09:58:03 +00:00
Source1: %{name}-pom.xml
2008-04-04 23:46:58 +00:00
# This patch is Fedora-specific for now until we get the huge
# JNI library location mess sorted upstream
2010-07-22 09:58:03 +00:00
Patch1: jna-3.2.5-loadlibrary.patch
# 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,
# and using a complex API like X11 through JNA just increases the potential
# for problems.
2009-11-23 18:32:42 +00:00
Patch2: jna-3.2.4-tests-headless.patch
Patch3: jna-3.2.7-javadoc.patch
2010-04-22 19:50:09 +00:00
# Build using GCJ javadoc
Patch4: jna-3.2.7-gcj-javadoc.patch
2010-07-22 09:58:03 +00:00
# junit cames from rpm
Patch5: jna-3.2.5-junit.patch
2008-04-04 23:46:58 +00:00
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# We manually require libffi because find-requires doesn't work
# inside jars.
Requires: java >= 1:1.6.0, jpackage-utils, libffi
2010-07-22 09:58:03 +00:00
Requires(post): jpackage-utils
Requires(postun): jpackage-utils
BuildRequires: java-devel >= 1:1.6.0, jpackage-utils, libffi-devel
BuildRequires: ant, ant-junit, ant-nodeps, ant-trax, junit
BuildRequires: libX11-devel, libXt-devel
2010-10-07 15:54:26 +00:00
# for ExclusiveArch see bug: 468831 640005 548099
2010-10-08 09:40:04 +00:00
%if 0%{?fedora} < 10 && 0%{?rhel} < 6
2010-10-07 15:54:26 +00:00
ExclusiveArch: %{ix86} x86_64
%endif
2009-11-23 18:32:42 +00:00
2008-04-04 23:46:58 +00:00
%description
JNA provides Java programs easy access to native shared libraries
(DLLs on Windows) without writing anything but Java code. JNA's
design aims to provide native access in a natural way with a
minimum of effort. No boilerplate or generated code is required.
While some attention is paid to performance, correctness and ease
of use take priority.
%package javadoc
Summary: Javadocs for %{name}
Group: Documentation
Requires: %{name} = %{version}-%{release}
%description javadoc
This package contains the javadocs for %{name}.
2010-07-22 09:58:03 +00:00
%package contrib
Summary: Contrib for %{name}
2009-11-09 08:07:56 +00:00
Group: Documentation
Requires: %{name} = %{version}-%{release}
Obsoletes: %{name}-examples
2009-11-09 08:07:56 +00:00
2010-07-22 09:58:03 +00:00
%description contrib
This package contains the contributed examples for %{name}.
2009-11-09 08:07:56 +00:00
2008-04-04 23:46:58 +00:00
%prep
2008-11-01 01:05:21 +00:00
%setup -q -n %{name}-%{version}
2008-04-04 23:46:58 +00:00
sed -e 's|@JNIPATH@|%{_libdir}/%{name}|' %{PATCH1} | patch -p1
%patch2 -p1 -b .tests-headless
2010-07-23 22:57:49 +00:00
%patch3 -p1 -b .javadoc
# temporary hach for patch3 on epel5
chmod -Rf a+rX,u+w,g-w,o-w .
2010-04-22 19:50:09 +00:00
%patch4 -p0 -b .gcj-javadoc
2010-07-22 09:58:03 +00:00
%patch5 -p1 -b .junit
cp %{SOURCE1} ./
2008-04-04 23:46:58 +00:00
# UnloadTest fail during build since we modify class loading
rm test/com/sun/jna/JNAUnloadTest.java
# current bug: https://jna.dev.java.net/issues/show_bug.cgi?id=155
rm test/com/sun/jna/DirectTest.java
2008-04-04 23:46:58 +00:00
# all java binaries must be removed from the sources
2010-07-22 09:58:03 +00:00
#find . -name '*.jar' -delete
rm lib/junit.jar
find . -name '*.class' -delete
2008-04-04 23:46:58 +00:00
# remove internal copy of libffi
rm -rf native/libffi
# clean LICENSE.txt
sed -i 's/\r//' LICENSE.txt
chmod 0644 LICENSE.txt
%build
# We pass -Ddynlink.native which comes from our patch because
# upstream doesn't want to default to dynamic linking.
ant -Dcflags_extra.native="%{optflags}" -Ddynlink.native=true -Dnomixedjar.native=true jar contrib-jars javadoc
2010-07-22 09:58:03 +00:00
# remove compiled contribs
find contrib -name build -exec rm -rf {} \; || :
2010-07-22 09:58:03 +00:00
sed -i "s/VERSION/%{version}/" %{name}-pom.xml
2008-04-04 23:46:58 +00:00
%install
rm -rf %{buildroot}
# jars
2008-07-31 20:30:35 +00:00
install -D -m 644 build*/%{name}.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
2008-04-04 23:46:58 +00:00
(cd %{buildroot}%{_javadir}/; for jar in `ls *-%{version}.jar`; do ln -s $jar `echo $jar | sed -e 's/-%{version}//'`; done)
install -d -m 755 %{buildroot}%{_javadir}/%{name}
find contrib -name '*.jar' -exec cp {} %{buildroot}%{_javadir}/%{name}/ \;
2008-04-04 23:46:58 +00:00
# NOTE: JNA has highly custom code to look for native jars in this
# directory. Since this roughly matches the jpackage guidelines,
# we'll leave it unchanged.
install -d -m 755 %{buildroot}%{_libdir}/%{name}
2008-07-31 20:30:35 +00:00
install -m 755 build*/native/libjnidispatch*.so %{buildroot}%{_libdir}/%{name}/
2008-04-04 23:46:58 +00:00
%if 0%{?fedora} >= 9 || 0%{?rhel} > 5
2010-07-22 09:58:03 +00:00
# install maven pom file
install -Dm 644 %{name}-pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{name}.pom
# ... and maven depmap
%add_to_maven_depmap net.java.dev.jna %{name} %{version} JPP %{name}
%endif
2010-07-22 09:58:03 +00:00
2008-04-04 23:46:58 +00:00
# javadocs
install -p -d -m 755 %{buildroot}%{_javadocdir}/%{name}-%{version}
cp -a doc/javadoc/* %{buildroot}%{_javadocdir}/%{name}-%{version}
#if 0%{?rhel} >= 6 || 0%{?fedora} >= 9
%if 0%{?fedora} >= 9
2010-10-12 07:24:48 +00:00
%ifnarch ppc
2010-07-22 09:58:03 +00:00
%check
ant -Dcflags_extra.native="%{optflags}" -Ddynlink.native=true -Dnomixedjar.native=true test
2010-07-22 09:58:03 +00:00
%endif
2010-10-12 07:24:48 +00:00
%endif
2010-07-22 09:58:03 +00:00
2008-04-04 23:46:58 +00:00
%clean
rm -rf %{buildroot}
%if 0%{?fedora} >= 9 || 0%{?rhel} > 5
2010-07-22 09:58:03 +00:00
%post
%update_maven_depmap
%postun
%update_maven_depmap
%endif
2010-07-22 09:58:03 +00:00
2008-04-04 23:46:58 +00:00
%files
%defattr(-,root,root,-)
%doc LICENSE.txt release-notes.html
2008-04-04 23:46:58 +00:00
%{_libdir}/%{name}
2009-11-09 08:07:56 +00:00
%{_javadir}/%{name}.jar
%{_javadir}/%{name}-%{version}.jar
%if 0%{?fedora} >= 9 || 0%{?rhel} > 5
2010-07-22 09:58:03 +00:00
%{_mavenpomdir}/*.pom
%{_mavendepmapfragdir}/%{name}
%endif
2009-11-09 08:07:56 +00:00
2008-04-04 23:46:58 +00:00
%files javadoc
%defattr(-,root,root,-)
%{_javadocdir}/%{name}-%{version}
2010-07-22 09:58:03 +00:00
%files contrib
2009-11-09 08:07:56 +00:00
%defattr(-,root,root,-)
%{_javadir}/%{name}
2009-11-09 08:07:56 +00:00
2008-04-04 23:46:58 +00:00
%changelog
2010-10-12 07:24:48 +00:00
* Tue Oct 12 2010 Levente Farkas <lfarkas@lfarkas.org> - 3.2.7-8
- exclude check on ppc
2010-10-08 09:40:04 +00:00
* Fri Oct 8 2010 Levente Farkas <lfarkas@lfarkas.org> - 3.2.7-7
- fix excludearch condition
2010-10-07 15:54:26 +00:00
* Wed Oct 6 2010 Levente Farkas <lfarkas@lfarkas.org> - 3.2.7-6
- readd excludearch for old release fix #548099
2010-10-02 02:42:04 +00:00
* Fri Oct 01 2010 Dennis Gilmore <dennis@ausil.us> - 3.2.7-5.1
- remove the ExcludeArch it makes no sense
* Sun Aug 1 2010 Levente Farkas <lfarkas@lfarkas.org> - 3.2.7-5
- reenable test and clean up contrib files
2010-07-27 10:13:13 +00:00
* Tue Jul 27 2010 Levente Farkas <lfarkas@lfarkas.org> - 3.2.7-4
- add Obsoletes for jna-examples
2010-07-23 22:57:49 +00:00
* Sat Jul 24 2010 Levente Farkas <lfarkas@lfarkas.org> - 3.2.7-3
- upstream 64bit fixes
2010-07-22 21:17:11 +00:00
* Thu Jul 23 2010 Levente Farkas <lfarkas@lfarkas.org> - 3.2.7-2
- Temporary hack for 64bit build
2010-07-22 09:58:03 +00:00
* Thu Jul 22 2010 Levente Farkas <lfarkas@lfarkas.org> - 3.2.7-1
- Rebase on upstream 3.2.7
* Wed Jul 21 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.2.4-6
- Add maven depmap
2010-04-22 19:50:09 +00:00
* Thu Apr 22 2010 Colin Walters <walters@verbum.org> - 3.2.4-5
- Add patches to make the build happen with gcj
2010-04-21 21:56:22 +00:00
* Wed Apr 21 2010 Colin Walters <walters@verbum.org> - 3.2.4-4
- Fix the build by removing upstream's hardcoded md5
2009-12-17 08:55:45 +00:00
* Thu Dec 17 2009 Levente Farkas <lfarkas@lfarkas.org> - 3.2.4-3
- add proper ExclusiveArch
* Thu Dec 17 2009 Alexander Kurtakov <akurtako@redhat.com> 3.2.4-2
- Comment rhel ExclusiveArchs - not correct applies on Fedora.
2009-11-23 18:32:42 +00:00
* Sat Nov 14 2009 Levente Farkas <lfarkas@lfarkas.org> - 3.2.4-1
- Rebase on upstream 3.2.4
2009-11-09 08:07:56 +00:00
* Thu Oct 29 2009 Lubomir Rintel <lkundrak@v3.sk> - 3.0.9-6
- Add examples subpackage
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.9-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.9-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Tue Dec 30 2008 Colin Walters <walters@redhat.com> - 3.0.9-3
- Add patch to allow opening current process
* Sun Nov 30 2008 Colin Walters <walters@redhat.com> - 3.0.9-2
- Fix library mapping, remove upstreamed patches
2008-11-01 01:05:21 +00:00
* Fri Oct 31 2008 Colin Walters <walters@redhat.com> - 3.0.9-1
- Rebase on upstream 3.0.9
* Tue Oct 14 2008 Colin Walters <walters@redhat.com> - 3.0.4-10.svn729
- Add patch to support String[] returns
* Wed Oct 01 2008 Colin Walters <walters@redhat.com> - 3.0.4-9.svn729
- Add new patch to support NativeMapped[] which I want
* Wed Oct 01 2008 Colin Walters <walters@redhat.com> - 3.0.4-8.svn729
- Update to svn r729
- drop upstreamed typemapper patch
* Tue Sep 18 2008 Colin Walters <walters@redhat.com> - 3.0.4-7.svn700
- Add patch to make typemapper always accessible
- Add patch to skip cracktastic X11 test bits which currently fail
2008-09-09 15:51:06 +00:00
* Tue Sep 09 2008 Colin Walters <walters@redhat.com> - 3.0.4-5.svn700
- Update to upstream SVN r700; drop all now upstreamed patches
2008-09-06 22:13:22 +00:00
* Sat Sep 06 2008 Colin Walters <walters@redhat.com> - 3.0.4-3.svn630
- A few more patches for JGIR
* Thu Sep 04 2008 Colin Walters <walters@redhat.com> - 3.0.4-2.svn630
- Add two (sent upstream) patches that I need for JGIR
* Thu Jul 31 2008 Colin Walters <walters@redhat.com> - 3.0.4-1.svn630
- New upstream version, drop upstreamed patch parts
- New patch jna-3.0.4-nomixedjar.patch which ensures that we don't
include the .so in the .jar
2008-04-04 23:46:58 +00:00
* Fri Apr 04 2008 Colin Walters <walters@redhat.com> - 3.0.2-7
- Add patch to use JPackage-compatible JNI library path
- Do build debuginfo package
- Refactor build patch greatly so it's hopefully upstreamable
- Install .so directly to JNI directory, rather than inside jar
- Clean up Requires/BuildRequires (thanks Mamoru Tasaka)
* Sun Mar 30 2008 Conrad Meyer <konrad@tylerc.org> - 3.0.2-6
- -javadocs should be -javadoc.
- %%files section cleaned a bit.
* Mon Mar 17 2008 Conrad Meyer <konrad@tylerc.org> - 3.0.2-5
- -javadocs package should be in group "Documentation".
* Mon Mar 17 2008 Conrad Meyer <konrad@tylerc.org> - 3.0.2-4
- License should be LGPLv2+, not GPLv2+.
- Several minor fixes.
- Fix Requires in javadoc package.
* Sun Mar 16 2008 Conrad Meyer <konrad@tylerc.org> - 3.0.2-3
- Don't use internal libffi.
* Thu Mar 6 2008 Conrad Meyer <konrad@tylerc.org> - 3.0.2-2
- Don't pull in jars from the web.
* Mon Mar 3 2008 Conrad Meyer <konrad@tylerc.org> - 3.0.2-1
- Initial package.