ALT Linux repositórios
Group :: Sistema/Bibliotecas
RPM: libnet2
Main Changelog Spec Patches Sources Download Gear Bugs e FR Repocop
%define realname libnet
Name: %{realname}2
Version: 1.1.2.1
Release: alt3
Summary: A C library for portable packet creation and injection
Group: System/Libraries
License: BSD-style
Url: http://www.packetfactory.net/libnet
Packager: Dmitry V. Levin <ldv at altlinux.org>
# %url/dist/libnet-%version.tar.gz
Source: libnet-%version.tar
Source1: libnet-config.1
Patch1: libnet-1.1.2.1-alt-autotools.patch
Patch2: libnet-1.1.2.1-alt-init.patch
Patch3: libnet-1.1.2.1-up-checksum.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
%patch3 -p1
find -type d -name CVS -print0 |
xargs -r0 rm -rf --
find -type f \( -name .cvsignore -o -name .#\* -o -name .\*.swp \) -delete
bzip2 -9k doc/CHANGELOG
%build
%add_optflags -fno-strict-aliasing
autoreconf -fiv
export ac_cv_prog_AWK=gawk \
ac_cv_libnet_linux_procfs=yes
%configure %{subst_enable static}
%make_build
%install
%makeinstall
# Relocate shared libraries from %_libdir/ to /%_lib/
mkdir %buildroot/%_lib
for f in %buildroot%_libdir/lib*.so; do
t=`objdump -p "$f" |awk '$1=="SONAME"{print $2}'`
[ -n "$t" ]
ln -sf ../../%_lib/"$t" "$f"
done
mv %buildroot%_libdir/lib*.so.* %buildroot/%_lib/
mkdir -p %buildroot{%_man1dir,%_man3dir}
install -pm644 %_sourcedir/libnet-config.1 %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
/%_lib/*.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
…
Todas as alterações você pod ver aqui
Name: %{realname}2
Version: 1.1.2.1
Release: alt3
Summary: A C library for portable packet creation and injection
Group: System/Libraries
License: BSD-style
Url: http://www.packetfactory.net/libnet
Packager: Dmitry V. Levin <ldv at altlinux.org>
# %url/dist/libnet-%version.tar.gz
Source: libnet-%version.tar
Source1: libnet-config.1
Patch1: libnet-1.1.2.1-alt-autotools.patch
Patch2: libnet-1.1.2.1-alt-init.patch
Patch3: libnet-1.1.2.1-up-checksum.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
%patch3 -p1
find -type d -name CVS -print0 |
xargs -r0 rm -rf --
find -type f \( -name .cvsignore -o -name .#\* -o -name .\*.swp \) -delete
bzip2 -9k doc/CHANGELOG
%build
%add_optflags -fno-strict-aliasing
autoreconf -fiv
export ac_cv_prog_AWK=gawk \
ac_cv_libnet_linux_procfs=yes
%configure %{subst_enable static}
%make_build
%install
%makeinstall
# Relocate shared libraries from %_libdir/ to /%_lib/
mkdir %buildroot/%_lib
for f in %buildroot%_libdir/lib*.so; do
t=`objdump -p "$f" |awk '$1=="SONAME"{print $2}'`
[ -n "$t" ]
ln -sf ../../%_lib/"$t" "$f"
done
mv %buildroot%_libdir/lib*.so.* %buildroot/%_lib/
mkdir -p %buildroot{%_man1dir,%_man3dir}
install -pm644 %_sourcedir/libnet-config.1 %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
/%_lib/*.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
…
Todas as alterações você pod ver aqui