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