forked from pool/iputils
130 lines
4.1 KiB
RPMSpec
130 lines
4.1 KiB
RPMSpec
#
|
|
# spec file for package iputils
|
|
#
|
|
# Copyright (c) 2016 SUSE LINUX 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: iputils
|
|
BuildRequires: docbook_3
|
|
BuildRequires: iso_ent
|
|
BuildRequires: libcap-devel
|
|
BuildRequires: libopenssl-devel
|
|
BuildRequires: opensp
|
|
BuildRequires: perl-SGMLS
|
|
BuildRequires: pkgconfig(libidn)
|
|
# For Makefile modifications
|
|
BuildRequires: sed
|
|
Summary: IPv4 and IPv6 Networking Utilities
|
|
License: BSD-3-Clause and GPL-2.0+
|
|
Group: Productivity/Networking/Other
|
|
Version: s20160308
|
|
Release: 0
|
|
Url: https://github.com/iputils/iputils
|
|
Source: https://github.com/iputils/iputils/archive/%{version}.tar.gz
|
|
Patch8: iputils-sec-ping-unblock.diff
|
|
Patch9: iputils-ping-interrupt.diff
|
|
# PATCH-FIX-UPSTREAM iputils-remove-bogus-check-required-for-2.4.9-kernels.patch tiwai@suse.de - boo#927831
|
|
Patch10: iputils-remove-bogus-check-required-for-2.4.9-kernels.patch
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
PreReq: permissions
|
|
# I have spotted at least two packages (yast-printer and dhcp-client) that need
|
|
# /bin/ping and /sbin/arping but they do not seem to use them with absolute
|
|
# paths so we may be lukcy and no further changes are necessary.
|
|
Provides: /bin/ping
|
|
Provides: /sbin/arping
|
|
|
|
%description
|
|
This package contains some small network tools for IPv4 and IPv6 like
|
|
rdisc, ping, arping, tracepath and tracepath6.
|
|
|
|
%prep
|
|
%setup -q
|
|
%patch8 -p1
|
|
%patch9 -p1
|
|
%patch10 -p1
|
|
|
|
%build
|
|
|
|
# Drop LASTTAG variable since it needs git and it's not used for regular
|
|
# building
|
|
sed -i '/^LASTTAG:=/d' Makefile
|
|
# Do not link against nettle
|
|
sed -i '/^USE_NETTLE/s/yes/no/' Makefile
|
|
|
|
# Export CFLAGS so we can also benefit from the ones the Makefile sets for us
|
|
# Instead of overriding all of them.
|
|
export CFLAGS='%{optflags} -fpie'
|
|
# Pulled-in by the LINK.o variable.
|
|
export LDFLAGS='-pie -Wl,-z,relro,-z,now'
|
|
|
|
# Build only selected apps
|
|
make %{?_smp_mflags} arping clockdiff ping rdisc tracepath \
|
|
tracepath6 rarpd
|
|
make man
|
|
|
|
%install
|
|
mkdir -p $RPM_BUILD_ROOT/%_sbindir
|
|
mkdir -p $RPM_BUILD_ROOT/%_bindir
|
|
install arping $RPM_BUILD_ROOT/%{_sbindir}
|
|
install clockdiff $RPM_BUILD_ROOT/%{_sbindir}
|
|
install rdisc $RPM_BUILD_ROOT/%{_sbindir}/in.rdisc
|
|
# boo#795788
|
|
install tracepath $RPM_BUILD_ROOT/%{_bindir}
|
|
install tracepath6 $RPM_BUILD_ROOT/%{_bindir}
|
|
install ping $RPM_BUILD_ROOT/%{_bindir}
|
|
#install rarpd $RPM_BUILD_ROOT/%{_bindir}
|
|
#UsrMerge
|
|
# We still have reverse dependencies using /sbin/* or /bin/*
|
|
# so keep these symlinks for now. They are slowly being fixed
|
|
# but lets not just break them yet.
|
|
mkdir -p $RPM_BUILD_ROOT/{bin,sbin}
|
|
ln -sf %{_sbindir}/arping $RPM_BUILD_ROOT/sbin
|
|
ln -sf %{_sbindir}/clockdiff $RPM_BUILD_ROOT/sbin
|
|
ln -sf %{_sbindir}/in.rdisc $RPM_BUILD_ROOT/sbin
|
|
ln -sf %{_bindir}/tracepath $RPM_BUILD_ROOT/bin
|
|
ln -sf %{_bindir}/tracepath6 $RPM_BUILD_ROOT/bin
|
|
ln -sf %{_bindir}/ping $RPM_BUILD_ROOT/bin
|
|
#EndUsrMerge
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man8
|
|
# Remove conflicting manpages
|
|
rm doc/tftpd* doc/traceroute* doc/rarpd*
|
|
# Install the rest
|
|
install -m 644 doc/*.8 $RPM_BUILD_ROOT%_mandir/man8/
|
|
|
|
%post
|
|
%set_permissions %{_bindir}/ping
|
|
|
|
%verifyscript
|
|
%verify_permissions -e %{_bindir}/ping
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%doc RELNOTES
|
|
%verify(not mode) %attr(0755,root,root) %{_bindir}/ping
|
|
#%{_bindir}/rarpd
|
|
%{_sbindir}/arping
|
|
%{_sbindir}/clockdiff
|
|
%{_bindir}/tracepath
|
|
%{_bindir}/tracepath6
|
|
%{_sbindir}/in.rdisc
|
|
%attr(644,root,root) %_mandir/man8/*
|
|
#UsrMerge
|
|
/bin/*
|
|
/sbin/*
|
|
#EndUsrMerge
|
|
|
|
%changelog
|