]> git.pld-linux.org Git - packages/libnet.git/blame - libnet.spec
- updated URLs, updated to 1.2 (new release after >7 years; soname changed)
[packages/libnet.git] / libnet.spec
CommitLineData
6911ac18
JB
1#
2# Conditional build:
3%bcond_without apidocs # Doxygen documentation in HTML format
4
0d9bca01 5Summary: C library for portable packet creation and injection
dccddd41
ER
6Summary(pl.UTF-8): Biblioteka C do przenośnego tworzenia i wprowadzania pakietów
7Summary(pt_BR.UTF-8): API para funções de rede de baixo nível
5b413584 8Name: libnet
6911ac18
JB
9Version: 1.2
10Release: 1
5b413584
AM
11Epoch: 1
12License: BSD
13Group: Libraries
6911ac18
JB
14#Source0Download: https://github.com/libnet/libnet/releases
15Source0: https://github.com/libnet/libnet/releases/download/v%{version}/%{name}-%{version}.tar.gz
16# Source0-md5: a36c669e0cdfda6a2aa3adfb1f6fe60a
17Patch0: %{name}-libdir.patch
8ecf55bf 18Patch1: %{name}-proc.patch
6911ac18
JB
19URL: https://github.com/libnet/libnet
20BuildRequires: autoconf >= 2.69
21BuildRequires: automake >= 1:1.14
22%{?with_apidocs:BuildRequires: doxygen}
23BuildRequires: libtool >= 2:2.4.2
5b413584
AM
24BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26%description
c257df84 27The Network Library provides a simple API for commonly used low-level
28network functions (mainly packet injection). Using libnet, it is easy
29to build and write arbitrary network packets. It provides a portable
30framework for low-level network packet writing and handling (use
31libnet in conjunction with libpcap and you can write some really cool
32stuff). Libnet includes packet creation at the IP layer and at the
33link layer as well as a host of supplementary and complementary
34functionality.
5b413584 35
1d706b6c 36%description -l pl.UTF-8
0d9bca01 37Biblioteka dostarcza API dla popularnych niskopoziomowych funkcji
1d706b6c
JR
38sieciowych (głównie wprowadzania pakietów). Przy użyciu libnet można
39łatwo stworzyć dowolne pakiety sieciowe. Biblioteka dostarcza
40przenośny szkielet do niskopoziomowego zapisu i obsługi pakietów
41sieciowych (w połączeniu z libpcap można napisać coś naprawdę
42fajnego). Libnet obejmuje tworzenie pakietów w warstwie IP i
43połączenia, a także funkcjonalność dodatkową i uzupełniającą.
44
45%description -l pt_BR.UTF-8
46Este pacote fornece uma API simples para funções de rede de baixo
47nível comumente usadas (principalmente injeção de pacotes). Usando
48libnet, é simples construir e enviar pacotes de rede arbitrários.
52e6c97d 49
5b413584
AM
50%package devel
51Summary: Header files and develpment documentation for libnet
dccddd41
ER
52Summary(pl.UTF-8): Pliki nagłówkowe i dokumetacja do libnet
53Summary(pt_BR.UTF-8): Arquivos do pacote libnet para desenvolvimento
5b413584 54Group: Development/Libraries
8b3be3d6 55Requires: %{name} = %{epoch}:%{version}-%{release}
5b413584
AM
56
57%description devel
58Header files and develpment documentation for libnet.
59
1d706b6c
JR
60%description devel -l pl.UTF-8
61Pliki nagłówkowe i dokumentacja do libnet.
5b413584 62
1d706b6c
JR
63%description devel -l pt_BR.UTF-8
64Arquivos de cabeçalho e bibliotecas usadas no desenvolvimento de
52e6c97d 65aplicativos que usam libnet.
66
5b413584
AM
67%package static
68Summary: Static libnet library
dccddd41
ER
69Summary(pl.UTF-8): Biblioteka statyczna libnet
70Summary(pt_BR.UTF-8): Arquivos do pacote libnet para desenvolvimento estático
5b413584 71Group: Development/Libraries
8b3be3d6 72Requires: %{name}-devel = %{epoch}:%{version}-%{release}
5b413584
AM
73
74%description static
75Static libnet library.
76
1d706b6c 77%description static -l pl.UTF-8
5b413584
AM
78Biblioteka statyczna libnet.
79
1d706b6c
JR
80%description static -l pt_BR.UTF-8
81Arquivos de cabeçalho e bibliotecas usadas no desenvolvimento de
82aplicativos estáticos que usam libnet.
52e6c97d 83
6911ac18
JB
84%package apidocs
85Summary: API documentation for libnet
86Summary(pl.UTF-8): Dokumentacja API biblioteki libnet
87Group: Documentation
88%if "%{_rpmversion}" >= "4.6"
89BuildArch: noarch
90%endif
91
92%description apidocs
93API documentation for libnet.
94
95%description apidocs -l pl.UTF-8
96Dokumentacja API biblioteki libnet.
97
5ba38c4a 98%package examples
a60bca6f 99Summary: libnet - example programs
dccddd41 100Summary(pl.UTF-8): libnet - programy przykładowe
a60bca6f 101Group: Development/Libraries
8b3be3d6 102Requires: %{name}-devel = %{epoch}:%{version}-%{release}
6911ac18
JB
103%if "%{_rpmversion}" >= "4.6"
104BuildArch: noarch
105%endif
5ba38c4a
MW
106
107%description examples
2659d242 108libnet - example programs.
5ba38c4a 109
1d706b6c
JR
110%description examples -l pl.UTF-8
111libnet - programy przykładowe.
5ba38c4a 112
5b413584 113%prep
437de0b7 114%setup -q
8ecf55bf
JR
115%patch0 -p1
116%patch1 -p1
5b413584
AM
117
118%build
2659d242 119%{__libtoolize}
6911ac18 120%{__aclocal} -I m4
2659d242 121%{__autoconf}
6911ac18 122%{__autoheader}
2659d242 123%{__automake}
6911ac18
JB
124%configure \
125 %{!?with_apidocs:--disable-doxygen-html} \
126 --with-link-layer=linux
437de0b7
JR
127
128%{__make}
5b413584
AM
129
130%install
131rm -rf $RPM_BUILD_ROOT
6911ac18 132install -d $RPM_BUILD_ROOT{/%{_lib},%{_mandir}/man1,%{_examplesdir}/%{name}-%{version}}
5b413584 133
c257df84 134%{__make} install \
c36384c4 135 DESTDIR=$RPM_BUILD_ROOT
5b413584 136
6911ac18
JB
137cp -p sample/*.[ch] $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
138
139%{__mv} $RPM_BUILD_ROOT%{_libdir}/libnet.so.* $RPM_BUILD_ROOT/%{_lib}
0694c078
JR
140ln -sf /%{_lib}/$(cd $RPM_BUILD_ROOT/%{_lib} ; echo libnet.so.*.*.*) \
141 $RPM_BUILD_ROOT%{_libdir}/libnet.so
142
6911ac18
JB
143# fix man section
144%{__mv} $RPM_BUILD_ROOT{%{_mandir}/man3/libnet-config.3,%{_mandir}/man1/libnet-config.1}
145
146# obsoleted by pkg-config
147%{__rm} $RPM_BUILD_ROOT%{_libdir}/libnet.la
148
149%if %{with apidocs}
150# packaged as %doc
151%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/libnet
152%endif
5b413584 153
45edf3a0
JB
154%clean
155rm -rf $RPM_BUILD_ROOT
5b413584
AM
156
157%post -p /sbin/ldconfig
158%postun -p /sbin/ldconfig
159
5b413584
AM
160%files
161%defattr(644,root,root,755)
6911ac18 162%doc ChangeLog.md LICENSE README.md doc/{MIGRATION,RAWSOCKET}.md
331c546a 163%attr(755,root,root) /%{_lib}/libnet.so.*.*.*
6911ac18 164%attr(755,root,root) %ghost /%{_lib}/libnet.so.9
5b413584
AM
165
166%files devel
167%defattr(644,root,root,755)
99a5615b 168%attr(755,root,root) %{_bindir}/libnet-config
331c546a 169%attr(755,root,root) %{_libdir}/libnet.so
331c546a 170%{_includedir}/libnet.h
5b413584 171%{_includedir}/libnet
6911ac18
JB
172%{_pkgconfigdir}/libnet.pc
173%{_mandir}/man1/libnet-config.1*
174%{_mandir}/man3/libnet.3*
175%{_mandir}/man3/libnet-functions.3*
176%{_mandir}/man3/libnet-macros.3*
5b413584
AM
177
178%files static
179%defattr(644,root,root,755)
331c546a 180%{_libdir}/libnet.a
5ba38c4a 181
6911ac18
JB
182%if %{with apidocs}
183%files apidocs
184%defattr(644,root,root,755)
185%doc doc/html/*.{css,html,js,png}
186%endif
187
5ba38c4a
MW
188%files examples
189%defattr(644,root,root,755)
190%{_examplesdir}/%{name}-%{version}
This page took 0.112337 seconds and 4 git commands to generate.