Accepting request 67007 from network:utilities

Accepted submit request 67007 from user coolo

OBS-URL: https://build.opensuse.org/request/show/67007
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/netcat-openbsd?expand=0&rev=10
This commit is contained in:
Ruediger Oertel 2011-04-21 11:40:50 +00:00 committed by Git OBS Bridge
commit 939fbc9b75
2 changed files with 31 additions and 2 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Jun 25 16:55:06 UTC 2010 - lmuelle@suse.de
- Use update-alternatives to set netcat symbolic links for compatibility.
- Provides and obsoltes netcat.
-------------------------------------------------------------------
Fri May 28 16:27:34 UTC 2010 - cristian.rodriguez@opensuse.org

View File

@ -25,13 +25,14 @@ Release: 67
License: BSD3c
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: cmake glib2-devel quilt
PreReq: update-alternatives
Group: Productivity/Networking/Other
Summary: TCP/IP swiss army knife
Source: %{name}-%{version}.tar.bz2
Source1: CMakeLists.txt
Patch0: netcat-openbsd_1.89-3ubuntu2.diff.gz
Provides: nc6 = %{version}
Obsoletes: nc6 <= 1.0
Provides: nc6 = %{version} netcat
Obsoletes: nc6 <= 1.0 netcat <= 1.10
%description
A simple Unix utility which reads and writes data across network
@ -65,6 +66,13 @@ cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} .
%install
%makeinstall
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
%clean
rm -rf "$RPM_BUILD_ROOT"
@ -72,6 +80,21 @@ rm -rf "$RPM_BUILD_ROOT"
%files
%defattr(-,root,root)
%{_bindir}/nc
%{_bindir}/netcat
%{_mandir}/man1/nc.1.gz
%{_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
%changelog