Blob Blame History Raw
# spec file for package acl
# Copyright (c) 2024 SUSE LLC
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

# Ring0 does not have system-user-bin/system-user-daemon
%bcond_without acl_tests

Name:           acl
%define lname	libacl1
Summary:        Commands for Manipulating POSIX Access Control Lists
License:        GPL-2.0-or-later AND LGPL-2.1-or-later
Group:          System/Filesystems
Version:        2.3.2
Release:        0
#Git-Clone:	git://
Source2:        baselibs.conf
Source3:        %name.keyring

BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  gettext-tools-mini
BuildRequires:  libattr-devel
BuildRequires:  libtool
BuildRequires:  pkg-config
%if %{with acl_tests} && 0%{?suse_version} > 1320
BuildRequires:  user(bin)
BuildRequires:  user(daemon)

getfacl and setfacl commands for retrieving and setting POSIX access
control lists.

%package -n %lname
Summary:        A dynamic library for accessing POSIX Access Control Lists
Group:          System/Libraries
%ifarch ppc64
# bug437293
Obsoletes:      libacl-64bit
# Added for 12.1
Provides:       libacl = %version-%release
Obsoletes:      libacl < %version-%release

%description -n %lname
This package contains the dynamic library which contains the
POSIX 1003.1e draft standard 17 functions for manipulating access
control lists.

%package -n libacl-devel
Summary:        Header files for the POSIX ACL library
Group:          Development/Libraries/C and C++
Requires:       %lname = %version
Requires:       glibc-devel
Provides:       acl-devel = %version
Obsoletes:      acl-devel < %version
%ifarch ppc64
# bug437293
Obsoletes:      libacl-devel-64bit

%description -n libacl-devel
This package contains all necessary include files and libraries needed
to develop applications that require libacl.

%setup -q

autoreconf -fi

# Disable -D_FORTIFY_SOURCE=3 for now
# as explained here:
%global optflags %(echo %{optflags} | sed 's/-D_FORTIFY_SOURCE=3/-D_FORTIFY_SOURCE=2/')

export OPTIMIZER="%optflags -fPIC"

%ifarch %ix86 i586
export CFLAGS="%optflags -D_FILE_OFFSET_BITS=64"

%configure \
	--disable-static \
make %{?_smp_mflags} V=1

%if %{with acl_tests}
    if ./setfacl -m u:`id -u`:rwx .; then
        make check || (cat test-suite.log ; false)
        echo '*** ACLs are probably not supported by the file system,' \
             'the test-suite will NOT run ***'

rm -v %buildroot/%_libdir/
rm -rvf %buildroot/%_defaultdocdir/%name
%find_lang %name

%post -n %lname -p /sbin/ldconfig

%postun -n %lname -p /sbin/ldconfig

%files -f %name.lang
%license doc/COPYING
%doc doc/extensions.txt doc/libacl.txt doc/CHANGES

%files -n libacl-devel

%files -n %lname
%license doc/COPYING.LGPL