- Add examples subpackage

This commit is contained in:
Lubomir Rintel 2009-11-09 08:07:56 +00:00
parent c835e209dc
commit ee654633ea

View File

@ -1,6 +1,6 @@
Name: jna
Version: 3.0.9
Release: 5%{?dist}
Release: 6%{?dist}
Summary: Pure Java access to native libraries
Group: Development/Libraries
@ -56,6 +56,16 @@ Requires: %{name} = %{version}-%{release}
This package contains the javadocs for %{name}.
%package examples
Summary: Examples for %{name}
Group: Documentation
Requires: %{name} = %{version}-%{release}
%description examples
This package contains the examples for %{name}.
%prep
%setup -q -n %{name}-%{version}
sed -e 's|@JNIPATH@|%{_libdir}/%{name}|' %{PATCH1} | patch -p1
@ -80,7 +90,7 @@ 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 jar -Dcflags_extra.native="%{optflags}" -Ddynlink.native=true -Dnomixedjar.native=true jar examples
ant javadoc
@ -89,6 +99,7 @@ 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,
@ -109,14 +120,25 @@ rm -rf %{buildroot}
%defattr(-,root,root,-)
%doc LICENSE.txt
%{_libdir}/%{name}
%{_javadir}/*.jar
%{_javadir}/%{name}.jar
%{_javadir}/%{name}-%{version}.jar
%files javadoc
%defattr(-,root,root,-)
%{_javadocdir}/%{name}-%{version}
%files examples
%defattr(-,root,root,-)
%{_javadir}/%{name}-examples.jar
%{_javadir}/%{name}-examples-%{version}.jar
%changelog
* 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