do not build py2 for rhel8
This commit is contained in:
parent
17a9e5293c
commit
20eece1940
6
capstone.rpmlintrc
Normal file
6
capstone.rpmlintrc
Normal file
@ -0,0 +1,6 @@
|
||||
from Config import addFilter
|
||||
|
||||
addFilter('capstone.*: macro-in-comment.*')
|
||||
addFilter('capstone.*: rpm-buildroot-usage %build sed -i .s;%{buildroot};;.*')
|
||||
addFilter('capstone.*: specfile-error warning: Macro expanded in comment on line ..: %{gituser}/%{gitname}/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz')
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
Name: capstone
|
||||
Version: 4.0.1
|
||||
Release: 8%{?dist}
|
||||
Release: 9%{?dist}
|
||||
Summary: A lightweight multi-platform, multi-architecture disassembly framework
|
||||
|
||||
%global gituser aquynh
|
||||
@ -30,11 +30,14 @@ Patch1: 0001-Fix-include-path-in-pkg-config-for-Makefile-too-1339.patch
|
||||
Capstone is a disassembly framework with the target of becoming the ultimate
|
||||
disasm engine for binary analysis and reversing in the security community.}
|
||||
|
||||
%global with_python3 1
|
||||
%bcond_with python2
|
||||
# Build also the python2 package
|
||||
%if %{with python2} || (0%{?fedora} && 0%{?fedora} <= 31 ) || ( 0%{?rhel} && 0%{?rhel} <= 8 )
|
||||
%global with_python2 1
|
||||
# Build with python3 package by default
|
||||
%bcond_without python3
|
||||
|
||||
# Build without python2 package for newer releases f32+ and rhel8+
|
||||
%if (0%{?fedora} && 0%{?fedora} >= 32 ) || ( 0%{?rhel} && 0%{?rhel} >= 8 )
|
||||
%bcond_with python2
|
||||
%else
|
||||
%bcond_without python2
|
||||
%endif
|
||||
|
||||
|
||||
@ -56,6 +59,7 @@ BuildRequires: python%{python3_pkgversion}
|
||||
BuildRequires: python%{python3_pkgversion}-devel
|
||||
BuildRequires: python%{python3_pkgversion}-setuptools
|
||||
%endif # if with_python3
|
||||
|
||||
%global _hardened_build 1
|
||||
|
||||
|
||||
@ -86,7 +90,7 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
%description -n python2-capstone
|
||||
%{common_desc}
|
||||
The python2-capstone package contains python bindings for %{name}.
|
||||
%endif # _with_python3
|
||||
%endif # with_python2
|
||||
|
||||
|
||||
|
||||
@ -148,7 +152,7 @@ CFLAGS="%{optflags}" %{__python3} setup.py build
|
||||
%endif # with_python3
|
||||
popd
|
||||
|
||||
# build java bindings
|
||||
# build java bindings needs some python
|
||||
pushd bindings/java
|
||||
%if 0%{?with_python3}
|
||||
make PYTHON2=%{__python3} PYTHON3=%{__python3} CFLAGS="%{optflags}" # %{?_smp_mflags} parallel seems broken
|
||||
@ -231,6 +235,9 @@ install -D -p -m 0644 bindings/java/%{name}.jar %{buildroot}/%{_javadir}/%{name
|
||||
%{_javadir}/
|
||||
|
||||
%changelog
|
||||
* Tue Oct 15 2019 Michal Ambroz <rebus AT_ seznam.cz> - 4.0.1-9
|
||||
- do not build python2 package for rhel8
|
||||
|
||||
* Thu Oct 10 2019 Michal Ambroz <rebus AT_ seznam.cz> - 4.0.1-8
|
||||
- fix descriptions of sub-packages
|
||||
- remove buildroot from the build phase
|
||||
|
||||
Loading…
Reference in New Issue
Block a user