]>
Commit | Line | Data |
---|---|---|
2ec5cf8c ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without apidocs # don't build api docs | |
0414ac96 JB |
4 | # |
5 | Summary: Netlink sockets library | |
cd2b2b50 | 6 | Summary(pl.UTF-8): Biblioteka do obsługi gniazd netlink |
822efbf9 | 7 | Name: libnl |
5abc1a65 | 8 | Version: 1.1 |
537a4fb6 | 9 | Release: 4 |
95369c27 | 10 | Epoch: 1 |
822efbf9 | 11 | License: LGPL v2.1 |
12 | Group: Libraries | |
95369c27 | 13 | Source0: http://people.suug.ch/~tgr/libnl/files/%{name}-%{version}.tar.gz |
5abc1a65 | 14 | # Source0-md5: ae970ccd9144e132b68664f98e7ceeb1 |
95369c27 | 15 | Patch0: %{name}-static.patch |
588afc2c | 16 | Patch1: %{name}-ULONG_MAX.patch |
537a4fb6 | 17 | Patch2: %{name}-gcc44.patch |
822efbf9 | 18 | URL: http://people.suug.ch/~tgr/libnl/ |
de222217 JB |
19 | BuildRequires: autoconf |
20 | BuildRequires: automake | |
1d03b37c | 21 | %{?with_apidocs:BuildRequires: doxygen} |
22 | %{?with_apidocs:BuildRequires: graphviz} | |
3bd3131a | 23 | BuildRequires: linux-libc-headers >= 6:2.6.23 |
2ec5cf8c ER |
24 | %{?with_apidocs:BuildRequires: tetex-dvips} |
25 | %{?with_apidocs:BuildRequires: tetex-format-latex} | |
822efbf9 | 26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
27 | ||
28 | %description | |
29 | libnl is a library for applications dealing with netlink socket. It | |
30 | provides an easy to use interface for raw netlink message but also | |
31 | netlink family specific APIs. | |
32 | ||
1568cddb | 33 | %description -l pl.UTF-8 |
3bd3131a ER |
34 | libnl jest biblioteką dla aplikacji rozmawiających z gniazdem netlink. |
35 | Udostępnia łatwy w użyciu interfejs do korzystania z surowych | |
36 | wiadomości netlink, a także API specyficzne dla rodziny gniazd | |
37 | netlink. | |
822efbf9 | 38 | |
39 | %package devel | |
40 | Summary: Header files for libnl library | |
cd2b2b50 | 41 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libnl |
822efbf9 | 42 | Group: Development/Libraries |
d4594fac | 43 | Requires: %{name} = %{epoch}:%{version}-%{release} |
822efbf9 | 44 | |
45 | %description devel | |
46 | Header files for libnl library. | |
47 | ||
1568cddb JR |
48 | %description devel -l pl.UTF-8 |
49 | Pliki nagłówkowe biblioteki libnl. | |
822efbf9 | 50 | |
51 | %package static | |
52 | Summary: Static libnl library | |
cd2b2b50 | 53 | Summary(pl.UTF-8): Statyczna biblioteka libnl |
822efbf9 | 54 | Group: Development/Libraries |
d4594fac | 55 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} |
822efbf9 | 56 | |
57 | %description static | |
58 | Static libnl library. | |
59 | ||
1568cddb | 60 | %description static -l pl.UTF-8 |
822efbf9 | 61 | Statyczna biblioteka libnl. |
62 | ||
193bd36d ER |
63 | %package apidocs |
64 | Summary: libnl library API documentation | |
0414ac96 | 65 | Summary(pl.UTF-8): Dokumentacja API biblioteki libnl |
193bd36d ER |
66 | Group: Documentation |
67 | ||
68 | %description apidocs | |
69 | Documentation for libnl library API and guides in HTML format | |
70 | generated from sources by doxygen. | |
71 | ||
0414ac96 JB |
72 | %description apidocs -l pl.UTF-8 |
73 | Dokumentacja API biblioteki libnl oraz wprowadzenie w formacie HTML | |
74 | wygenerowane ze źródeł za pomocą doxygena. | |
75 | ||
822efbf9 | 76 | %prep |
95369c27 | 77 | %setup -q |
d4594fac | 78 | %patch0 -p1 |
588afc2c | 79 | %patch1 -p1 |
537a4fb6 | 80 | %patch2 -p1 |
822efbf9 | 81 | |
82 | %build | |
83 | %{__aclocal} | |
84 | %{__autoconf} | |
d4594fac | 85 | |
822efbf9 | 86 | %configure \ |
87 | --enable-verbose-errors | |
1a633036 | 88 | |
822efbf9 | 89 | %{__make} |
2ec5cf8c | 90 | %{?with_apidocs:%{__make} -C doc gendoc} |
822efbf9 | 91 | |
92 | %install | |
93 | rm -rf $RPM_BUILD_ROOT | |
94 | ||
95 | %{__make} install \ | |
96 | DESTDIR=$RPM_BUILD_ROOT | |
97 | ||
95369c27 JB |
98 | # for autodeps to work |
99 | chmod +x $RPM_BUILD_ROOT%{_libdir}/libnl.so.*.* | |
100 | ||
822efbf9 | 101 | %clean |
102 | rm -rf $RPM_BUILD_ROOT | |
103 | ||
104 | %post -p /sbin/ldconfig | |
105 | %postun -p /sbin/ldconfig | |
106 | ||
107 | %files | |
108 | %defattr(644,root,root,755) | |
109 | %doc ChangeLog | |
95369c27 | 110 | %attr(755,root,root) %{_libdir}/libnl.so.*.* |
3bd3131a | 111 | %attr(755,root,root) %ghost %{_libdir}/libnl.so.1 |
822efbf9 | 112 | |
113 | %files devel | |
114 | %defattr(644,root,root,755) | |
42dd8581 | 115 | %attr(755,root,root) %{_libdir}/libnl.so |
822efbf9 | 116 | %{_includedir}/netlink |
42dd8581 | 117 | %{_pkgconfigdir}/libnl-1.pc |
f123b212 PZ |
118 | |
119 | %files static | |
120 | %defattr(644,root,root,755) | |
121 | %{_libdir}/libnl.a | |
2ec5cf8c ER |
122 | |
123 | %if %{with apidocs} | |
124 | %files apidocs | |
125 | %defattr(644,root,root,755) | |
193bd36d | 126 | %doc doc/html/* |
2ec5cf8c | 127 | %endif |