[packages/jemalloc] add static_libs bcond

atler atler at pld-linux.org
Mon May 25 13:42:20 CEST 2026


commit 4a3b12681d03808196ad4d69d931b95bf4f148f5
Author: Jan Palus <atler at pld-linux.org>
Date:   Mon May 25 13:41:46 2026 +0200

    add static_libs bcond

 jemalloc.spec | 8 ++++++++
 1 file changed, 8 insertions(+)
---
diff --git a/jemalloc.spec b/jemalloc.spec
index dcd8582..672377c 100644
--- a/jemalloc.spec
+++ b/jemalloc.spec
@@ -1,3 +1,7 @@
+#
+# Conditional build:
+%bcond_without	static_libs	# static libraries
+
 Summary:	General-purpose scalable concurrent malloc implementation
 Summary(pl.UTF-8):	Ogólnego przeznaczenia, skalowalna, współbieżna implementacja funkcji malloc
 Name:		jemalloc
@@ -10,6 +14,7 @@ Source0:	https://github.com/jemalloc/jemalloc/releases/download/%{version}/%{nam
 # Source0-md5:	2b183326fcff2c087efd7efc0a808ba2
 URL:		http://jemalloc.net/
 BuildRequires:	libxslt-progs
+BuildRequires:	rpmbuild(macros) >= 1.527
 BuildRequires:	sed >= 4.0
 # list from include/jemalloc/internal/jemalloc_internal.h.in
 # https://github.com/jemalloc/jemalloc/blob/3.6.0/include/jemalloc/internal/jemalloc_internal.h.in#L239
@@ -67,6 +72,7 @@ cp -p VERSION version
 # enable GNU+C99 standard (C99 for restrict keyword, GNU for asm)
 CFLAGS="%{rpmcflags} -std=gnu99"
 %configure \
+	%{__enable_disable static_libs static} \
 	--with-jemalloc-prefix=je_
 
 %{__make}
@@ -109,7 +115,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_pkgconfigdir}/jemalloc.pc
 %{_mandir}/man3/jemalloc.3*
 
+%if %{with static_libs}
 %files static
 %defattr(644,root,root,755)
 %{_libdir}/libjemalloc.a
 %{_libdir}/libjemalloc_pic.a
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/jemalloc.git/commitdiff/4a3b12681d03808196ad4d69d931b95bf4f148f5



More information about the pld-cvs-commit mailing list