--- /dev/null
+%define elfutils_ver 0.168
+%define elfutils_dir %{_builddir}/elfutils
+
+Name: libabigail
+BuildRequires: autoconf automake libtool pkgconfig(libxml-2.0)
+BuildRequires: bison
+BuildRequires: bzip2-devel
+BuildRequires: flex
+BuildRequires: xz-devel
+BuildRequires: zlib-devel
+BuildRequires: zip
+Summary: The ABI Generic Analysis and Instrumentation Library
+License: LGPL-3.0
+Group: Development/Building
+Version: 1.0
+Release: 0
+Source0: %name-%version.src.tar.gz
+Source1: elfutils-%{elfutils_ver}.tar.xz
+Url: https://www.sourceware.org/libabigail/
+ExclusiveArch: x86_64
+
+%description
+This project aims at providing a C++ library for constructing, manipulating,
+serializing and de-serializing ABI-relevant artifacts. The set of artifacts that
+we are interested in is made of constructions like types, variables, functions
+and declarations of a given library or program. For a given program or library,
+this set of constructions is called an ABI corpus.
+
+Thus the project aims at providing a library to manipulate ABI corpora, compare
+them, provide detailed information about their differences and help build tools
+to infer interesting conclusions about these differences.
+
+%prep
+%setup -q -n %{name}-%{version}
+%setup -q -b 1
+
+%build
+# Internal fresh GPLv3 elfutils may only be used inside build environment
+#
+# DO NOT EXPORT THESE BINARIES
+#
+pushd %{_builddir}/elfutils-%{elfutils_ver}
+%reconfigure \
+ --program-prefix=eu- \
+ --enable-maintainer-mode \
+ --disable-dependency-tracking
+%{__make} %{?_smp_flags} V=1
+%{__make} DESTDIR=%{elfutils_dir} install
+
+# Now remove shared objects to force static link
+find %{elfutils_dir} -name '*.so' -delete
+popd
+
+# Add path to elfutils static ibraries
+export CPPFLAGS="-I%{elfutils_dir}%{_includedir}"
+export LDFLAGS="-L%{elfutils_dir}%{_libdir} -Wl,--as-needed"
+export LIBS="-ldw -lelf -lebl -ldl -lbz2 -lz -llzma"
+
+%reconfigure \
+ --disable-shared \
+ --disable-dependency-tracking \
+ --enable-rpm=yes \
+ --enable-deb=no \
+ --enable-cxx11=yes
+
+%{__make} %{?_smp_mflags} V=1
+
+%install
+%{__make} DESTDIR=$RPM_BUILD_ROOT install
+rm -rf $RPM_BUILD_ROOT%{_includedir} $RPM_BUILD_ROOT%{_libdir}
+rm -f $RPM_BUILD_ROOT/usr/share/aclocal/abigail.m4
+
+%files
+%defattr(-,root,root)
+%license COPYING*
+%attr(755,root,root)
+%{_bindir}/abi*
+%{_bindir}/kmidiff