Name: unicorn
Version: 1.0.1
Release: 5%{?dist}
Summary: A lightweight multi-platform, multi-architecture CPU emulator framework
# GPLv2: Most of unicorn is licensed under the GPLv2, with exception
# being the code which followed the project's fork of QEMU.
# LGPLv2: Portions of code from QEMU
# MIT: Portions of code from QEMU
# BSD: Portions of code from QEMU
License: GPLv2 and LGPLv2+ and MIT and BSD
URL: https://www.unicorn-engine.org/
Source0: https://github.com/unicorn-engine/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
Patch0: unicorn-1.0.1-python2.patch
BuildRequires: gcc
BuildRequires: python2-devel
BuildRequires: python3-devel
# Much of Unicorn follows from QEMU, which the Unicorn project forked in
# 2015. Since then, the Unicorn team has applied a number of bugfixes to
# the forked QEMU code along with the modifications necessary for Unicorn.
# QEMU 2.2.1 formed the basis of this work. The Unicorn project documents
# the relationship between Unicorn and QEMU at
# http://www.unicorn-engine.org/docs/beyond_qemu.html.
Provides: bundled(qemu) = 2.2.1
%description
Unicorn is a lightweight multi-platform, multi-architecture CPU emulator
framework.
%package devel
Summary: Files needed to develop applications using unicorn
Requires: %{name} = %{version}-%{release}
%description devel
This package provides the libraries, include files, and other resources
needed for developing applications using unicorn.
%package -n python2-unicorn
Summary: %{summary}
Requires: %{name} = %{version}-%{release}
%{?python_provide:%python_provide python2-%{name}}
%description -n python2-unicorn
The unicorn-python2 package contains python2 bindings for unicorn.
%package -n python3-unicorn
Summary: %{summary}
Requires: %{name} = %{version}-%{release}
%{?python_provide:%python_provide python3-%{name}}
%description -n python3-unicorn
The unicorn-python3 package contains python3 bindings for unicorn.
%prep
%autosetup -n %{name}-%{version}
%build
%make_build
pushd bindings/python
%py2_build
%py3_build
popd
%install
%make_install LIBDIRARCH=%{_lib} UNICORN_STATIC=no
pushd bindings/python
%py2_install
%py3_install
popd
rm -rf %{buildroot}%{python2_sitelib}/unicorn/include
rm -rf %{buildroot}%{python2_sitelib}/unicorn/lib
rm -rf %{buildroot}%{python3_sitelib}/unicorn/include
rm -rf %{buildroot}%{python3_sitelib}/unicorn/lib
%ldconfig_scriptlets
%files
%doc AUTHORS.TXT ChangeLog CREDITS.TXT README.md
%license COPYING
%{_libdir}/lib*.so.*
%files devel
%{_libdir}/lib*.so
%{_libdir}/pkgconfig/unicorn.pc
%{_includedir}/unicorn/
%files -n python2-unicorn
%{python2_sitelib}/%{name}-%{version}-py?.?.egg-info
%{python2_sitelib}/%{name}
%files -n python3-unicorn
%{python3_sitelib}/%{name}-%{version}-py?.?.egg-info
%{python3_sitelib}/%{name}
%changelog
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Sun Jul 22 2018 W. Michael Petullo <mike@flyn.org> - 1.0.1-3
- Add patch to use python2 rather than python when building
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Sat Jun 16 2018 W. Michael Petullo <mike@flyn.org> - 1.0.1-1
- Initial package