From 670bf0003ce9d856669d33b748827e3e3fd0958d Mon Sep 17 00:00:00 2001 From: zhoupengcheng Date: Wed, 9 Oct 2024 10:58:16 +0800 Subject: [PATCH] Check whether the lcap compilation option needs to be added. (cherry picked from commit 56a0e0b0e263eb18a4da7c690432068080aa3bd0) --- star.spec | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/star.spec b/star.spec index 7a0758b..cb2ad4d 100644 --- a/star.spec +++ b/star.spec @@ -8,7 +8,7 @@ Name: star Version: 1.6 -Release: 8 +Release: 9 Summary: An archiver supports ACL License: CDDL-1.0 URL: http://freecode.com/projects/%{name} @@ -59,6 +59,11 @@ for PLAT in %{arm} %{power64} aarch64 %{mips} x86_64 loongarch64 riscv64; do done %build +LCAP_FLAG="" +if pkg-config --exists 'libcap'; then + LCAP_FLAG="-lcap" +fi + %global make_flags GMAKE_NOWARN=true \\\ RUNPATH= \\\ LDPATH= \\\ @@ -68,7 +73,7 @@ done INS_RBASE=%{buildroot} \\\ INSTALL='sh $(SRCROOT)/conf/install-sh -c -m $(INSMODEINS)' \\\ COPTX="$RPM_OPT_FLAGS -DTRY_EXT2_FS" \\\ - LDOPTX="$RPM_LD_FLAGS" \\\ + LDOPTX="$RPM_LD_FLAGS $LCAP_FLAG" \\\ DEFCCOM=%{__cc} %make_build %make_flags @@ -134,6 +139,9 @@ fi %{_mandir}/man1/rmt.* %changelog +* Wed Oct 9 zhoupengcheng - 1.6-9 +- DESC:Check whether the lcap compilation option needs to be added. + * Thu Feb 22 2024 luofeng - 1.6-8 - Type:enhencement - CVE:NA