3950dbb
Summary:	C library for portable packet creation and injection
3950dbb
Name:		libnet
dfce7cf
Version:	1.1.5
dfce7cf
Release:	1%{?dist}
3950dbb
License:	BSD
3950dbb
Group:		System Environment/Libraries
3950dbb
URL:		http://www.sourceforge.net/projects/libnet-dev/
3950dbb
Source:		http://downloads.sourceforge.net/libnet-dev/%{name}-%{version}.tar.gz
3950dbb
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
4cee5ef
4cee5ef
%description
3950dbb
Libnet is an API to help with the construction and handling of network
3950dbb
packets. It provides a portable framework for low-level network packet
3950dbb
writing and handling (use libnet in conjunction with libpcap and you can
3950dbb
write some really cool stuff). Libnet includes packet creation at the IP
3950dbb
layer and at the link layer as well as a host of supplementary and
3950dbb
complementary functionality.
4cee5ef
4cee5ef
%package devel
3950dbb
Summary:	Development files for the libnet library
3950dbb
Group:		Development/Libraries
3950dbb
Requires:	%{name} = %{version}-%{release}
4cee5ef
4cee5ef
%description devel
3950dbb
The libnet-devel package includes header files and libraries necessary
3950dbb
for developing programs which use the libnet library. Libnet is very handy
3950dbb
with which to write network tools and network test code. See the manpage
3950dbb
and sample test code for more detailed information.
4cee5ef
4cee5ef
%prep
3950dbb
%setup -q
c66e60b
3950dbb
# Keep the sample directory untouched by make
d629198
rm -rf __dist_sample
3950dbb
mkdir __dist_sample
d629198
cp -a sample __dist_sample
c66e60b
3950dbb
%build
9f5bc4a
%configure --libdir=/%{_lib}
4cee5ef
make %{?_smp_mflags}
4cee5ef
4cee5ef
%install
3950dbb
rm -rf $RPM_BUILD_ROOT
3950dbb
make DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p' install
4cee5ef
9f5bc4a
# Move %{name}.so to %{_libdir}, remove static .a and libtool .la files
9f5bc4a
rm -f $RPM_BUILD_ROOT/%{_lib}/%{name}.{a,la,so}
9f5bc4a
pushd $RPM_BUILD_ROOT/%{_lib}
9f5bc4a
mkdir -p $RPM_BUILD_ROOT%{_libdir}
9f5bc4a
ln -sf ../../%{_lib}/$(ls %{name}.so.?.?.?) $RPM_BUILD_ROOT%{_libdir}/%{name}.so
9f5bc4a
popd
4cee5ef
3950dbb
# Prepare samples directory and perform some fixes
d629198
rm -rf __dist_sample/sample/win32
3950dbb
rm -f __dist_sample/sample/Makefile.{am,in}
3950dbb
sed -e 's@#include "../include/libnet.h"@#include <libnet.h>@' \
3950dbb
  __dist_sample/sample/libnet_test.h > __dist_sample/sample/libnet_test.h.new
3950dbb
touch -c -r __dist_sample/sample/libnet_test.h{,.new}
3950dbb
mv -f __dist_sample/sample/libnet_test.h{.new,}
3950dbb
3950dbb
# Remove makefile relics from documentation
3950dbb
rm -f doc/html/Makefile*
3950dbb
4cee5ef
%clean
3950dbb
rm -rf $RPM_BUILD_ROOT
4cee5ef
3950dbb
%post -p /sbin/ldconfig
c66e60b
3950dbb
%postun -p /sbin/ldconfig
3950dbb
3950dbb
%files
4cee5ef
%defattr(-,root,root,-)
3950dbb
%doc README doc/CHANGELOG doc/CONTRIB doc/COPYING
9f5bc4a
/%{_lib}/%{name}.so.*
4cee5ef
3950dbb
%files devel
3950dbb
%defattr(-,root,root,-)
3950dbb
%doc doc/BUGS doc/DESIGN_NOTES doc/MIGRATION doc/PACKET_BUILDING
3950dbb
%doc doc/RAWSOCKET_NON_SEQUITUR doc/TODO doc/html/ __dist_sample/sample/
3950dbb
%{_bindir}/%{name}-config
3950dbb
%{_libdir}/%{name}.so
4cee5ef
%{_includedir}/libnet.h
3950dbb
%{_includedir}/%{name}/
3950dbb
%{_mandir}/man3/%{name}*.3*
c66e60b
4cee5ef
%changelog
dfce7cf
* Tue Dec 28 2010 Robert Scheck <robert@fedoraproject.org> 1.1.5-1
dfce7cf
- Upgrade to 1.1.5
dfce7cf
468bbb0
* Fri Jul 09 2010 Robert Scheck <robert@fedoraproject.org> 1.1.4-4
468bbb0
- Added patch for capability support rather UID check (#589770)
468bbb0
9f5bc4a
* Fri Aug 21 2009 Robert Scheck <robert@fedoraproject.org> 1.1.4-3
9f5bc4a
- Move libnet.so.* to /lib[64] to avoid static linking (#518150)
9f5bc4a
5cdeaa1
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.4-2
5cdeaa1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
5cdeaa1
5d34129
* Thu Jun 11 2009 Robert Scheck <robert@fedoraproject.org> 1.1.4-1
5d34129
- Upgrade to 1.1.4
5d34129
f1f0b27
* Sat Jun 06 2009 Robert Scheck <robert@fedoraproject.org> 1.1.3-2
f1f0b27
- Added upstream patch to solve HAVE_CONFIG_H (#501633, #502400)
f1f0b27
3950dbb
* Sat May 16 2009 Robert Scheck <robert@fedoraproject.org> 1.1.3-1
3950dbb
- Upgrade to 1.1.3
3950dbb
3950dbb
* Sun Apr 19 2009 Robert Scheck <robert@fedoraproject.org> 1.1.2.1-14
3950dbb
- Enabled a shared library and made lots of spec file cleanups
3950dbb
5695b4e
* Mon Feb 23 2009 Robert Scheck <robert@fedoraproject.org> 1.1.2.1-13
5695b4e
- Rebuild against gcc 4.4 and rpm 4.6
5695b4e
a123d6f
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.1.2.1-12
a123d6f
- Autorebuild for GCC 4.3
a123d6f
c66e60b
* Wed Aug  1 2007 Patrice Dumas <pertusus@free.fr> 1.1.2.1-11
c66e60b
- build with -fPIC (#250296)
c66e60b
7594a86
* Fri Jan 12 2007 Patrice Dumas <pertusus@free.fr> 1.1.2.1-10
7594a86
- add debian patch to correct bad checksums
7594a86
7594a86
* Tue Aug 29 2006 Patrice Dumas <pertusus@free.fr> 1.1.2.1-9
d65f535
- rebuild for FC6
d65f535
7594a86
* Fri Feb 17 2006 Patrice Dumas <pertusus@free.fr> 1.1.2.1-8
fd6e651
- rebuild for fc5
fd6e651
7594a86
* Thu Dec 22 2005 Patrice Dumas <pertusus@free.fr> 1.1.2.1-7
9033af8
- rebuild
9033af8
7594a86
* Mon Sep 12 2005 Patrice Dumas <pertusus@free.fr> 1.1.2.1-6
7053c3f
- bump release and add dist tag
7053c3f
4cee5ef
* Tue Aug 30 2005 Paul Howarth <paul@city-fan.org> 1.1.2.1-5
4cee5ef
- spec file cleanup
4cee5ef
7594a86
* Fri Aug 26 2005 Patrice Dumas <pertusus@free.fr> 1.1.2.1-4
4cee5ef
- use pushd and popd (from Oliver Falk) 
4cee5ef
7594a86
* Mon Aug 22 2005 Patrice Dumas <pertusus@free.fr> 1.1.2.1-3
4cee5ef
- Correct dos end of lines
d65f535
- add in devel: Provides: %%{name} = %%{version}-%%{release} 
4cee5ef
7594a86
* Fri Aug 12 2005 Patrice Dumas <pertusus@free.fr> 1.1.2.1-2
4cee5ef
- put everything in a devel subpackage
4cee5ef
- add smpflags
4cee5ef
- clean in sample
4cee5ef
7594a86
* Fri Aug 12 2005 Patrice Dumas <pertusus@free.fr> 1.1.2.1-1
4cee5ef
- rebuild changing only name
4cee5ef
4cee5ef
* Wed Jun 02 2004 Marcin Garski <garski@poczta.onet.pl> 1.1.2.1-2.fc2
4cee5ef
- Rebuild for Fedora Core 2
4cee5ef
4cee5ef
* Sat May 08 2004 Marcin Garski <garski@poczta.onet.pl> 1.1.2.1-1
4cee5ef
- Initial specfile