]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without static_libs # don't build static library | |
4 | # | |
5 | Summary: Interface to several low-level networking routines | |
6 | Summary(pl.UTF-8): Interfejs do niektórych niskopoziomowych funkcji sieciowych | |
7 | Name: libdnet | |
8 | Version: 1.12 | |
9 | Release: 4 | |
10 | License: BSD | |
11 | Group: Libraries | |
12 | #Source0Download: https://code.google.com/p/libdnet/downloads/list | |
13 | Source0: https://libdnet.googlecode.com/files/%{name}-%{version}.tgz | |
14 | # Source0-md5: 9253ef6de1b5e28e9c9a62b882e44cc9 | |
15 | Patch0: %{name}-python.patch | |
16 | Patch1: %{name}-vlan.patch | |
17 | Patch2: %{name}-ip6.patch | |
18 | URL: https://code.google.com/p/libdnet/ | |
19 | BuildRequires: autoconf >= 2.53 | |
20 | BuildRequires: automake | |
21 | BuildRequires: libtool | |
22 | BuildRequires: python-Pyrex | |
23 | BuildRequires: python-devel >= 1:2.5 | |
24 | BuildRequires: rpm-pythonprov | |
25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
26 | ||
27 | %description | |
28 | libdnet provides a simplified, portable interface to several low-level | |
29 | networking routines, including: | |
30 | * network address manipulation | |
31 | * kernel arp cache and route table lookup and manipulation | |
32 | * network firewalling (IP filter, ipfw, ipchains, pf, ...) | |
33 | * network interface lookup and manipulation | |
34 | * raw IP packet and Ethernet frame transmission | |
35 | ||
36 | %description -l pl.UTF-8 | |
37 | libdnet zapewnia uproszczony, przenośny interfejs do niektórych | |
38 | niskopoziomowych funkcji sieciowych, włączając w to: | |
39 | * manipulację adresami sieciowymi | |
40 | * przeglądanie i modyfikację pamięci podręcznej ARP oraz tablic | |
41 | routingu | |
42 | * firewalling (IP filter, ipfw, ipchains, pf, ...) | |
43 | * wysyłanie ,,surowych'' pakietów IP i ramek Ethernetowych | |
44 | ||
45 | %package devel | |
46 | Summary: Header files for libdnet | |
47 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libdnet | |
48 | Group: Development/Libraries | |
49 | Requires: %{name} = %{version}-%{release} | |
50 | ||
51 | %description devel | |
52 | Header files for libdnet. | |
53 | ||
54 | %description devel -l pl.UTF-8 | |
55 | Pliki nagłówkowe biblioteki libdnet. | |
56 | ||
57 | %package static | |
58 | Summary: libdnet static library | |
59 | Summary(pl.UTF-8): Statyczna biblioteka libdnet | |
60 | Group: Development/Libraries | |
61 | Requires: %{name}-devel = %{version}-%{release} | |
62 | ||
63 | %description static | |
64 | libdnet static library. | |
65 | ||
66 | %description static -l pl.UTF-8 | |
67 | Statyczna biblioteka libdnet. | |
68 | ||
69 | %package progs | |
70 | Summary: Sample applications to use with libdnet | |
71 | Summary(pl.UTF-8): Przykładowe aplikacje do wykorzystania libdnet | |
72 | Group: Applications/Networking | |
73 | Requires: %{name} = %{version}-%{release} | |
74 | ||
75 | %description progs | |
76 | Sample applications to use with libdnet. | |
77 | ||
78 | %description progs -l pl.UTF-8 | |
79 | Przykładowe aplikacje do wykorzystania libdnet. | |
80 | ||
81 | %package -n python-libdnet | |
82 | Summary: libdnet Python module | |
83 | Summary(pl.UTF-8): Moduł libdnet dla Pythona | |
84 | Group: Libraries | |
85 | Requires: %{name} = %{version}-%{release} | |
86 | %pyrequires_eq python-libs | |
87 | ||
88 | %description -n python-libdnet | |
89 | libdnet Python module. | |
90 | ||
91 | %description -n python-libdnet -l pl.UTF-8 | |
92 | Moduł libdnet dla Pythona. | |
93 | ||
94 | %prep | |
95 | %setup -q | |
96 | %patch0 -p1 | |
97 | %patch1 -p1 | |
98 | %patch2 -p1 | |
99 | ||
100 | # invalid lvalues, force regeneration from .pyx | |
101 | %{__rm} python/dnet.c | |
102 | ||
103 | %build | |
104 | %{__libtoolize} | |
105 | %{__aclocal} -I config | |
106 | %{__autoconf} | |
107 | %{__autoheader} | |
108 | %{__automake} | |
109 | %configure \ | |
110 | --with-python \ | |
111 | %{!?with_static_libs:--disable-static} | |
112 | %{__make} | |
113 | ||
114 | %install | |
115 | rm -rf $RPM_BUILD_ROOT | |
116 | ||
117 | %{__make} install \ | |
118 | DESTDIR=$RPM_BUILD_ROOT | |
119 | ||
120 | %clean | |
121 | rm -rf $RPM_BUILD_ROOT | |
122 | ||
123 | %post -p /sbin/ldconfig | |
124 | %postun -p /sbin/ldconfig | |
125 | ||
126 | %files | |
127 | %defattr(644,root,root,755) | |
128 | %doc LICENSE README THANKS TODO | |
129 | %attr(755,root,root) %{_libdir}/libdnet.so.*.*.* | |
130 | %attr(755,root,root) %ghost %{_libdir}/libdnet.so.1 | |
131 | ||
132 | %files devel | |
133 | %defattr(644,root,root,755) | |
134 | %attr(755,root,root) %{_bindir}/dnet-config | |
135 | %attr(755,root,root) %{_libdir}/libdnet.so | |
136 | %{_libdir}/libdnet.la | |
137 | %{_includedir}/dnet | |
138 | %{_includedir}/dnet.h | |
139 | %{_mandir}/man3/dnet.3* | |
140 | ||
141 | %if %{with static_libs} | |
142 | %files static | |
143 | %defattr(644,root,root,755) | |
144 | %{_libdir}/libdnet.a | |
145 | %endif | |
146 | ||
147 | %files progs | |
148 | %defattr(644,root,root,755) | |
149 | %attr(755,root,root) %{_sbindir}/dnet | |
150 | %{_mandir}/man8/dnet.8* | |
151 | ||
152 | %files -n python-libdnet | |
153 | %defattr(644,root,root,755) | |
154 | %attr(755,root,root) %{py_sitedir}/dnet.so | |
155 | %{py_sitedir}/dnet-%{version}-py*.egg-info |