<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 14, 2020, 10:00 AM Chris Johns <<a href="mailto:chrisj@rtems.org">chrisj@rtems.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">What is the use case for this package?<br></blockquote></div></div><div dir="auto">qemu-couverture uses capstone.</div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Chris<br>
<br>
On 10/4/20 6:21 am, Vijay Kumar Banerjee wrote:<br>
> ---<br>
>   bare/config/devel/capstone-4.0.1-1.cfg | 27 +++++++++++<br>
>   bare/config/devel/capstone.bset        |  7 +++<br>
>   source-builder/config/capstone-1-1.cfg | 62 ++++++++++++++++++++++++++<br>
>   3 files changed, 96 insertions(+)<br>
>   create mode 100644 bare/config/devel/capstone-4.0.1-1.cfg<br>
>   create mode 100644 bare/config/devel/capstone.bset<br>
>   create mode 100644 source-builder/config/capstone-1-1.cfg<br>
> <br>
> diff --git a/bare/config/devel/capstone-4.0.1-1.cfg b/bare/config/devel/capstone-4.0.1-1.cfg<br>
> new file mode 100644<br>
> index 0000000..9f3627c<br>
> --- /dev/null<br>
> +++ b/bare/config/devel/capstone-4.0.1-1.cfg<br>
> @@ -0,0 +1,27 @@<br>
> +#<br>
> +# Capstone from Git<br>
> +#<br>
> +<br>
> +%if %{release} == %{nil}<br>
> + %define release 1<br>
> +%endif<br>
> +<br>
> +%include %{_configdir}/base.cfg<br>
> +<br>
> +%include %{_configdir}/bare-config.cfg<br>
> +<br>
> +#<br>
> +# Capstone Version.<br>
> +#<br>
> +%define capstone_version 4.0.1<br>
> +<br>
> +#<br>
> +# Set source from github.<br>
> +#<br>
> +%source set capstone --rsb-file=capstone-%{capstone_version}.tar.gz <a href="https://github.com/aquynh/capstone/archive/%%7Bcapstone_version%7D.tar.gz" rel="noreferrer noreferrer" target="_blank">https://github.com/aquynh/capstone/archive/%{capstone_version}.tar.gz</a><br>
> +%hash sha512 capstone-%{capstone_version}.tar.gz 43c52024065b41b45eff9423341db3f3d5163fa7aa01b360faa30437786740c8f2c34c36faa04dced5308e09d8bd78df3bad0ab9c06f98612169edb176f83c36<br>
> +<br>
> +#<br>
> +# The build instructions.<br>
> +#<br>
> +%include %{_configdir}/capstone-1-1.cfg<br>
> diff --git a/bare/config/devel/capstone.bset b/bare/config/devel/capstone.bset<br>
> new file mode 100644<br>
> index 0000000..d56406d<br>
> --- /dev/null<br>
> +++ b/bare/config/devel/capstone.bset<br>
> @@ -0,0 +1,7 @@<br>
> +#<br>
> +# Build set for Capstone Disassembler<br>
> +#<br>
> +<br>
> +%define release 1<br>
> +<br>
> +devel/capstone-4.0.1-1<br>
> diff --git a/source-builder/config/capstone-1-1.cfg b/source-builder/config/capstone-1-1.cfg<br>
> new file mode 100644<br>
> index 0000000..703fd54<br>
> --- /dev/null<br>
> +++ b/source-builder/config/capstone-1-1.cfg<br>
> @@ -0,0 +1,62 @@<br>
> +#<br>
> +#<br>
> +# This configuration file configure's, make's and install's CAPSTONE.<br>
> +#<br>
> +<br>
> +%if %{release} == %{nil}<br>
> +%define release 1<br>
> +%endif<br>
> +<br>
> +#<br>
> +# Select Snapshot Macro Maps<br>
> +#<br>
> +%select capstone-snapshot<br>
> +<br>
> +#<br>
> +# The description.<br>
> +#<br>
> +Name:      capstone-%{capstone_version}-%{_host}-%{release}<br>
> +Summary:   Capstone is light-weight multiplatform disassembler.<br>
> +Version:   %{capstone_version}<br>
> +Release:   %{release}<br>
> +URL:            <a href="http://www.capstone-engine.org/" rel="noreferrer noreferrer" target="_blank">http://www.capstone-engine.org/</a><br>
> +<br>
> +#<br>
> +# Source<br>
> +#<br>
> +%source set capstone <a href="https://github.com/aquynh/capstone/archive/capstone-%%7Bcapstone_version%7D.tar.gz" rel="noreferrer noreferrer" target="_blank">https://github.com/aquynh/capstone/archive/capstone-%{capstone_version}.tar.gz</a><br>
> +%hash sha512 capstone-%{capstone_version}.tar.gz 43c52024065b41b45eff9423341db3f3d5163fa7aa01b360faa30437786740c8f2c34c36faa04dced5308e09d8bd78df3bad0ab9c06f98612169edb176f83c36<br>
> +<br>
> +#<br>
> +# Prepare the source code.<br>
> +#<br>
> +%prep<br>
> +  build_top=$(pwd)<br>
> +<br>
> +  source_dir_capstone="capstone-%{capstone_version}"<br>
> +  %source setup capstone -q -n capstone-%{capstone_version}<br>
> +  %patch setup capstone -p1<br>
> +<br>
> +  cd ${build_top}<br>
> +<br>
> +%build<br>
> +  build_top=$(pwd)<br>
> +<br>
> +  %{build_directory}<br>
> +<br>
> +  cd ${source_dir_capstone}<br>
> +<br>
> +  %{__make} PREFIX=%{_prefix}<br>
> +<br>
> +  cd ${build_top}<br>
> +<br>
> +%install<br>
> +  build_top=$(pwd)<br>
> +<br>
> +  %{__rmdir} ${SB_BUILD_ROOT}<br>
> +<br>
> +  cd ${source_dir_capstone}<br>
> +<br>
> +  %{__make} DESTDIR=$SB_BUILD_ROOT PREFIX=%{_prefix} install<br>
> +<br>
> +  cd ${build_top}<br>
> <br>
</blockquote></div></div></div>