# Copyright (c) 2017 Dave Love, University of Manchester # MIT Licence, per Fedora policy. # Fixme: Provide versioned shared libs %global mbuild_commit 9eefb36a01167e56c4d58a924fbaf5ed9726bca8 %global mbuild_short %(c=%{mbuild_commit}; echo ${c:0:7}) Name: xed Version: 10.0 Release: 3%{?dist} Summary: Intel x86 encoder decoder License: ASL 2.0 URL: https://intelxed.github.io/ Source0: https://github.com/intelxed/xed/archive/v%version.tar.gz#/xed-%version.tar.gz Source1: https://github.com/intelxed/mbuild/tarball/%mbuild_commit/mbuild.tar.gz/mbuild.tar.gz %if 0%{?el6} BuildRequires: python27-python %else BuildRequires: python %endif BuildRequires: doxygen ExclusiveArch: x86_64 %ix86 %description The X86 Encoder Decoder (XED), is a software library (and associated headers) for encoding and decoding X86 (IA32 and Intel64) instructions. The decoder takes sequences of 1-15 bytes along with machine mode information and produces a data structure describing the opcode, operands, and flags. The encoder takes a similar data structure and produces a sequence of 1 to 15 bytes. Disassembly is essentially a printing pass on the data structure. %package devel Summary: Development files for %name Requires: %name%_isa = %version-%release %description devel Development files for %name. %prep %setup -q tar fx %SOURCE1 mv intelxed-mbuild-* mbuild %build %{?el6:export PATH=/opt/rh/python27/root/usr/bin:$PATH export LD_LIBRARY_PATH=/opt/rh/python27/root%_libdir} # --elf-dwarf doesn't do anything ./mfile.py --debug --extra-flags="%optflags" \ --extra-linkflags="%{?__global_ldflags}" ./mfile.py --shared --debug --extra-flags="%optflags" \ --extra-linkflags="%{?__global_ldflags}" %install %{?el6:export PATH=/opt/rh/python27/root/usr/bin:$PATH export LD_LIBRARY_PATH=/opt/rh/python27/root%_libdir} ./mfile.py install doc doc-build mkdir -p %buildroot{%_libdir,%_includedir,%_datadir/%name} cp -a kits/*/lib/*.so %buildroot%_libdir cp -a kits/*/lib/*.a %buildroot%_libdir cp -a kits/*/include/xed %buildroot%_includedir cp -a kits/*/misc/* %buildroot%_datadir/%name %files %license LICENSE %_libdir/*.so %_datadir/%name %files devel %_includedir/xed %doc examples kits/*/doc/ref-manual # required for hpctoolkit %_libdir/*.a %changelog * Sat Mar 10 2018 Dave Love - 10.0-3 - Build static library * Mon Dec 4 2017 Dave Love - 10.0-2 - Use python27 on el6 * Mon Dec 4 2017 - 10.0-1 - Initial packaging