156 lines
5.0 KiB
RPMSpec
156 lines
5.0 KiB
RPMSpec
Name: jna
|
|
Version: 3.0.4
|
|
Release: 3.svn630%{?dist}
|
|
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}
|
|
# tar -cjf jna-%{version}.tar.bz2 jna-%{version}
|
|
Source0: %{name}-%{version}.svn630.tar.bz2
|
|
# This patch is Fedora-specific for now until we get the huge
|
|
# JNI library location mess sorted upstream
|
|
Patch1: jna-3.0.2-loadlibrary.patch
|
|
# Will send upstream...
|
|
Patch2: jna-3.0.4-nomixedjar.patch
|
|
# https://jna.dev.java.net/issues/show_bug.cgi?id=84
|
|
Patch3: jna-3.0.4-callbacks-typemappers.patch
|
|
# https://jna.dev.java.net/issues/show_bug.cgi?id=85
|
|
Patch4: jna-3.0.4-callbacks-methodname.patch
|
|
# https://jna.dev.java.net/issues/show_bug.cgi?id=86
|
|
Patch5: jna-3.0.4-structure-reason.patch
|
|
# https://jna.dev.java.net/issues/show_bug.cgi?id=87
|
|
Patch6: jna-3.0.4-structure-handle-null.patch
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
|
BuildRequires: java-devel >= 1.6 ant jpackage-utils ant-nodeps
|
|
BuildRequires: libX11-devel libXt-devel libffi-devel
|
|
# We manually require libffi because find-requires doesn't work
|
|
# inside jars.
|
|
Requires: java >= 1:1.6.0 jpackage-utils
|
|
|
|
%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}.
|
|
|
|
|
|
%prep
|
|
%setup -q -n %{name}-%{version}-svn630
|
|
sed -e 's|@JNIPATH@|%{_libdir}/%{name}|' %{PATCH1} | patch -p1
|
|
%patch2 -p1
|
|
%patch3 -p1
|
|
%patch4 -p1
|
|
%patch5 -p1
|
|
%patch6 -p1
|
|
|
|
# all java binaries must be removed from the sources
|
|
find . -name '*.jar' -exec rm -f '{}' \;
|
|
find . -name '*.class' -exec rm -f '{}' \;
|
|
|
|
# remove internal copy of libffi
|
|
rm -rf native/libffi
|
|
|
|
# remove random unused zips
|
|
rm dist/{src,doc}.zip
|
|
|
|
# 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 jar -Dcflags_extra.native="%{optflags}" -Ddynlink.native=true -Dnomixedjar.native=true
|
|
ant javadoc
|
|
|
|
|
|
%install
|
|
rm -rf %{buildroot}
|
|
|
|
# jars
|
|
install -D -m 644 build*/%{name}.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
|
|
(cd %{buildroot}%{_javadir}/; for jar in `ls *-%{version}.jar`; do ln -s $jar `echo $jar | sed -e 's/-%{version}//'`; done)
|
|
# 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}
|
|
install -m 755 build*/native/libjnidispatch*.so %{buildroot}%{_libdir}/%{name}/
|
|
|
|
# javadocs
|
|
install -p -d -m 755 %{buildroot}%{_javadocdir}/%{name}-%{version}
|
|
cp -a doc/javadoc/* %{buildroot}%{_javadocdir}/%{name}-%{version}
|
|
|
|
|
|
%clean
|
|
rm -rf %{buildroot}
|
|
|
|
|
|
%files
|
|
%defattr(-,root,root,-)
|
|
%doc LICENSE.txt
|
|
%{_libdir}/%{name}
|
|
%{_javadir}/*.jar
|
|
|
|
%files javadoc
|
|
%defattr(-,root,root,-)
|
|
%{_javadocdir}/%{name}-%{version}
|
|
|
|
|
|
%changelog
|
|
* 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
|
|
|
|
* 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.
|