2008-04-24 04:47:38 +02:00
|
|
|
#
|
|
|
|
# spec file for package netcat-openbsd (Version 1.89)
|
|
|
|
#
|
2010-05-28 19:00:01 +02:00
|
|
|
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2008-04-24 04:47:38 +02:00
|
|
|
#
|
2009-02-20 21:28:10 +01:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2008-04-24 04:47:38 +02:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
# norootforbuild
|
|
|
|
|
|
|
|
Url: http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/nc/
|
|
|
|
|
|
|
|
Name: netcat-openbsd
|
|
|
|
Version: 1.89
|
2010-05-28 19:00:01 +02:00
|
|
|
Release: 67
|
|
|
|
License: BSD3c
|
2008-04-24 04:47:38 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
BuildRequires: cmake glib2-devel quilt
|
2010-06-25 19:21:56 +02:00
|
|
|
PreReq: update-alternatives
|
2008-04-24 04:47:38 +02:00
|
|
|
Group: Productivity/Networking/Other
|
|
|
|
Summary: TCP/IP swiss army knife
|
|
|
|
Source: %{name}-%{version}.tar.bz2
|
|
|
|
Source1: CMakeLists.txt
|
2010-05-28 19:00:01 +02:00
|
|
|
Patch0: netcat-openbsd_1.89-3ubuntu2.diff.gz
|
2010-06-25 19:21:56 +02:00
|
|
|
Provides: nc6 = %{version} netcat
|
|
|
|
Obsoletes: nc6 <= 1.0 netcat <= 1.10
|
2008-04-24 04:47:38 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
A simple Unix utility which reads and writes data across network
|
|
|
|
connections using TCP or UDP protocol. It is designed to be a reliable
|
|
|
|
"bac k-end" tool that can be used directly or easily driven by other
|
|
|
|
programs and scripts. At the same time it is a feature-rich network
|
|
|
|
debuggin g and exploration tool, since it can create almost any kind of
|
|
|
|
connection you would need and has several interesting built-in
|
|
|
|
capabilities.
|
|
|
|
|
|
|
|
This package contains the OpenBSD rewrite of netcat, including support
|
|
|
|
for IPv6, proxies, and Unix sockets.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
Eric Jackson <ericj@monkey.org>
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
%patch0 -p1
|
|
|
|
%{__sed} -i -e 's@Debian patchlevel " DEBIAN_VERSION "@SUSE Linux@g' debian/patches/help-version-exit.patch
|
|
|
|
QUILT_PATCHES=debian/patches quilt push -a
|
|
|
|
%{__cp} %{S:1} .
|
|
|
|
|
|
|
|
%build
|
|
|
|
export CFLAGS="%{optflags}"
|
|
|
|
cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} .
|
2009-02-20 21:28:10 +01:00
|
|
|
%{__make} %{?jobs:-j%jobs}
|
2008-04-24 04:47:38 +02:00
|
|
|
|
|
|
|
%install
|
|
|
|
%makeinstall
|
2010-06-25 19:21:56 +02:00
|
|
|
mkdir -p \
|
|
|
|
${RPM_BUILD_ROOT}/etc/alternatives
|
|
|
|
touch \
|
|
|
|
${RPM_BUILD_ROOT}/etc/alternatives/netcat \
|
|
|
|
${RPM_BUILD_ROOT}/etc/alternatives/netcat.1.gz
|
|
|
|
%{__ln_s} -f %{_bindir}/nc ${RPM_BUILD_ROOT}/%{_bindir}/netcat
|
|
|
|
%{__ln_s} -f nc.1.gz ${RPM_BUILD_ROOT}/%{_mandir}/man1/netcat.1.gz
|
2008-04-24 04:47:38 +02:00
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf "$RPM_BUILD_ROOT"
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_bindir}/nc
|
2010-06-25 19:21:56 +02:00
|
|
|
%{_bindir}/netcat
|
2008-04-24 04:47:38 +02:00
|
|
|
%{_mandir}/man1/nc.1.gz
|
2010-06-25 19:21:56 +02:00
|
|
|
%{_mandir}/man1/netcat.1.gz
|
|
|
|
%ghost /etc/alternatives/netcat
|
|
|
|
%ghost /etc/alternatives/netcat.1.gz
|
|
|
|
|
|
|
|
%post
|
|
|
|
/usr/sbin/update-alternatives --install \
|
|
|
|
%{_bindir}/netcat netcat %{_bindir}/nc 10 \
|
|
|
|
--slave %{_mandir}/man1/netcat.1.gz netcat.1.gz %{_mandir}/man1/nc.1.gz
|
|
|
|
|
|
|
|
%preun
|
|
|
|
if [ "$1" = 0 ] ; then
|
|
|
|
/usr/sbin/update-alternatives --remove \
|
|
|
|
netcat %{_bindir}/nc
|
|
|
|
fi
|
2008-04-24 04:47:38 +02:00
|
|
|
|
|
|
|
%changelog
|