Sophie

Sophie

distrib > Mandriva > 2010.1 > x86_64 > media > contrib-release-src > by-pkgid > 904fe9d0444ce91833d5c81f5efd3b2a > files > 4

jna-3.2.4-2mdv2010.1.src.rpm

Name:           jna
Version:        3.2.4
Release:        %mkrel 2
Summary:        Pure Java access to native libraries

Group:          Development/Java
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}
#   rm jna-%{version}/dist/*
#   tar -cjf jna-%{version}.tar.bz2 jna-%{version}
Source0:        %{name}-%{version}.tar.bz2
# This patch is Fedora-specific for now until we get the huge
# JNI library location mess sorted upstream
Patch1:         jna-3.2.4-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.
Patch2:         jna-3.2.4-tests-headless.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-buildroot

BuildRequires:  java-devel >= 1.6 ant jpackage-utils ant-nodeps
BuildRequires:  libx11-devel libxt-devel libffi-devel
BuildRequires:  java-rpmbuild >= 0:1.5.32
# We manually require libffi because find-requires doesn't work
# inside jars.
Requires:       java >= 0: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:          Development/Java

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

%package        examples
Summary:        Examples for %{name}
Group:          Development/Java
Requires:	%{name} = %{version}

%description    examples
This package contains the examples for %{name}.


%prep
%setup -q -n %{name}-%{version}
sed -e 's|@JNIPATH@|%{_libdir}/%{name}|' %{PATCH1} | patch -p1
%patch2 -p1 -b .tests-headless

# 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

# 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 examples
%ant javadoc


%install
rm -rf %{buildroot}

# jars
install -D -m 644 build*/%{name}.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
install -D -m 644 build*/examples.jar %{buildroot}%{_javadir}/%{name}-examples-%{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 -d "%{buildroot}%{_javadocdir}"
%__cp -a doc/javadoc "%{buildroot}%{_javadocdir}/%{name}-%{version}"
(cd %{buildroot}%{_javadocdir} && %{__ln_s} %{name}-%{version} %{name})


%clean
%{__rm} -rf %{buildroot}


%files
%defattr(0644,root,root,0755)
%doc LICENSE.txt
%{_libdir}/%{name}
%{_javadir}/%{name}.jar
%{_javadir}/%{name}-%{version}.jar

%files javadoc
%defattr(0644,root,root,0755)
%{_javadocdir}/%{name}-%{version}
%{_javadocdir}/%{name}

%files examples
%defattr(0644,root,root,0755)
%{_javadir}/%{name}-examples.jar
%{_javadir}/%{name}-examples-%{version}.jar 


%changelog
* Thu Nov 26 2009 Jérôme Brenier <incubusss@mandriva.org> 3.2.4-2mdv2010.1
+ Revision: 470390
- add requires jna to jna-examples
- new version 3.2.4
- new subpackage jna-examples
- resync with Fedora patches

* Fri Sep 25 2009 Jaroslav Tulach <jtulach@mandriva.org> 3.0.9-1mdv2010.0
+ Revision: 448704
- Updating to 3.0.9 version

* Fri Sep 11 2009 Thierry Vignaud <tvignaud@mandriva.com> 3.0.4-0.1.svn630.3mdv2010.0
+ Revision: 438039
- rebuild

* Fri Mar 06 2009 Antoine Ginies <aginies@mandriva.com> 3.0.4-0.1.svn630.2mdv2009.1
+ Revision: 350277
- 2009.1 rebuild

* Thu Aug 14 2008 Alexander Kurtakov <akurtakov@mandriva.org> 3.0.4-0.1.svn630.1mdv2009.0
+ Revision: 271886
- fix examples install on 64bit
- new version 3.0.4

  + Thierry Vignaud <tvignaud@mandriva.com>
    - rebuild early 2009.0 package (before pixel changes)

* Wed Apr 30 2008 Alexander Kurtakov <akurtakov@mandriva.org> 3.0.2-0.7.3mdv2009.0
+ Revision: 199450
- bump release
- reintroduce jna-examples, needed by atunes

* Tue Apr 29 2008 Alexander Kurtakov <akurtakov@mandriva.org> 3.0.2-0.7.2mdv2009.0
+ Revision: 198927
- obsolete old examples package
- new version

* Wed Mar 19 2008 Nicolas Vigier <nvigier@mandriva.com> 0:3.0-0.0.2mdv2008.1
+ Revision: 188913
- build jna-examples.jar because atunes needs it

* Wed Feb 27 2008 Alexander Kurtakov <akurtakov@mandriva.org> 0:3.0-0.0.1mdv2008.1
+ Revision: 175929
- add libx11-devel BR
- import jna