hosttools-binutils.spec 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. %{?!tool_name: %global tool_name hosttools}
  2. %global tool_prefix /opt/%{tool_name}
  3. Summary: A GNU collection of binary utilities
  4. Name: %{tool_name}-binutils
  5. Version: 2.38
  6. Release: 1
  7. License: GPLv3+
  8. URL: https://sourceware.org/binutils
  9. # Perl, sed and touch are all used in the %%prep section of this spec file.
  10. BuildRequires: gcc, make, perl, sed, coreutils, lzip, texinfo
  11. Source: https://ftp.gnu.org/gnu/binutils/binutils-%{version}.tar.lz
  12. %description
  13. Binutils is a collection of binary utilities, including ar (for
  14. creating, modifying and extracting from archives), as (a family of GNU
  15. assemblers), gprof (for displaying call graph profile data), ld (the
  16. GNU linker), nm (for listing symbols from object files), objcopy (for
  17. copying and translating object files), objdump (for displaying
  18. information from object files), ranlib (for generating an index for
  19. the contents of an archive), readelf (for displaying detailed
  20. information about binary files), size (for listing the section sizes
  21. of an object or archive file), strings (for listing printable strings
  22. from files), strip (for discarding symbols), and addr2line (for
  23. converting addresses to file and line).
  24. %prep
  25. %setup -q -n binutils-%{version}
  26. %build
  27. mkdir build-binutils
  28. cd build-binutils
  29. ../configure --prefix=%{tool_prefix} \
  30. --disable-multilib \
  31. --enable-lto \
  32. --disable-gold \
  33. --disable-nls
  34. make %{?_smp_mflags}
  35. %install
  36. cd build-binutils
  37. make DESTDIR=%{buildroot} install
  38. rm -f %{buildroot}%{tool_prefix}/share/info/dir
  39. rm -rf %{buildroot}%{tool_prefix}/share/man/man7
  40. find %{buildroot} -name '*.la' -delete
  41. %files
  42. %{tool_prefix}/bin/*
  43. %{tool_prefix}/lib/*
  44. %{tool_prefix}/include/*
  45. %{tool_prefix}/x86_64-pc-linux-gnu/bin/*
  46. %{tool_prefix}/x86_64-pc-linux-gnu/lib/ldscripts
  47. %{tool_prefix}/share/info/*
  48. %{tool_prefix}/share/man/man1/*