ce71d9e9098b4d116f36d0a49d87b62eca648722
[platform/upstream/acl.git] / packaging / acl.spec
1 %define lname   libacl
2
3 Name:           acl
4 BuildRequires:  libattr-devel
5 Summary:        Commands for Manipulating POSIX Access Control Lists
6 License:        GPL-2.0+ and LGPL-2.1+
7 Group:          Security/Access Control
8 Version:        2.2.51
9 Release:        0
10 Source:         %name-%version.src.tar.gz
11 Source2:        baselibs.conf
12 Source1001:     acl.manifest
13 Url:            http://download.savannah.gnu.org/releases-noredirect/acl/
14
15 %description
16 getfacl and setfacl commands for retrieving and setting POSIX access
17 control lists.
18
19 %package -n %lname
20 Summary:        A dynamic library for accessing POSIX Access Control Lists
21 Group:          Security/Access Control
22
23 %description -n %lname
24 This package contains the libacl.so dynamic library which contains the
25 POSIX 1003.1e draft standard 17 functions for manipulating access
26 control lists.
27
28 %package -n libacl-devel
29 Summary:        Include Files and Libraries mandatory for Development
30 Group:          Development/Libraries
31 Requires:       %lname = %version
32 Requires:       glibc-devel
33 # the .so file references libattr.so.x, so require libattr-devel
34 Requires:       libattr-devel
35
36 %description -n libacl-devel
37 This package contains all necessary include files and libraries needed
38 to develop applications that require these.
39
40 %prep
41 %setup -q -n acl-%version
42 cp %{SOURCE1001} .
43
44 %build
45 export OPTIMIZER="$RPM_OPT_FLAGS -fPIC"
46 export DEBUG=-DNDEBUG
47 CFLAGS="$RPM_OPT_FLAGS"
48 %configure \
49         --prefix=/ \
50         --exec-prefix=/ \
51         --libdir=%{_libdir} \
52         --libexecdir=%{_libdir} \
53         --enable-gettext=no \
54         --disable-static \
55         --with-pic
56 %{__make} %{?_smp_mflags}
57
58 %install
59 DIST_ROOT="$RPM_BUILD_ROOT"
60 DIST_INSTALL=`pwd`/install.manifest
61 DIST_INSTALL_DEV=`pwd`/install-dev.manifest
62 DIST_INSTALL_LIB=`pwd`/install-lib.manifest
63 export DIST_ROOT DIST_INSTALL DIST_INSTALL_DEV DIST_INSTALL_LIB
64 /usr/bin/make install DIST_MANIFEST="$DIST_INSTALL"
65 /usr/bin/make install-dev DIST_MANIFEST="$DIST_INSTALL_DEV"
66 /usr/bin/make install-lib DIST_MANIFEST="$DIST_INSTALL_LIB"
67
68 rm %{buildroot}%{_defaultdocdir}/%{name}/COPYING*
69
70 rm -f %{buildroot}/%{_libdir}/*.{a,la}
71
72 %post -n %lname -p /sbin/ldconfig
73
74 %postun -n %lname -p /sbin/ldconfig
75
76
77 %docs_package
78
79 %files 
80 %manifest %{name}.manifest
81 %defattr(-,root,root)
82 %license doc/COPYING doc/COPYING.LGPL
83 %attr(755,root,root) %{_bindir}/chacl
84 %attr(755,root,root) %{_bindir}/getfacl
85 %attr(755,root,root) %{_bindir}/setfacl
86 %dir %attr(755,root,root) /usr/share/doc/packages/acl
87 %doc %attr(644,root,root) /usr/share/doc/packages/acl/CHANGES.gz
88 %doc %attr(644,root,root) /usr/share/doc/packages/acl/PORTING
89 %doc %attr(644,root,root) /usr/share/doc/packages/acl/README
90
91 %files -n libacl-devel
92 %manifest %{name}.manifest
93 %defattr(-,root,root)
94 %dir %attr(755,root,root) %{_includedir}/acl
95 %attr(644,root,root) %{_includedir}/acl/libacl.h
96 %attr(644,root,root) %{_includedir}/sys/acl.h
97 %attr(755,root,root) %{_libdir}/libacl.so
98
99 %files -n %lname
100 %manifest %{name}.manifest
101 %defattr(755,root,root,755)
102 %{_libdir}/libacl.so.1*
103