2ce83bc3ef6604477fe48a468bb5841fdc91daeb
[platform/upstream/libnl2.git] / packaging / libnl2.spec
1 Name:       libnl2
2 Summary:    Library for netlink sockets
3 Version:    2.0
4 Release:    2
5 Group:      System/Network
6 License:    GPL-2.1
7 Source0:    %{name}-%{version}.tar.gz
8 BuildRequires:  bison
9 BuildRequires:  flex
10
11 %description
12 This is a library for applications dealing with netlink sockets.
13 The library provides an interface for raw netlink messaging and various
14 netlink family specific interfaces.
15
16 %package devel
17 Summary:    Development library and headers for libnl2
18 Group:      Development/Libraries
19 Requires:   %{name} = %{version}-%{release}
20
21 %description devel
22 This is a library for applications dealing with netlink sockets.
23 The library provides an interface for raw netlink messaging and various
24 netlink family specific interfaces.
25 This package contains all files that are needed to build applications using
26 libnl2.
27
28 %prep
29 %setup -q
30
31 ./autogen.sh
32
33 %build
34 CFLAGS="$RPM_OPT_FLAGS" \
35         ./configure \
36         --prefix=/usr
37
38 make -j1
39
40 %install
41 rm -rf %{buildroot}
42 %make_install
43
44 rm %{buildroot}/usr/etc/libnl/pktloc
45
46
47 %post -p /sbin/ldconfig
48
49 %postun -p /sbin/ldconfig
50
51 %files
52 %defattr(-,root,root,-)
53 %{_libdir}/libnl*.so.*
54
55 %files devel
56 %defattr(-,root,root,-)
57 %{_includedir}/*
58 %{_libdir}/pkgconfig/*
59 %{_libdir}/libnl*.so