1b7b473
Summary:	C library for portable packet creation and injection
1b7b473
Name:		libnet
25566d2
Version:	1.1.4
7ea09fe
Release:	3%{?dist}
1b7b473
License:	BSD
1b7b473
Group:		System Environment/Libraries
1b7b473
URL:		http://www.sourceforge.net/projects/libnet-dev/
1b7b473
Source:		http://downloads.sourceforge.net/libnet-dev/%{name}-%{version}.tar.gz
1b7b473
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
4cee5ef
4cee5ef
%description
1b7b473
Libnet is an API to help with the construction and handling of network
1b7b473
packets. It provides a portable framework for low-level network packet
1b7b473
writing and handling (use libnet in conjunction with libpcap and you can
1b7b473
write some really cool stuff). Libnet includes packet creation at the IP
1b7b473
layer and at the link layer as well as a host of supplementary and
1b7b473
complementary functionality.
4cee5ef
4cee5ef
%package devel
1b7b473
Summary:	Development files for the libnet library
1b7b473
Group:		Development/Libraries
1b7b473
Requires:	%{name} = %{version}-%{release}
4cee5ef
4cee5ef
%description devel
1b7b473
The libnet-devel package includes header files and libraries necessary
1b7b473
for developing programs which use the libnet library. Libnet is very handy
1b7b473
with which to write network tools and network test code. See the manpage
1b7b473
and sample test code for more detailed information.
4cee5ef
4cee5ef
%prep
1b7b473
%setup -q
c66e60b
1b7b473
# Keep the sample directory untouched by make
d629198
rm -rf __dist_sample
1b7b473
mkdir __dist_sample
d629198
cp -a sample __dist_sample
c66e60b
1b7b473
%build
7ad2f9f
%configure --libdir=/%{_lib}
4cee5ef
make %{?_smp_mflags}
4cee5ef
4cee5ef
%install
1b7b473
rm -rf $RPM_BUILD_ROOT
1b7b473
make DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p' install
4cee5ef
7ad2f9f
# Move %{name}.so to %{_libdir}, remove static .a and libtool .la files
7ad2f9f
rm -f $RPM_BUILD_ROOT/%{_lib}/%{name}.{a,la,so}
7ad2f9f
pushd $RPM_BUILD_ROOT/%{_lib}
7ad2f9f
mkdir -p $RPM_BUILD_ROOT%{_libdir}
7ad2f9f
ln -sf ../../%{_lib}/$(ls %{name}.so.?.?.?) $RPM_BUILD_ROOT%{_libdir}/%{name}.so
7ad2f9f
popd
4cee5ef
1b7b473
# Prepare samples directory and perform some fixes
d629198
rm -rf __dist_sample/sample/win32
1b7b473
rm -f __dist_sample/sample/Makefile.{am,in}
1b7b473
sed -e 's@#include "../include/libnet.h"@#include <libnet.h>@' \
1b7b473
  __dist_sample/sample/libnet_test.h > __dist_sample/sample/libnet_test.h.new
1b7b473
touch -c -r __dist_sample/sample/libnet_test.h{,.new}
1b7b473
mv -f __dist_sample/sample/libnet_test.h{.new,}
1b7b473
1b7b473
# Remove makefile relics from documentation
1b7b473
rm -f doc/html/Makefile*
1b7b473
4cee5ef
%clean
1b7b473
rm -rf $RPM_BUILD_ROOT
4cee5ef
1b7b473
%post -p /sbin/ldconfig
c66e60b
1b7b473
%postun -p /sbin/ldconfig
1b7b473
1b7b473
%files
4cee5ef
%defattr(-,root,root,-)
1b7b473
%doc README doc/CHANGELOG doc/CONTRIB doc/COPYING
7ad2f9f
/%{_lib}/%{name}.so.*
4cee5ef
1b7b473
%files devel
1b7b473
%defattr(-,root,root,-)
1b7b473
%doc doc/BUGS doc/DESIGN_NOTES doc/MIGRATION doc/PACKET_BUILDING
1b7b473
%doc doc/RAWSOCKET_NON_SEQUITUR doc/TODO doc/html/ __dist_sample/sample/
1b7b473
%{_bindir}/%{name}-config
1b7b473
%{_libdir}/%{name}.so
4cee5ef
%{_includedir}/libnet.h
1b7b473
%{_includedir}/%{name}/
1b7b473
%{_mandir}/man3/%{name}*.3*
c66e60b
4cee5ef
%changelog
7ad2f9f
* Fri Aug 21 2009 Robert Scheck <robert@fedoraproject.org> 1.1.4-3
7ad2f9f
- Move libnet.so.* to /lib[64] to avoid static linking (#518150)
7ad2f9f
7ad2f9f
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.4-2
7ad2f9f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
7ad2f9f
25566d2
* Thu Jun 11 2009 Robert Scheck <robert@fedoraproject.org> 1.1.4-1
25566d2
- Upgrade to 1.1.4
25566d2
25566d2
* Sat Jun 06 2009 Robert Scheck <robert@fedoraproject.org> 1.1.3-2
25566d2
- Added upstream patch to solve HAVE_CONFIG_H (#501633, #502400)
25566d2
1b7b473
* Sat May 16 2009 Robert Scheck <robert@fedoraproject.org> 1.1.3-1
1b7b473
- Upgrade to 1.1.3
1b7b473
1b7b473
* Sun Apr 19 2009 Robert Scheck <robert@fedoraproject.org> 1.1.2.1-14
1b7b473
- Enabled a shared library and made lots of spec file cleanups
1b7b473
1b7b473
* Mon Feb 23 2009 Robert Scheck <robert@fedoraproject.org> 1.1.2.1-13
1b7b473
- Rebuild against gcc 4.4 and rpm 4.6
1b7b473
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