%define libname libelf %define _program_prefix eu- Name: elfutils Version: 0.160 Release: 1mamba Summary: A collection of utilities and DSOs to handle compiled objects Group: Development/Tools Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco URL: htpps://fedorahosted.org/elfutils/ Source: https://fedorahosted.org/releases/e/l/elfutils/%{version}/elfutils-%{version}.tar.bz2 # NOTE: manual intervetion needed for updates, upstream files don't have version in name Patch1: https://fedorahosted.org/releases/e/l/elfutils/%{version}/elfutils-0.158-robustify.patch Patch2: https://fedorahosted.org/releases/e/l/elfutils/%{version}/elfutils-%{version}-portability.patch Patch3: %{name}-0.131-strip-copy-symtab.patch Patch4: %{name}-0.131-gcc43.patch Patch5: %{name}-0.131-off64_t.patch License: Open Software License ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel ## AUTOBUILDREQ-END BuildRequires: gettext-devel BuildRequires: gcc >= 3.4 BuildRequires: bison >= 1.875 BuildRequires: flex >= 2.5.4a BuildRequires: bzip2 Requires: %{libname} = %{version}-%{release} BuildRoot: %{_tmppath}/%{name}-%{version}-root %description Elfutils is a collection of utilities, including: * nm (for listing symbols from object files) * size (for listing the section sizes of an object or archive file) * strip (for discarding symbols) * readelf (to see the raw ELF file structures) * elflint (to check for well-formed ELF files) Also included are numerous helper libraries which implement DWARF, ELF, and machine-specific ELF handling. %package -n %{libname} Summary: Library to read and write ELF files Group: System/Libraries Provides: elfutils-libelf Obsoletes: elfutils-libelf %description -n %{libname} The %{libname} package provides a DSO which allows reading and writing ELF files on a high level. Third party programs depend on this package to read internals of ELF files. The programs of the %{name} package use it also to generate new ELF files. %package -n %{libname}-devel Summary: Development support for libelf Group: Development/Libraries Requires: %{libname} = %{version}-%{release} Provides: elfutils-libelf-devel Obsoletes: elfutils-libelf-devel %description -n %{libname}-devel The %{libname}-devel package contains the libraries to create applications for handling compiled objects. Libelf allows you to access the internals of the ELF object file format, so you can see the different sections of an ELF file. %package -n libdw Summary: A library that provides access to DWARF debug information stored inside ELF files Group: System/Libraries %description -n libdw The %{libname} package provides a DSO which allows reading and writing ELF files on a high level. libdw provides access to DWARF debug information stored inside ELF files. %package -n libdw-devel Summary: Development support for libdw Group: Development/Libraries Requires: %{libname} = %{version}-%{release} Provides: elfutils-devel Obsoletes: elfutils-devel %description -n libdw-devel The %{libname}-devel package contains the libraries to create applications for handling compiled objects. libdw provides access to DWARF debug information stored inside ELF files. %prep %setup -q #%patch3 -p1 %patch2 -p1 #%patch1 -p1 #%patch5 -p1 #sed -i "s|-Werror||" src/Makefile.in tests/Makefile.in libelf/Makefile.in %build RPM_OPT_FLAGS="${RPM_OPT_FLAGS/-Wall/}" %configure \ --program-prefix=%{_program_prefix} \ CFLAGS="$RPM_OPT_FLAGS -fexceptions -D__NO_INLINE__" %if "%{_host}" == "%{_build}" %make %{?_smp_mflags} %ifnarch arm %make check %endif %else make CC=%{_build}-gcc -C lib libeu.a make CC=%{_build}-gcc -C libcpu i386_gendis mv libcpu/i386_gendis libcpu/i386_gendis.build sed -i "s|\./i386_gendis|./i386_gendis.build|" libcpu/Makefile make -C libcpu clean make -C lib clean %make || %make %endif %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %makeinstall chmod +x %{buildroot}%{_libdir}/lib*.so* chmod +x %{buildroot}%{_libdir}/%{name}/lib*.so* # Remove unpackaged files rm -f %{buildroot}%{_bindir}/%{_program_prefix}{ld,objdump} rm -f %{buildroot}%{_includedir}/%{name}/libasm.h rm -f %{buildroot}%{_libdir}/libasm-%{version}.so rm -f %{buildroot}%{_libdir}/libasm.{a,so,so.*} %find_lang %{name} %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %post -n %{libname} -p /sbin/ldconfig %postun -n %{libname} -p /sbin/ldconfig %files -f %{name}.lang %defattr(-,root,root) %{_bindir}/%{_program_prefix}ar %{_bindir}/%{_program_prefix}make-debug-archive %{_bindir}/%{_program_prefix}elflint %{_bindir}/%{_program_prefix}nm %{_bindir}/%{_program_prefix}readelf %{_bindir}/%{_program_prefix}size %{_bindir}/%{_program_prefix}stack %{_bindir}/%{_program_prefix}strip %{_bindir}/%{_program_prefix}unstrip %{_bindir}/%{_program_prefix}findtextrel %{_bindir}/%{_program_prefix}addr2line %{_bindir}/%{_program_prefix}elfcmp %{_bindir}/%{_program_prefix}ranlib %{_bindir}/%{_program_prefix}strings %files -n libdw %defattr(-,root,root) %{_libdir}/libdw-%{version}.so %{_libdir}/libdw.so.* %dir %{_libdir}/%{name} %{_libdir}/%{name}/lib*.so %doc AUTHORS COPYING %files -n libdw-devel %defattr(-,root,root) %{_includedir}/dwarf.h %dir %{_includedir}/%{name} %{_includedir}/%{name}/elf-knowledge.h %{_includedir}/%{name}/libebl.h %{_includedir}/%{name}/libdw.h %{_includedir}/%{name}/libdwelf.h %{_includedir}/%{name}/libdwfl.h %{_includedir}/%{name}/version.h %{_libdir}/libebl.a %{_libdir}/libdw.a %{_libdir}/libdw.so %doc ChangeLog NEWS README THANKS TODO %files -n %{libname} %defattr(-,root,root) %{_libdir}/libelf-%{version}.so %{_libdir}/libelf.so.* %files -n %{libname}-devel %defattr(-,root,root) %{_includedir}/libelf.h %{_includedir}/gelf.h %{_includedir}/nlist.h %{_libdir}/libelf.a %{_libdir}/libelf.so %changelog * Thu Nov 06 2014 Automatic Build System 0.160-1mamba - automatic version update by autodist * Mon Sep 01 2014 Silvan Calarco 0.159-2mamba - move libdw stuff to libdw and libdw-devel new subpackages * Mon Jul 14 2014 Silvan Calarco 0.159-1mamba - update to 0.159 * Sat Feb 22 2014 Silvan Calarco 0.158-1mamba - update to 0.158 * Sat Nov 09 2013 Automatic Build System 0.157-1mamba - automatic version update by autodist * Mon Sep 23 2013 Automatic Build System 0.156-1mamba - automatic version update by autodist * Sat Dec 01 2012 Automatic Build System 0.155-1mamba - update to 0.155 * Wed Jan 12 2011 Automatic Build System 0.148-2mamba - automatic update by autodist * Sun Nov 21 2010 Automatic Build System 0.148-1mamba - automatic update by autodist * Wed Jun 16 2010 Silvan Calarco 0.147-1mamba - update to 0.147 * Mon Apr 12 2010 Silvan Calarco 0.145-1mamba - update to 0.145 * Wed Jul 01 2009 Automatic Build System 0.141-1mamba - update to 0.141 * Tue Feb 17 2009 Silvan Calarco 0.131-2mamba - add off64_t patch * Sun May 18 2008 Silvan Calarco 0.131-1mamba - update to 0.131 - rename elfutils-libelf to libelf and obsolete old package names * Tue Feb 28 2006 Stefano Cotta Ramusino 0.119-2qilnx - added portability patch * Mon Feb 27 2006 Stefano Cotta Ramusino 0.119-1qilnx - update to version 0.119 by autospec - fixed source URL - fixed license * Tue Jan 03 2006 Davide Madrisan 0.118-1qilnx - package created by autospec