File redir.spec of Package redir

#
# spec file for package redir
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           redir
Version:        2.2.1
Release:        0
Summary:        TCP port redirector
License:        GPL-2.0+
Group:          Applications/Internet
Url:            http://sammy.net/~sammy/hacks/
Source:         http://sammy.net/~sammy/hacks/redir-%{version}.tar.gz
BuildRequires:  tcpd-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} >= 1230
BuildRequires:  libwrap0
BuildRequires:  tcpd
%endif

%description
redir is a port redirector, used to forward incoming connections
to somewhere else. by far the cleanest piece of code here, because
someone else liked it enough to fix it.

%prep
%setup -q

%build
make %{?_smp_mflags}
mv -f redir redir.orig
mv -f contrib/redir-ha.c redir.c
make %{?_smp_mflags}

%install
install -Dp -m0755 redir.orig %{buildroot}%{_bindir}/redir
install -Dp -m0755 redir %{buildroot}%{_bindir}/redir-ha
install -Dp -m0644 redir.man %{buildroot}%{_mandir}/man1/redir.1

%files
%defattr(-, root, root, 0755)
%doc CHANGES contrib/README* contrib/redir-wrapper* COPYING README transproxy.txt
%doc %{_mandir}/man?/*
%{_bindir}/*

%changelog
openSUSE Build Service is sponsored by