[packages/LIEF] new
atler
atler at pld-linux.org
Sat Nov 7 01:48:52 CET 2026
commit 42c9beba8fd6ff3ff83149f2fc0205c350aef48f
Author: Jan Palus <atler at pld-linux.org>
Date: Sat Nov 7 01:48:19 2026 +0100
new
LIEF.spec | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 83 insertions(+)
---
diff --git a/LIEF.spec b/LIEF.spec
new file mode 100644
index 0000000..6c910d1
--- /dev/null
+++ b/LIEF.spec
@@ -0,0 +1,83 @@
+#
+# Conditional build:
+%bcond_without system_spdlog # system spdlog (requires spdlog built with libfmt)
+
+Summary: Library to Instrument Executable Formats
+Name: LIEF
+Version: 1.0.0
+Release: 1
+License: Apache v2.0
+Group: Libraries
+Source0: https://github.com/lief-project/LIEF/archive/%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: 6a572300cc303769ef023cf1d16684ab
+URL: https://lief.re/
+BuildRequires: cmake >= 3.24
+BuildRequires: frozen-devel
+BuildRequires: libstdc++-devel >= 6:8
+BuildRequires: nlohmann-json-devel
+%{?with_system_spdlog:BuildRequires: spdlog-devel >= 1:1.17.0}
+BuildRequires: rpmbuild(macros) >= 2.047
+BuildRequires: utf8cpp-devel
+%{?with_system_spdlog:Requires: spdlog >= 1:1.17.0}
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+The purpose of this project is to provide a cross-platform library to
+parse, modify and abstract ELF, PE and MachO formats.
+
+Main features:
+- Parsing: LIEF can parse ELF, PE, MachO, COFF, OAT, DEX, VDEX, ART
+ and provides a user-friendly API to access their internals.
+- Modify: LIEF can be used to modify some parts of these formats
+ (adding a section, changing a symbol's name, ...)
+- Abstract: Three formats have common features like sections, symbols,
+ entry point... LIEF factors them.
+- API: You can use LIEF via C++, Python, Rust, and Node.js
+
+%package devel
+Summary: Header files for LIEF library
+Group: Development/Libraries
+Requires: %{name}%{?_isa} = %{version}-%{release}
+Requires: libstdc++-devel%{?_isa} >= 6:8
+
+%description devel
+Header files for LIEF library.
+
+%prep
+%setup -q
+
+%build
+%cmake -B build \
+ -DLIEF_EXAMPLES=OFF \
+ -DLIEF_EXTERNAL_SPDLOG=%{__ON_OFF system_spdlog} \
+ -DLIEF_OPT_FROZEN_EXTERNAL=ON \
+ -DLIEF_OPT_NLOHMANN_JSON_EXTERNAL=ON \
+ -DLIEF_SO_VERSION=ON \
+ -DLIEF_USE_CCACHE=OFF
+
+%{__make} -C build
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} -C build install \
+ DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc AUTHORS CHANGELOG README.md
+%{_libdir}/libLIEF.so.*.*.*
+%ghost %{_libdir}/libLIEF.so.1
+
+%files devel
+%defattr(644,root,root,755)
+%{_libdir}/libLIEF.so
+%{_includedir}/LIEF
+%{_libdir}/cmake/LIEF
+%{_pkgconfigdir}/LIEF.pc
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/LIEF.git/commitdiff/42c9beba8fd6ff3ff83149f2fc0205c350aef48f
More information about the pld-cvs-commit
mailing list