Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37728960
en ru br
ALT Linux repos
S:1.1.6-alt1
5.0: 1.1.2.1-alt4
4.1: 1.1.2.1-alt3
4.0: 1.1.2.1-alt2
3.0: 1.1.2.1-alt1

Group :: System/Libraries
RPM: libnet2

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

%define realname libnet
Name: %{realname}2
Version: 1.1.2.1
Release: alt1

Summary: A C library for portable packet creation and injection
Group: System/Libraries
License: BSD-like
Url: http://www.packetfactory.net/%realname
Packager: Dmitry V. Levin <ldv at altlinux.org>

Source: %url/dist/%realname-%version.tar.bz2
Source1: libnet-config.1
Patch1: %realname-1.1.2.1-alt-autotools.patch
Patch2: %realname-1.1.2.1-alt-init.patch

Provides: %realname = %version-%release
Obsoletes: %realname

%def_disable static

%package devel
Summary: Development Libnet library, header files, documentation and examples
Group: Development/C
Provides: %realname-devel = %version-%release
Obsoletes: %realname-devel
Conflicts: %{realname}1-devel
Requires: %name = %version-%release

%package devel-static
Summary: Static Libnet library
Group: Development/C
Provides: %realname-devel-static = %version-%release
Obsoletes: %realname-devel-static
Conflicts: %{realname}1-devel-static
Requires: %name-devel = %version-%release

%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 avery handy with which to
write network tools and network test code.  See the manpage and sample
test code for more detailed information.

%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 avery handy with which to
write network tools and network test code.  See the manpage and sample
test code for more detailed information.

This package contains the development library, it's header files,
documentation and examples needed to develop Libnet-based applications.

%description devel-static
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 avery handy with which to
write network tools and network test code.  See the manpage and sample
test code for more detailed information.

This package contains the static library required to develop statically
linked Libnet-based applications.

%prep
%setup -q -n %realname
%patch1 -p1
%patch2 -p1

find -type d -name CVS -print0 |
xargs -r0 rm -rf --
find -type f \( -name .cvsignore -o -name .#\* -o -name .\*.swp \) -print -delete

%build
autoreconf --force --install --verbose
export ac_cv_prog_AWK=gawk \
ac_cv_libnet_linux_procfs=yes
%{?_disable_static:export lt_cv_prog_cc_static_works=no}
%{?_enable_static:export lt_cv_prog_cc_static_works=yes}
%configure %{subst_enable static}
%make_build
bzip2 -9fk doc/CHANGELOG

%install
%makeinstall
mkdir -p %buildroot{%_man1dir,%_man3dir}
install -pm644 %SOURCE1 %buildroot%_man1dir/
cp -a doc/man/man3/* %buildroot%_man3dir/
rm -rf samples
cp -a sample samples
cp -p include/config.h libtool samples/
pwd=$PWD
pushd samples
make clean
rm Makefile.*
subst 's,\${SHELL} '$pwd'/missing --run ,,g' Makefile
subst 's,\$(top_srcdir)/src/libnet\.la,/usr/lib/libnet.so,g' Makefile
subst 's/\.\././g' Makefile
subst 's/^\(DEFAULT_INCLUDES *= *\).*/\1-I./g' Makefile
subst 's/^\(DEFS *= *\).*/\1/g' Makefile
subst 's/^\(Makefile:\).*/\1 Makefile/g' Makefile
popd
%define _customdocdir %_docdir/%realname-%version

%post -p %post_ldconfig
%postun -p %postun_ldconfig

%files
%_libdir/*.so.*

%files devel
%_bindir/*
%_libdir/*.so
%_includedir/*
%_mandir/man?/*
%doc doc/{BUGS,CHANGELOG.bz2,CONTRIB,COPYING,DESIGN_NOTES,MIGRATION,PACKET_BUILDING,PORTED,RAWSOCKET_NON_SEQUITUR,TODO} samples

%if_enabled static
%files devel-static
%_libdir/*.a
%endif

%changelog

Full changelog you can see here

 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin