Add .spec file and elfutils.
authorSlava Barinov <v.barinov@samsung.com>
Thu, 29 Sep 2016 06:52:00 +0000 (09:52 +0300)
committerDongkyun Son <dongkyun.s@samsung.com>
Wed, 14 Jun 2023 10:53:41 +0000 (19:53 +0900)
Static internal build of elfutils is needed since it's GPLv3 now and Tizen
package can't be upgraded due to license issues. The build is performed with
static archives only, no shared objects are produced to prevent possibility of
GPLv3 software introduction to platform.

Signed-off-by: Slava Barinov <v.barinov@samsung.com>
packaging/elfutils-0.168.tar.xz [new file with mode: 0644]
packaging/libabigail.spec [new file with mode: 0644]

diff --git a/packaging/elfutils-0.168.tar.xz b/packaging/elfutils-0.168.tar.xz
new file mode 100644 (file)
index 0000000..499d8e7
Binary files /dev/null and b/packaging/elfutils-0.168.tar.xz differ
diff --git a/packaging/libabigail.spec b/packaging/libabigail.spec
new file mode 100644 (file)
index 0000000..0b86030
--- /dev/null
@@ -0,0 +1,78 @@
+%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