Check whether the lcap compilation option needs to be added.

(cherry picked from commit 4ca5b511be2f9a08ae96bbf21af9bddc5092c239)
This commit is contained in:
zhoupengcheng 2024-10-09 11:22:04 +08:00 committed by openeuler-sync-bot
parent 4490029416
commit 95dc2f5dd7

View File

@ -8,9 +8,9 @@
Name: star
Version: 1.6
Release: 7
Release: 9
Summary: An archiver supports ACL
License: CDDL
License: CDDL-1.0
URL: http://freecode.com/projects/%{name}
Source: https://fossies.org/linux/misc/%{name}-%{version}.tar.bz2
@ -55,6 +55,11 @@ for PLAT in %{arm} %{power64} aarch64 loongarch64 %{mips} x86_64 riscv64 sw_64;
done
%build
LCAP_FLAG=""
if pkg-config --exists 'libcap'; then
LCAP_FLAG="-lcap"
fi
%global make_flags GMAKE_NOWARN=true \\\
RUNPATH= \\\
LDPATH= \\\
@ -64,7 +69,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=gcc
%make_build %make_flags
@ -130,7 +135,13 @@ fi
%{_mandir}/man1/rmt.*
%changelog
Fri Aug 11 2023 yeqinglong <yeqinglong@kylinsec.com.cn> - 1.6-7
* Wed Oct 9 zhoupengcheng <zhoupengcheng11@huawei.com> - 1.6-9
- DESC:Check whether the lcap compilation option needs to be added.
* Tue Jun 28 2022 Chenyx <chenyixiong3@huawei.com> - 1.6-8
- License compliance rectification
* Fri Aug 11 2023 yeqinglong <yeqinglong@kylinsec.com.cn> - 1.6-7
- add sw_64 support
* Mon Nov 21 2022 huajingyun <huajingyun@loongson.cn> - 1.6-6