]> git.pld-linux.org Git - packages/libnet.git/blob - libnet.spec
- rel 6; don't rely on mounted /proc
[packages/libnet.git] / libnet.spec
1 Summary:        C library for portable packet creation and injection
2 Summary(pl.UTF-8):      Biblioteka C do przenośnego tworzenia i wprowadzania pakietów
3 Summary(pt_BR.UTF-8):   API para funções de rede de baixo nível
4 Name:           libnet
5 Version:        1.1.2.1
6 Release:        6
7 Epoch:          1
8 License:        BSD
9 Group:          Libraries
10 Source0:        http://www.packetfactory.net/libnet/dist/%{name}-%{version}.tar.gz
11 # Source0-md5:  be845c41170d72c7db524f3411b50256
12 Patch0:         %{name}-shared.patch
13 Patch1:         %{name}-am.patch
14 Patch2:         %{name}-leaking-fd.patch
15 Patch3:         %{name}-proc.patch
16 URL:            http://www.packetfactory.net/libnet/
17 BuildRequires:  autoconf
18 BuildRequires:  automake
19 BuildRequires:  libtool
20 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21
22 %description
23 The Network Library provides a simple API for commonly used low-level
24 network functions (mainly packet injection). Using libnet, it is easy
25 to build and write arbitrary network packets. It provides a portable
26 framework for low-level network packet writing and handling (use
27 libnet in conjunction with libpcap and you can write some really cool
28 stuff). Libnet includes packet creation at the IP layer and at the
29 link layer as well as a host of supplementary and complementary
30 functionality.
31
32 %description -l pl.UTF-8
33 Biblioteka dostarcza API dla popularnych niskopoziomowych funkcji
34 sieciowych (głównie wprowadzania pakietów). Przy użyciu libnet można
35 łatwo stworzyć dowolne pakiety sieciowe. Biblioteka dostarcza
36 przenośny szkielet do niskopoziomowego zapisu i obsługi pakietów
37 sieciowych (w połączeniu z libpcap można napisać coś naprawdę
38 fajnego). Libnet obejmuje tworzenie pakietów w warstwie IP i
39 połączenia, a także funkcjonalność dodatkową i uzupełniającą.
40
41 %description -l pt_BR.UTF-8
42 Este pacote fornece uma API simples para funções de rede de baixo
43 nível comumente usadas (principalmente injeção de pacotes). Usando
44 libnet, é simples construir e enviar pacotes de rede arbitrários.
45
46 %package devel
47 Summary:        Header files and develpment documentation for libnet
48 Summary(pl.UTF-8):      Pliki nagłówkowe i dokumetacja do libnet
49 Summary(pt_BR.UTF-8):   Arquivos do pacote libnet para desenvolvimento
50 Group:          Development/Libraries
51 Requires:       %{name} = %{epoch}:%{version}-%{release}
52
53 %description devel
54 Header files and develpment documentation for libnet.
55
56 %description devel -l pl.UTF-8
57 Pliki nagłówkowe i dokumentacja do libnet.
58
59 %description devel -l pt_BR.UTF-8
60 Arquivos de cabeçalho e bibliotecas usadas no desenvolvimento de
61 aplicativos que usam libnet.
62
63 %package static
64 Summary:        Static libnet library
65 Summary(pl.UTF-8):      Biblioteka statyczna libnet
66 Summary(pt_BR.UTF-8):   Arquivos do pacote libnet para desenvolvimento estático
67 Group:          Development/Libraries
68 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
69
70 %description static
71 Static libnet library.
72
73 %description static -l pl.UTF-8
74 Biblioteka statyczna libnet.
75
76 %description static -l pt_BR.UTF-8
77 Arquivos de cabeçalho e bibliotecas usadas no desenvolvimento de
78 aplicativos estáticos que usam libnet.
79
80 %package examples
81 Summary:        libnet - example programs
82 Summary(pl.UTF-8):      libnet - programy przykładowe
83 Group:          Development/Libraries
84 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
85
86 %description examples
87 libnet - example programs.
88
89 %description examples -l pl.UTF-8
90 libnet - programy przykładowe.
91
92 %prep
93 %setup -q -n %{name}
94 %patch0 -p1
95 %patch1 -p1
96 %patch2 -p1
97 %patch3 -p1
98
99 %build
100 %{__libtoolize}
101 %{__aclocal}
102 %{__autoconf}
103 %{__automake}
104 %configure \
105         --with-pf_packet=yes
106 %{__make} \
107         CFLAGS="%{rpmcflags}"
108
109 %install
110 rm -rf $RPM_BUILD_ROOT
111 install -d $RPM_BUILD_ROOT{%{_examplesdir}/%{name}-%{version},%{_mandir}/man3,%{_bindir}}
112
113 %{__make} install \
114         DESTDIR=$RPM_BUILD_ROOT
115
116 ln -sf libnet.so        $RPM_BUILD_ROOT%{_libdir}/libpwrite.so
117 ln -sf libnet.a         $RPM_BUILD_ROOT%{_libdir}/libpwrite.a
118 install sample/*.[ch]   $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
119 install doc/man/man3/libnet-functions.h.3 $RPM_BUILD_ROOT%{_mandir}/man3
120 install libnet-config   $RPM_BUILD_ROOT%{_bindir}
121
122 %clean
123 rm -rf $RPM_BUILD_ROOT
124
125 %post   -p /sbin/ldconfig
126 %postun -p /sbin/ldconfig
127
128 %files
129 %defattr(644,root,root,755)
130 %doc README doc/{CHANGELOG,MIGRATION,PACKET_BUILDING}
131 %attr(755,root,root) %{_libdir}/lib*.so.*.*
132
133 %files devel
134 %defattr(644,root,root,755)
135 %attr(755,root,root) %{_bindir}/libnet-config
136 %attr(755,root,root) %{_libdir}/lib*.so
137 %{_libdir}/lib*.la
138 %{_includedir}/*.h
139 %{_includedir}/libnet
140 %{_mandir}/man*/*
141
142 %files static
143 %defattr(644,root,root,755)
144 %{_libdir}/lib*.a
145
146 %files examples
147 %defattr(644,root,root,755)
148 %{_examplesdir}/%{name}-%{version}
This page took 0.046113 seconds and 4 git commands to generate.