[packages/mupdf] add static_libs bcond
atler
atler at pld-linux.org
Thu Nov 16 02:23:12 CET 2023
commit 36351076f3ba7dc6d7a1151ec55d2835a27845f5
Author: Jan Palus <atler at pld-linux.org>
Date: Thu Nov 16 00:10:27 2023 +0100
add static_libs bcond
mupdf.spec | 10 ++++++++++
1 file changed, 10 insertions(+)
---
diff --git a/mupdf.spec b/mupdf.spec
index 0b1fae0..3af16c6 100644
--- a/mupdf.spec
+++ b/mupdf.spec
@@ -1,3 +1,7 @@
+#
+# Conditional build:
+%bcond_without static_libs # static library
+
Summary: MuPDF - lightweight PDF, XPS and CBZ viewer and parser/rendering library
Summary(pl.UTF-8): MuPDF - lekka przeglądarka PDF, XPS, CBZ
Name: mupdf
@@ -117,6 +121,7 @@ Statyczne biblioteki MuPDF.
# lcms2 - "art" fork with tread safety
%build
+%if %{with static_libs}
CFLAGS="%{rpmcflags} %{rpmcppflags}" \
LDFLAGS="%{rpmldflags}" \
%{__make} -j1 \
@@ -128,6 +133,7 @@ LDFLAGS="%{rpmldflags}" \
build=release \
libdir=%{_libdir} \
verbose=yes
+%endif
CFLAGS="%{rpmcflags} %{rpmcppflags}" \
LDFLAGS="%{rpmldflags}" \
@@ -147,6 +153,7 @@ sphinx-build -M html docs/src build/docs
%install
rm -rf $RPM_BUILD_ROOT
+%if %{with static_libs}
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT \
USE_SYSTEM_LIBS=yes \
@@ -154,6 +161,7 @@ rm -rf $RPM_BUILD_ROOT
build=release \
prefix=%{_prefix} \
libdir=%{_libdir}
+%endif
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT \
@@ -192,7 +200,9 @@ rm -rf $RPM_BUILD_ROOT
%defattr(644,root,root,755)
%{_includedir}/mupdf
+%if %{with static_libs}
%files static
%defattr(644,root,root,755)
%{_libdir}/libmupdf.a
%{_libdir}/libmupdf-third.a
+%endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/mupdf.git/commitdiff/6b9d074572144014d8da2c463d788b1f1c545c5f
More information about the pld-cvs-commit
mailing list