add license tag
[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+ ; LGPL-2.1+
7 Group:          System/Filesystems
8 Version:        2.2.51
9 Release:        0
10 Source:         %name-%version.src.tar.gz
11 Source2:        baselibs.conf
12 Url:            http://download.savannah.gnu.org/releases-noredirect/acl/
13
14 %description
15 getfacl and setfacl commands for retrieving and setting POSIX access
16 control lists.
17
18 %package -n %lname
19 Summary:        A dynamic library for accessing POSIX Access Control Lists
20 Group:          System/Libraries
21
22 %description -n %lname
23 This package contains the libacl.so dynamic library which contains the
24 POSIX 1003.1e draft standard 17 functions for manipulating access
25 control lists.
26
27 %package -n libacl-devel
28 Summary:        Include Files and Libraries mandatory for Development
29 Group:          Development/Libraries/C and C++
30 Requires:       %lname = %version
31 Requires:       glibc-devel
32 # the .so file references libattr.so.x, so require libattr-devel
33 Requires:       libattr-devel
34
35 %description -n libacl-devel
36 This package contains all necessary include files and libraries needed
37 to develop applications that require these.
38
39 %prep
40 %setup -q -n acl-%version
41
42 %build
43 export OPTIMIZER="$RPM_OPT_FLAGS -fPIC"
44 export DEBUG=-DNDEBUG
45 CFLAGS="$RPM_OPT_FLAGS"
46 %configure \
47         --prefix=/ \
48         --exec-prefix=/ \
49         --libdir=%{_libdir} \
50         --libexecdir=%{_libdir} \
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
66 rm -f %{buildroot}/%{_libdir}/*.{a,la}
67
68 %post -n %lname -p /sbin/ldconfig
69
70 %postun -n %lname -p /sbin/ldconfig
71
72
73 %docs_package
74
75 %files 
76 %defattr(-,root,root)
77 %license doc/COPYING doc/COPYING.LGPL
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 %{_libdir}/libacl.so.1*
98