c4fe6467e6bf6e0f4d03b5a83638254672de097b
[platform/upstream/libcap-ng.git] / packaging / libcap-ng.spec
1 %{!?python_sitelib:  %global python_sitelib  %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
2 %{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
3
4 Name:           libcap-ng
5 Version:        0.6.6
6 Release:        0
7 License:        LGPL-2.1+
8 Summary:        An alternate POSIX capabilities library
9 %define soname 0
10 %define rname libcap-ng
11 Url:            http://people.redhat.com/sgrubb/libcap-ng
12 Group:          System/Libraries
13 # http://people.redhat.com/sgrubb/libcap-ng/libcap-ng-%{version}.tar.gz
14 Source:         %{name}-%{version}.tar.bz2
15 Source2:        baselibs.conf
16 Source99:       libcap-ng.rpmlintrc
17 BuildRequires:  kernel-headers >= 2.6.11
18 BuildRequires:  libattr-devel
19 BuildRequires:  pkg-config
20 BuildRequires:  python
21
22 %description
23 Libcap-ng is a library that makes using posix capabilities easier
24
25 %package devel
26
27 License:        LGPL-2.1+
28 Summary:        Header files for libcap-ng library
29 Group:          Development/Libraries
30 Requires:       %{name} = %{version}
31 Requires:       kernel-headers >= 2.6.11
32 Requires:       pkgconfig
33
34 %description devel
35 The libcap-ng-devel package contains the files needed for developing
36 applications that need to use the libcap-ng library.
37
38 %package utils
39
40 License:        GPL-2.0+
41 Summary:        Utilities for analysing and setting file capabilities
42 Group:          System/Base
43
44 %description utils
45 The libcap-ng-utils package contains applications to analyse the
46 posix capabilities of all the program running on a system. It also
47 lets you set the file system based capabilities.
48
49 %prep
50 %setup -q -n %{rname}-%{version}
51
52 %build
53 %configure --disable-static --with-pic --with-python=no
54 make %{?_smp_mflags}
55
56 %install
57 %make_install
58
59 %post -p /sbin/ldconfig
60
61 %postun  -p /sbin/ldconfig
62
63 %files
64 %defattr(-,root,root,-)
65 %license COPYING.LIB
66 %attr(0755,root,root) %{_libdir}/%{rname}.so.%{soname}
67 %attr(0755,root,root) %{_libdir}/%{rname}.so.%{soname}.*
68
69 %files devel
70 %defattr(-,root,root,-)
71 %attr(0644,root,root) %{_mandir}/man3/*.3%{ext_man}
72 %attr(0644,root,root) %{_includedir}/cap-ng.h
73 %attr(0755,root,root) %{_libdir}/%{rname}.so
74 %attr(0644,root,root) %{_datadir}/aclocal/cap-ng.m4
75 %{_libdir}/pkgconfig/%{rname}.pc
76
77 %files utils
78 %defattr(-,root,root,-)
79 %license COPYING
80 %attr(0755,root,root) %{_bindir}/captest
81 %attr(0755,root,root) %{_bindir}/filecap
82 %attr(0755,root,root) %{_bindir}/netcap
83 %attr(0755,root,root) %{_bindir}/pscap
84 %attr(0644,root,root) %{_mandir}/man8/*.8%{ext_man}
85
86 %changelog