代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/capstone 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
%bcond_with java
Name: capstone
Version: 4.0.1
Release: 2
Summary: A lightweight multi-platform, multi-architecture disassembly framework
License: BSD
URL: http://www.capstone-engine.org/
Source0: https://github.com/aquynh/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Patch0: 0001-Fix-include-path-in-pkg-config-for-Makefile-too-1339.patch
%global with_python3 1
%global with_python2 1
BuildRequires: gcc git capstone
%if 0%{with java}
Buildrequires: jna java-devel
%endif
%if 0%{?with_python2}
BuildRequires: python2 python2-devel python2-setuptools
%endif
%if 0%{?with_python3}
BuildRequires: python%{python3_pkgversion} python%{python3_pkgversion}-devel python%{python3_pkgversion}-setuptools
%endif
%description
Capstone is a lightweight multi-platform, multi-architecture disassembly framework.It supports multi-architectures,
Multiple platforms. Clean & intuitive is the key principle in designing the API for Capstone. Capstone is thread-safe.
%package -n %{name}-devel
Summary: Development headers and libraries to build upon %{name}
Requires:%{name} = %{version}-%{release}
%description -n %{name}-devel
Development headers and libraries to build upon %{name}
%if 0%{?with_python2}
%package -n python2-capstone
Summary: Python bindings for %{name}
Requires: %{name} = %{version}-%{release}
Provides: %{name}-python = %{version}-%{release}
Provides: %{name}-python%{?_isa} = %{version}-%{release}
Obsoletes: %{name}-python < %{version}-%{release}
%{?python_provide:%python_provide python2-capstone}
%description -n python2-capstone
%{common_desc}
Python bindings for %{name}.
%endif
%if 0%{?with_python3}
%package -n python%{python3_pkgversion}-capstone
Requires: %{name} = %{version}-%{release}
Summary: Python3 bindings for %{name}
Provides: %{name}-python%{python3_pkgversion} = %{version}-%{release}
Provides: %{name}-python%{python3_pkgversion}%{?_isa} = %{version}-%{release}
Obsoletes: %{name}-python%{python3_pkgversion} < %{version}-%{release}
%{?python_provide:%python_provide python%{python3_pkgversion}-capstone}
%description -n python%{python3_pkgversion}-capstone
Python3 bindings for %{name}.
%endif
%if 0%{with java}
%package java
Summary: Java bindings for %{name}
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description java
This package contains java bindings for %{name}.
%endif
%prep
%autosetup -n %{name}-%{version} -p1 -Sgit
%build
DESTDIR="%{buildroot}" V=1 CFLAGS="%{optflags}" \
LIBDIRARCH="%{_lib}" INCDIR="%{_includedir}" \
make PYTHON2=%{__python2} PYTHON3=%{__python3} %{?_smp_mflags}
sed -i 's;%{buildroot};;' capstone.pc
grep -v archive capstone.pc > capstone.pc.tmp
mv capstone.pc.tmp capstone.pc
pushd bindings/python
%py2_build
%if 0%{?with_python3}
%py3_build
%endif
popd
%if 0%{with java}
pushd bindings/java
%if 0%{?with_python3}
make PYTHON2=%{__python3} PYTHON3=%{__python3} CFLAGS="%{optflags}"
%else
make PYTHON2=%{__python2} PYTHON3=%{__python2} CFLAGS="%{optflags}"
%endif
popd
%endif
%install
DESTDIR=%{buildroot} LIBDIRARCH=%{_lib} \
INCDIR="%{_includedir}" make install
%delete_la_and_a
cp -a %{_libdir}/libcapstone.so.3 %{buildroot}%{_libdir}
pushd bindings/python
%if 0%{?with_python2}
%py2_install
%endif
%if 0%{?with_python3}
%py3_install
%endif
popd
%if 0%{with java}
install -D -p -m 0644 bindings/java/%{name}.jar %{buildroot}/%{_javadir}/%{name}.jar
%endif
%pre
%preun
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%license LICENSE.TXT LICENSE_LLVM.TXT
%doc CREDITS.TXT ChangeLog README.md SPONSORS.TXT
%{_libdir}/*.so.*
%{_bindir}/cstool
%files devel
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/*
%if 0%{?with_python2}
%files -n python2-capstone
%{python2_sitelib}/*egg-info
%{python2_sitelib}/%{name}
%endif
%if 0%{?with_python3}
%files -n python%{python3_pkgversion}-capstone
%{python3_sitelib}/*egg-info
%{python3_sitelib}/%{name}
%endif
%if 0%{with java}
%files java
%{_javadir}/
%endif
%changelog
* Mon Oct 28 2019 caomeng <caomeng5@huawei.com> - 4.0.1-2
- Type:NA
- ID:NA
- SUG:NA
- DESC:add bcondwith java
* Sat Oct 12 2019 openEuler Buildteam <buildteam@openeuler.org> - 4.0.1-1
- Package init
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。