Expand %{?fedora} and %{?rhel} conditionals
This commit is contained in:
parent
ead55372fe
commit
49cd85e9e5
57
jna.spec
57
jna.spec
@ -39,14 +39,7 @@ Requires(post): jpackage-utils
|
||||
Requires(postun): jpackage-utils
|
||||
BuildRequires: java-devel, jpackage-utils, libffi-devel
|
||||
BuildRequires: ant, ant-junit, junit
|
||||
%if 0%{?rhel} && 0%{?rhel} < 7
|
||||
BuildRequires: ant-nodeps, ant-trax
|
||||
%endif
|
||||
BuildRequires: libX11-devel, libXt-devel
|
||||
# for ExclusiveArch see bug: 468831 640005 548099
|
||||
%if 0%{?fedora} < 10 && 0%{?rhel} < 6
|
||||
ExclusiveArch: %{ix86} x86_64
|
||||
%endif
|
||||
|
||||
|
||||
%description
|
||||
@ -61,9 +54,7 @@ of use take priority.
|
||||
%package javadoc
|
||||
Summary: Javadocs for %{name}
|
||||
Group: Documentation
|
||||
%if 0%{?fedora} || 0%{?rhel} > 5
|
||||
BuildArch: noarch
|
||||
%endif
|
||||
|
||||
|
||||
%description javadoc
|
||||
@ -75,9 +66,7 @@ Summary: Contrib for %{name}
|
||||
Group: Documentation
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Obsoletes: %{name}-examples
|
||||
%if 0%{?fedora} || 0%{?rhel} > 5
|
||||
BuildArch: noarch
|
||||
%endif
|
||||
|
||||
|
||||
%description contrib
|
||||
@ -132,67 +121,30 @@ find contrib -name '*.jar' -exec cp {} %{buildroot}%{_javadir}/%{name}/ \;
|
||||
install -d -m 755 %{buildroot}%{_libdir}/%{name}
|
||||
install -m 755 build/native*/libjnidispatch*.so %{buildroot}%{_libdir}/%{name}/
|
||||
|
||||
%if 0%{?fedora} >= 9 || 0%{?rhel} > 5
|
||||
# install maven pom file
|
||||
install -Dm 644 pom-%{name}.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
|
||||
install -Dm 644 pom-%{name}-platform.xml %{buildroot}%{_mavenpomdir}/JPP.%{name}-%{name}-platform.pom
|
||||
|
||||
# ... and maven depmap
|
||||
%if 0%{?fedora} >= 9
|
||||
%add_maven_depmap JPP-%{name}.pom %{name}.jar
|
||||
%add_maven_depmap JPP.%{name}-%{name}-platform.pom -f platform %{name}/%{name}-platform.jar -a "net.java.dev.jna:platform"
|
||||
%else
|
||||
%add_to_maven_depmap net.java.dev.jna jna-platform %{version} JPP jna-platform
|
||||
mv %{buildroot}%{_mavendepmapfragdir}/%{name} %{buildroot}%{_mavendepmapfragdir}/%{name}-platform
|
||||
%add_to_maven_depmap net.java.dev.jna %{name} %{version} JPP %{name}
|
||||
%endif
|
||||
%endif
|
||||
|
||||
# javadocs
|
||||
install -p -d -m 755 %{buildroot}%{_javadocdir}/%{name}
|
||||
cp -a doc/javadoc/* %{buildroot}%{_javadocdir}/%{name}
|
||||
|
||||
|
||||
#%if 0%{?rhel} >= 6 || 0%{?fedora} >= 9
|
||||
#%if 0%{?fedora} >= 9
|
||||
#%ifnarch ppc s390 s390x
|
||||
#%check
|
||||
#ant -Dcflags_extra.native="%{optflags}" -Ddynlink.native=true -Dnomixedjar.native=true test
|
||||
#%endif
|
||||
#%endif
|
||||
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
|
||||
%if 0%{?rhel} > 5
|
||||
%post
|
||||
%update_maven_depmap
|
||||
|
||||
%postun
|
||||
%update_maven_depmap
|
||||
|
||||
%post contrib
|
||||
%update_maven_depmap
|
||||
|
||||
%postun contrib
|
||||
%update_maven_depmap
|
||||
%endif
|
||||
|
||||
%if 0%{?fedora} >= 21
|
||||
%files -f .mfiles
|
||||
%else
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%{_javadir}/%{name}.jar
|
||||
%endif
|
||||
%doc LICENSE OTHERS README.md CHANGES.md TODO
|
||||
%{_libdir}/%{name}
|
||||
%if 0%{?fedora} <= 20 || 0%{?rhel} > 5
|
||||
%{_mavenpomdir}/JPP-%{name}.pom
|
||||
%{_mavendepmapfragdir}/%{name}
|
||||
%endif
|
||||
|
||||
|
||||
%files javadoc
|
||||
@ -201,17 +153,8 @@ rm -rf %{buildroot}
|
||||
%{_javadocdir}/%{name}
|
||||
|
||||
|
||||
%if 0%{?fedora} >= 21
|
||||
%files contrib -f .mfiles-platform
|
||||
%else
|
||||
%files contrib
|
||||
%defattr(-,root,root,-)
|
||||
%endif
|
||||
%{_javadir}/%{name}
|
||||
%if 0%{?fedora} <= 20 || 0%{?rhel} > 5
|
||||
%{_mavenpomdir}/JPP.%{name}-%{name}-platform.pom
|
||||
%{_mavendepmapfragdir}/%{name}-platform
|
||||
%endif
|
||||
|
||||
|
||||
%changelog
|
||||
|
Loading…
Reference in New Issue
Block a user