Check whether the lcap compilation option needs to be added.

This commit is contained in:
zhoupengcheng 2024-10-09 11:05:25 +08:00
parent 2dd476bdc5
commit 530729e8ea

View File

@ -8,9 +8,9 @@
Name: star
Version: 1.6
Release: 2
Release: 4
Summary: An archiver supports ACL
License: CDDL
License: CDDL-1.0
URL: http://freecode.com/projects/%{name}
Source: http://downloads.sourceforge.net/s-tar/%{name}-%{version}.tar.bz2
@ -55,6 +55,11 @@ for PLAT in %{arm} %{power64} aarch64 %{mips} x86_64; do
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,6 +135,12 @@ fi
%{_mandir}/man1/rmt.*
%changelog
* Wed Oct 9 zhoupengcheng <zhoupengcheng11@huawei.com> - 1.6-4
- DESC:Check whether the lcap compilation option needs to be added.
* Tue Jun 28 2022 Chenyx <chenyixiong3@huawei.com> - 1.6-3
- License compliance rectification
* Fri Dec 25 2020 Liquor<lirui130@huawei.com> - 1.6-2
- add package star-help to package star