File acl.spec of Package acl

#
# spec file for package acl (Version 2.2.47)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#

# norootforbuild


Name:           acl
BuildRequires:  libattr-devel
Group:          System/Filesystems
AutoReqProv:    on
Summary:        Commands for Manipulating POSIX Access Control Lists
Version:        2.2.47
Release:        27.<RELEASE10>
Source:         %name-%version.src.tar.bz2
Patch0:         builddefs.in.diff
Patch1:         walk-tree-fix-for-deref.patch
Patch2:         null-pointer-access.diff
Patch3:         acl-Introduce-new-WALK_TREE_DEREFERENCE_TOPLEVEL-flag.patch
Patch4:         acl-Make-sure-that-getfacl-R-only-calls-stat-2-on-symlin.patch
Url:            ftp://oss.sgi.com/projects/xfs/cmd_tars
License:        GPL v2 or later
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

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



Authors:
--------
    Andreas Gruenbacher <a.gruenbacher@computer.org>
    SGI

%package -n libacl
License:        GPL v2 or later; LGPL v2.1 or later
Summary:        A dynamic library for accessing POSIX Access Control Lists
Group:          System/Libraries
# bug437293
%ifarch ppc64
Obsoletes:      libacl-64bit
%endif
%ifarch  ppc
Obsoletes:      libacl-32bit
%endif
#

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



Authors:
--------
    Andreas Gruenbacher <a.gruenbacher@computer.org>
    SGI

%package -n libacl-devel
License:        GPL v2 or later; LGPL v2.1 or later
Summary:        Include Files and Libraries mandatory for Development
AutoReqProv:    on
Group:          Development/Libraries/C and C++
Requires:       libacl = %{version} libattr-devel
Provides:       acl-devel
Obsoletes:      acl-devel
# bug437293
%ifarch ppc64
Obsoletes:      libacl-devel-64bit
%endif
%ifarch  ppc
Obsoletes:      libacl-devel-32bit
%endif
#

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



Authors:
--------
    SGI

%prep
%setup -n acl-%version
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1

%build
export OPTIMIZER="$RPM_OPT_FLAGS -fPIC"
export DEBUG=-DNDEBUG
aclocal --acdir=m4
autoconf
CFLAGS="$RPM_OPT_FLAGS"
./configure \
	--prefix=/ \
	--exec-prefix=/ \
	--sbindir=/bin \
	--bindir=%{_bindir} \
	--mandir=%{_mandir} \
	--includedir=%{_includedir} \
	--libdir=/%{_lib} \
	--datadir=/usr/share \
	--libexecdir=%{_libdir}
make

%install
DIST_ROOT="$RPM_BUILD_ROOT"
DIST_INSTALL=`pwd`/install.manifest
DIST_INSTALL_DEV=`pwd`/install-dev.manifest
DIST_INSTALL_LIB=`pwd`/install-lib.manifest
export DIST_ROOT DIST_INSTALL DIST_INSTALL_DEV DIST_INSTALL_LIB
/usr/bin/make install DIST_MANIFEST="$DIST_INSTALL"
/usr/bin/make install-dev DIST_MANIFEST="$DIST_INSTALL_DEV"
/usr/bin/make install-lib DIST_MANIFEST="$DIST_INSTALL_LIB"
ln -sf /%{_lib}/$(readlink $RPM_BUILD_ROOT/%{_lib}/libacl.so) \
	$RPM_BUILD_ROOT/%{_libdir}/libacl.so
rm -f $RPM_BUILD_ROOT/%{_libdir}/libacl.la
rm -f $RPM_BUILD_ROOT/%{_lib}/libacl.{a,la,so}
%find_lang %name

%clean
[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT

%post -n libacl -p /sbin/ldconfig

%postun -n libacl -p /sbin/ldconfig

%files -f %name.lang
%defattr(-,root,root)
%attr(755,root,root) %{_bindir}/chacl
%attr(755,root,root) %{_bindir}/getfacl
%attr(755,root,root) %{_bindir}/setfacl
%dir %attr(755,root,root) /usr/share/doc/packages/acl
%doc %attr(644,root,root) /usr/share/doc/packages/acl/CHANGES.gz
%doc %attr(644,root,root) /usr/share/doc/packages/acl/COPYING
%doc %attr(644,root,root) /usr/share/doc/packages/acl/PORTING
%doc %attr(644,root,root) /usr/share/doc/packages/acl/README
%doc %attr(644,root,root) %{_mandir}/man1/chacl.1.gz
%doc %attr(644,root,root) %{_mandir}/man1/getfacl.1.gz
%doc %attr(644,root,root) %{_mandir}/man1/setfacl.1.gz
%doc %attr(644,root,root) %{_mandir}/man5/acl.5.gz

%files -n libacl-devel
%defattr(-,root,root)
%dir %attr(755,root,root) %{_includedir}/acl
%attr(644,root,root) %{_includedir}/acl/libacl.h
%attr(644,root,root) %{_includedir}/sys/acl.h
%attr(644,root,root) %{_libdir}/libacl.a
%attr(755,root,root) %{_libdir}/libacl.so
%doc %attr(644,root,root) %{_mandir}/man3/acl_add_perm.3.gz
%doc %attr(644,root,root) %{_mandir}/man3/acl_calc_mask.3.gz
%doc %attr(644,root,root) %{_mandir}/man3/acl_check.3.gz
%doc %attr(644,root,root) %{_mandir}/man3/acl_clear_perms.3.gz
%doc %attr(644,root,root) %{_mandir}/man3/acl_cmp.3.gz
%doc %attr(644,root,root) %{_mandir}/man3/acl_copy_entry.3.gz
%doc %attr(644,root,root) %{_mandir}/man3/acl_copy_ext.3.gz
%doc %attr(644,root,root) %{_mandir}/man3/acl_copy_int.3.gz
%doc %attr(644,root,root) %{_mandir}/man3/acl_create_entry.3.gz
%doc %attr(644,root,root) %{_mandir}/man3/acl_delete_def_file.3.gz
%doc %attr(644,root,root) %{_mandir}/man3/acl_delete_entry.3.gz
%doc %attr(644,root,root) %{_mandir}/man3/acl_delete_perm.3.gz
%doc %attr(644,root,root) %{_mandir}/man3/acl_dup.3.gz
%doc %attr(644,root,root) %{_mandir}/man3/acl_entries.3.gz
%doc %attr(644,root,root) %{_mandir}/man3/acl_equiv_mode.3.gz
%doc %attr(644,root,root) %{_mandir}/man3/acl_error.3.gz
%doc %attr(644,root,root) %{_mandir}/man3/acl_extended_fd.3.gz
%doc %attr(644,root,root) %{_mandir}/man3/acl_extended_file.3.gz
%doc %attr(644,root,root) %{_mandir}/man3/acl_free.3.gz
%doc %attr(644,root,root) %{_mandir}/man3/acl_from_mode.3.gz
%doc %attr(644,root,root) %{_mandir}/man3/acl_from_text.3.gz
%doc %attr(644,root,root) %{_mandir}/man3/acl_get_entry.3.gz
%doc %attr(644,root,root) %{_mandir}/man3/acl_get_fd.3.gz
%doc %attr(644,root,root) %{_mandir}/man3/acl_get_file.3.gz
%doc %attr(644,root,root) %{_mandir}/man3/acl_get_perm.3.gz
%doc %attr(644,root,root) %{_mandir}/man3/acl_get_permset.3.gz
%doc %attr(644,root,root) %{_mandir}/man3/acl_get_qualifier.3.gz
%doc %attr(644,root,root) %{_mandir}/man3/acl_get_tag_type.3.gz
%doc %attr(644,root,root) %{_mandir}/man3/acl_init.3.gz
%doc %attr(644,root,root) %{_mandir}/man3/acl_set_fd.3.gz
%doc %attr(644,root,root) %{_mandir}/man3/acl_set_file.3.gz
%doc %attr(644,root,root) %{_mandir}/man3/acl_set_permset.3.gz
%doc %attr(644,root,root) %{_mandir}/man3/acl_set_qualifier.3.gz
%doc %attr(644,root,root) %{_mandir}/man3/acl_set_tag_type.3.gz
%doc %attr(644,root,root) %{_mandir}/man3/acl_size.3.gz
%doc %attr(644,root,root) %{_mandir}/man3/acl_to_any_text.3.gz
%doc %attr(644,root,root) %{_mandir}/man3/acl_to_text.3.gz
%doc %attr(644,root,root) %{_mandir}/man3/acl_valid.3.gz

%files -n libacl
%defattr(755,root,root,755)
/%{_lib}/libacl.so.1*

%changelog
openSUSE Build Service is sponsored by