Check whether the lcap compilation option needs to be added.

(cherry picked from commit 56a0e0b0e263eb18a4da7c690432068080aa3bd0)
This commit is contained in:
zhoupengcheng 2024-10-09 10:58:16 +08:00 committed by openeuler-sync-bot
parent 5a0dc0fce0
commit 670bf0003c

View File

@ -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 <zhoupengcheng11@huawei.com> - 1.6-9
- DESC:Check whether the lcap compilation option needs to be added.
* Thu Feb 22 2024 luofeng <luofeng13@huawei.com> - 1.6-8
- Type:enhencement
- CVE:NA