diff --git a/psmisc.spec b/psmisc.spec index 625c027..52e0d4b 100644 --- a/psmisc.spec +++ b/psmisc.spec @@ -15,6 +15,7 @@ # Please submit bugfixes or comments via https://bugs.opensuse.org/ # +%bcond_without apparmor Name: psmisc BuildRequires: autoconf @@ -27,7 +28,9 @@ BuildRequires: libselinux-devel BuildRequires: linux-glibc-devel >= 4.12 BuildRequires: ncurses-devel BuildRequires: netcat-openbsd +%if %{with appamor} BuildRequires: pkgconfig(libapparmor) +%endif URL: https://gitlab.com/psmisc/psmisc/ Version: 23.6 Release: 0 @@ -74,7 +77,7 @@ CC=gcc export CFLAGS CXXFLAGS LDFLAGS CC %configure --disable-rpath \ --with-gnu-ld \ - --enable-apparmor \ + %{?with_apparmor:--enable-apparmor} \ --enable-selinux make %{?_smp_mflags} CFLAGS="$CFLAGS" "CC=$CC"