From d0aabf43033bb9c1fb01ad288105e76c4b396b35 Mon Sep 17 00:00:00 2001 From: yixiangzhike Date: Fri, 17 Jun 2022 17:39:38 +0800 Subject: [PATCH] Add the macro enable_with_golang to control whether to compile the go code Signed-off-by: yixiangzhike --- libcap.spec | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/libcap.spec b/libcap.spec index ee2fedb..ef44469 100644 --- a/libcap.spec +++ b/libcap.spec @@ -1,6 +1,10 @@ +# Some commands like captree are provided by go code, +# turn on the macro enable_with_golang if they are needed. +%define enable_with_golang 0 + Name: libcap Version: 2.61 -Release: 1 +Release: 2 Summary: A library for getting and setting POSIX.1e draft 15 capabilities License: GPLv2 URL: https://sites.google.com/site/fullycapable @@ -9,6 +13,9 @@ Source0: https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/%{n Patch0: libcap-buildflags.patch BuildRequires: libattr-devel pam-devel perl-interpreter gcc +%if 0%{?enable_with_golang} +BuildRequires: golang +%endif %description This is a library for getting and setting POSIX.1e (formerly POSIX 6) @@ -70,6 +77,9 @@ chmod +x %{buildroot}/%{_libdir}/*.so.* %{_mandir}/man8/*.gz %changelog +* Fri Jun 17 2022 yixiangzhike - 2.61-2 +- add the macro enable_with_golang to control whether to compile the go code + * Fri Dec 24 2021 yixiangzhike - 2.61-1 - update to 2.61 -- Gitee