Add packaging directory
[platform/upstream/libnl3.git] / packaging / libnl3.spec
1 Name:       libnl3
2 Summary:    Library for netlink sockets
3 Version:    3.2.22
4 Release:    1
5 Group:      System/Network
6 License:    LGPL-2.1
7 Source0:    %{name}-%{version}.tar.gz
8 Source1001:     libnl3.manifest
9 BuildRequires:  bison
10 BuildRequires:  flex
11
12 %description
13 This is a library for applications dealing with netlink sockets.
14 The library provides an interface for raw netlink messaging and various
15 netlink family specific interfaces.
16
17 %package devel
18 Summary:    Development library and headers for libnl3
19 Group:      Development/Libraries
20 Requires:   %{name} = %{version}-%{release}
21
22 %description devel
23 This is a library for applications dealing with netlink sockets.
24 The library provides an interface for raw netlink messaging and various
25 netlink family specific interfaces.
26 This package contains all files that are needed to build applications using
27 libnl3.
28
29 %package cli
30 Summary:   Command line interface utils for libnl3
31 Group:     Development/Libraries
32 Requires:  %{name} = %{version}-%{release}
33
34 %description cli
35 This package contains various libnl3 utils and additional
36 libraries on which they depend
37
38 %prep
39 %setup -q
40 cp %{SOURCE1001} .
41
42
43 %build
44 chmod +x autogen.sh
45 %autogen.sh
46 %configure
47
48 make -j1
49
50 %install
51 %make_install
52 rm -f %{buildroot}/etc/libnl/pktloc
53
54 %post -p /sbin/ldconfig
55 %post cli -p /sbin/ldconfig
56 %postun -p /sbin/ldconfig
57 %postun cli -p /sbin/ldconfig
58
59 %files
60 %manifest %{name}.manifest
61 %defattr(-,root,root,-)
62 %license COPYING
63 %{_libdir}/libnl*.so.*
64 %exclude %{_libdir}/libnl-cli*.so.*
65 %config(noreplace) %{_sysconfdir}/*
66
67 %files devel
68 %manifest %{name}.manifest
69 %defattr(-,root,root,-)
70 %{_includedir}/*
71 %{_libdir}/pkgconfig/*
72 %{_libdir}/libnl*.so
73
74 %files cli
75 %defattr(-,root,root,-)
76 %{_libdir}/libnl-cli*.so.*
77 %{_libdir}/libnl/
78 %{_sbindir}/*
79 %{_mandir}/man8/*