move from /lib to /usr/lib
[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         --libdir=%{_libdir} \
49         --libexecdir=%{_libdir} \
50         --enable-gettext=no \
51         --disable-static \
52         --with-pic
53 %{__make} %{?_smp_mflags}
54
55 %install
56 DIST_ROOT="$RPM_BUILD_ROOT"
57 DIST_INSTALL=`pwd`/install.manifest
58 DIST_INSTALL_DEV=`pwd`/install-dev.manifest
59 DIST_INSTALL_LIB=`pwd`/install-lib.manifest
60 export DIST_ROOT DIST_INSTALL DIST_INSTALL_DEV DIST_INSTALL_LIB
61 /usr/bin/make install DIST_MANIFEST="$DIST_INSTALL"
62 /usr/bin/make install-dev DIST_MANIFEST="$DIST_INSTALL_DEV"
63 /usr/bin/make install-lib DIST_MANIFEST="$DIST_INSTALL_LIB"
64
65 rm -f %{buildroot}/%{_libdir}/*.{a,la}
66
67 %post -n %lname -p /sbin/ldconfig
68
69 %postun -n %lname -p /sbin/ldconfig
70
71
72 %docs_package
73
74 %files 
75 %defattr(-,root,root)
76 %attr(755,root,root) %{_bindir}/chacl
77 %attr(755,root,root) %{_bindir}/getfacl
78 %attr(755,root,root) %{_bindir}/setfacl
79 %dir %attr(755,root,root) /usr/share/doc/packages/acl
80 %doc %attr(644,root,root) /usr/share/doc/packages/acl/CHANGES.gz
81 %doc %attr(644,root,root) /usr/share/doc/packages/acl/COPYING
82 %doc %attr(644,root,root) /usr/share/doc/packages/acl/COPYING.LGPL
83 %doc %attr(644,root,root) /usr/share/doc/packages/acl/PORTING
84 %doc %attr(644,root,root) /usr/share/doc/packages/acl/README
85
86 %files -n libacl-devel
87 %defattr(-,root,root)
88 %dir %attr(755,root,root) %{_includedir}/acl
89 %attr(644,root,root) %{_includedir}/acl/libacl.h
90 %attr(644,root,root) %{_includedir}/sys/acl.h
91 %attr(755,root,root) %{_libdir}/libacl.so
92
93 %files -n %lname
94 %defattr(755,root,root,755)
95 %{_libdir}/libacl.so.1*
96