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