!36 [sync] PR-33: Check whether the lcap compilation option needs to be added.

From: @openeuler-sync-bot 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
This commit is contained in:
openeuler-ci-bot 2024-10-09 09:46:45 +00:00 committed by Gitee
commit 8c05a3d8a5
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

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