Browse Source

* libnet: updated to 1.1.5; spec revamped

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@5910 ec354946-7b23-47d6-9f5a-488ba84defc7
shaolin 12 years ago
parent
commit
d7a861b575
1 changed files with 124 additions and 63 deletions
  1. 124 63
      lib/libn/libnet/libnet-vl.spec

+ 124 - 63
lib/libn/libnet/libnet-vl.spec

@@ -1,113 +1,174 @@
-Summary:        C library for portable packet creation and injection
-Name:           libnet
-Version:        1.1.2.1
-Release:        2%{?_dist_release}
-License:        BSD
-Group:          System Environment/Libraries
-URL:            http://www.packetfactory.net/libnet/
-Source0:        http://www.packetfactory.net/libnet/dist/libnet-%{version}.tar.gz
-BuildRoot:      %{_tmppath}/%{name}-%{version}-root
+Summary:	C library for portable packet creation and injection
+Name:		libnet
+Version:	1.1.5
+Release:	1%{?_dist_release}
+License:	BSD
+Group:		System Environment/Libraries
+URL:		http://www.sourceforge.net/projects/libnet-dev/
+Source:		http://downloads.sourceforge.net/libnet-dev/%{name}-%{version}.tar.gz
+BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+Vendor:		Project Vine
+Distribution:	Vine Linux
 
 %description
-Libnet is an API to help with the construction and handling of network packets.
-It provides a portable framework for low-level network packet writing and
-handling (use libnet in conjunction with libpcap and you can write some really
-cool stuff).  Libnet includes packet creation at the IP layer and at the link
-layer as well as a host of supplementary and complementary functionality.
-Libnet is very handy with which to write network tools and network test code.
-See the manpage and sample test code for more detailed information.
+Libnet is an API to help with the construction and handling of network
+packets. It provides a portable framework for low-level network packet
+writing and handling (use libnet in conjunction with libpcap and you can
+write some really cool stuff). Libnet includes packet creation at the IP
+layer and at the link layer as well as a host of supplementary and
+complementary functionality.
 
 %package devel
-Summary:        Development files for libnet
-Group:          Development/Libraries
-Provides:       %{name} = %{version}-%{release}
+Summary:	Development files for the libnet library
+Group:		Development/Libraries
+Requires:	%{name} = %{version}-%{release}
 
 %description devel
-Libnet is an API to help with the construction and handling of network packets.
-It provides a portable framework for low-level network packet writing and
-handling (use libnet in conjunction with libpcap and you can write some really
-cool stuff).  Libnet includes packet creation at the IP layer and at the link
-layer as well as a host of supplementary and complementary functionality.
-Libnet is very handy with which to write network tools and network test code.
-See the manpage and sample test code for more detailed information.
-
+The libnet-devel package includes header files and libraries necessary
+for developing programs which use the libnet library. Libnet is very handy
+with which to write network tools and network test code. See the manpage
+and sample test code for more detailed information.
 
 %prep
-%setup -q -n libnet
-sed -i -e 's/\r$//' doc/CHANGELOG doc/CONTRIB
-find . -depth -type d -name CVS -exec rm -rf {} ';'
-rm -rf sample/win32
-rm -f sample/.\#* sample/.*.swp
+%setup -q
+
+# Keep the sample directory untouched by make
+rm -rf __dist_sample
+mkdir __dist_sample
+cp -a sample __dist_sample
 
 %build
-%configure
+%configure --libdir=/%{_lib}
 make %{?_smp_mflags}
 
 %install
 rm -rf %{buildroot}
-make DESTDIR=%{buildroot} install
+make DESTDIR=%{buildroot} INSTALL='install -p' install
+
+# Move %{name}.so to %{_libdir}, remove static .a and libtool .la files
+rm -f %{buildroot}/%{_lib}/%{name}.{a,la,so}
+pushd %{buildroot}/%{_lib}
+mkdir -p %{buildroot}%{_libdir}
+ln -sf ../../%{_lib}/$(ls %{name}.so.?.?.?) %{buildroot}%{_libdir}/%{name}.so
+popd
+
+# Prepare samples directory and perform some fixes
+rm -rf __dist_sample/sample/win32
+rm -f __dist_sample/sample/Makefile.{am,in}
+sed -e 's@#include "../include/libnet.h"@#include <libnet.h>@' \
+  __dist_sample/sample/libnet_test.h > __dist_sample/sample/libnet_test.h.new
+touch -c -r __dist_sample/sample/libnet_test.h{,.new}
+mv -f __dist_sample/sample/libnet_test.h{.new,}
+
+# Remove makefile relics from documentation
+rm -f doc/html/Makefile*
 
-install -D --mode=0755 libnet-config %{buildroot}%{_bindir}/libnet-config
+%clean
+rm -rf %{buildroot}
 
-install -d --mode=0755 %{buildroot}%{_mandir}/man3
-install -D --mode=0644 doc/man/man3/libnet*.3 %{buildroot}%{_mandir}/man3/
+%post -p /sbin/ldconfig
 
-make -C sample clean
+%postun -p /sbin/ldconfig
 
-%clean
-rm -rf %{buildroot}
+%files
+%defattr(-,root,root,-)
+%doc README doc/CHANGELOG doc/CONTRIB doc/COPYING
+/%{_lib}/%{name}.so.*
 
 %files devel
 %defattr(-,root,root,-)
-%doc README VERSION
-%doc doc/BUGS doc/CHANGELOG doc/CONTRIB doc/COPYING doc/DESIGN_NOTES
-%doc doc/MIGRATION doc/PACKET_BUILDING doc/PORTED doc/RAWSOCKET_NON_SEQUITUR
-%doc doc/TODO doc/html/ sample/
-
-%{_bindir}/libnet-config
-%{_includedir}/libnet/
+%doc doc/BUGS doc/DESIGN_NOTES doc/MIGRATION doc/PACKET_BUILDING
+%doc doc/RAWSOCKET_NON_SEQUITUR doc/TODO doc/html/ __dist_sample/sample/
+%{_bindir}/%{name}-config
+%{_libdir}/%{name}.so
 %{_includedir}/libnet.h
-%{_libdir}/libnet.a
-%{_mandir}/man3/libnet*
+%{_includedir}/%{name}/
+%{_mandir}/man3/%{name}*.3*
 
 %changelog
-* Sat Apr 16 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.1.2.1-2
-- rebuilt with current VineSeed
+* Thu Mar 15 2012 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 1.1.5-1
+- updated to 1.1.5; spec revamped
+
+  - Sat Apr 16 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.1.2.1-2
+  - rebuilt with current VineSeed
+  
+  - Mon Sep 29 2008 Shu KONNO <owa@bg.wakwak.com> 1.1.2.1-1vl5
+  - applied new versioning policy
+  
+  - Mon Oct 23 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.1.2.1-0vl1
+  - initial build for Vine Linux based on FE package.
+
+* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.5-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
+
+* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.5-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
+
+* Tue Dec 28 2010 Robert Scheck <robert@fedoraproject.org> 1.1.5-1
+- Upgrade to 1.1.5
+
+* Fri Jul 09 2010 Robert Scheck <robert@fedoraproject.org> 1.1.4-4
+- Added patch for capability support rather UID check (#589770)
+
+* Fri Aug 21 2009 Robert Scheck <robert@fedoraproject.org> 1.1.4-3
+- Move libnet.so.* to /lib[64] to avoid static linking (#518150)
+
+* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.4-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
+
+* Thu Jun 11 2009 Robert Scheck <robert@fedoraproject.org> 1.1.4-1
+- Upgrade to 1.1.4
+
+* Sat Jun 06 2009 Robert Scheck <robert@fedoraproject.org> 1.1.3-2
+- Added upstream patch to solve HAVE_CONFIG_H (#501633, #502400)
+
+* Sat May 16 2009 Robert Scheck <robert@fedoraproject.org> 1.1.3-1
+- Upgrade to 1.1.3
+
+* Sun Apr 19 2009 Robert Scheck <robert@fedoraproject.org> 1.1.2.1-14
+- Enabled a shared library and made lots of spec file cleanups
+
+* Mon Feb 23 2009 Robert Scheck <robert@fedoraproject.org> 1.1.2.1-13
+- Rebuild against gcc 4.4 and rpm 4.6
+
+* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.1.2.1-12
+- Autorebuild for GCC 4.3
 
-* Mon Sep 29 2008 Shu KONNO <owa@bg.wakwak.com> 1.1.2.1-1vl5
-- applied new versioning policy
+* Wed Aug  1 2007 Patrice Dumas <pertusus@free.fr> 1.1.2.1-11
+- build with -fPIC (#250296)
 
-* Mon Oct 23 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.1.2.1-0vl1
-- initial build for Vine Linux based on FE package.
+* Fri Jan 12 2007 Patrice Dumas <pertusus@free.fr> 1.1.2.1-10
+- add debian patch to correct bad checksums
 
-* Tue Aug 29 2006 Patrice Dumas <dumas@centre-cired.fr> - 1.1.2.1-9
+* Tue Aug 29 2006 Patrice Dumas <pertusus@free.fr> 1.1.2.1-9
 - rebuild for FC6
 
-* Fri Feb 17 2006 Patrice Dumas <dumas@centre-cired.fr> - 1.1.2.1-8
+* Fri Feb 17 2006 Patrice Dumas <pertusus@free.fr> 1.1.2.1-8
 - rebuild for fc5
 
-* Thu Dec 22 2005 Patrice Dumas <dumas@centre-cired.fr> - 1.1.2.1-7
+* Thu Dec 22 2005 Patrice Dumas <pertusus@free.fr> 1.1.2.1-7
 - rebuild
 
-* Mon Sep 12 2005 Patrice Dumas <dumas@centre-cired.fr> 1.1.2.1-6
+* Mon Sep 12 2005 Patrice Dumas <pertusus@free.fr> 1.1.2.1-6
 - bump release and add dist tag
 
 * Tue Aug 30 2005 Paul Howarth <paul@city-fan.org> 1.1.2.1-5
 - spec file cleanup
 
-* Fri Aug 26 2005 Patrice Dumas <dumas@centre-cired.fr> 1.1.2.1-4
+* Fri Aug 26 2005 Patrice Dumas <pertusus@free.fr> 1.1.2.1-4
 - use pushd and popd (from Oliver Falk) 
 
-* Mon Aug 22 2005 Patrice Dumas <dumas@centre-cired.fr> 1.1.2.1-3
+* Mon Aug 22 2005 Patrice Dumas <pertusus@free.fr> 1.1.2.1-3
 - Correct dos end of lines
 - add in devel: Provides: %%{name} = %%{version}-%%{release} 
 
-* Fri Aug 12 2005 Patrice Dumas <dumas@centre-cired.fr> 1.1.2.1-2
+* Fri Aug 12 2005 Patrice Dumas <pertusus@free.fr> 1.1.2.1-2
 - put everything in a devel subpackage
 - add smpflags
 - clean in sample
 
-* Fri Aug 12 2005 Patrice Dumas <dumas@centre-cired.fr> 1.1.2.1-1
+* Fri Aug 12 2005 Patrice Dumas <pertusus@free.fr> 1.1.2.1-1
 - rebuild changing only name
 
 * Wed Jun 02 2004 Marcin Garski <garski@poczta.onet.pl> 1.1.2.1-2.fc2