File slirp.spec of Package slirp
#
# spec file for package slirp
#
# Copyright (c) 2021, Martin Hauke <mardnh@gmx.de>
#
# 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 https://bugs.opensuse.org/
#
Name: slirp
Version: 1.0.17
Release: 0
Summary: SLIP/PPP emulator using a dial up shell account
License: BSD-3-Clause
Group: Productivity/Networking/Other
URL: http://slirp.sourceforge.net/
Source: http://deb.debian.org/debian/pool/main/s/%{name}/%{name}_%{version}.orig.tar.gz
#More sources and patches taken from the debian package:
#http://deb.debian.org/debian/pool/main/s/slirp/slirp_1.0.17-11.debian.tar.xz
Source1: HOWTO-TEST
Source2: slirp-fullbolt.1
Source3: copyright
Patch1: 001-update-man-fix-hyphens-as-minus.patch
Patch2: 002-fix-arguements.patch
Patch3: 003-socklen_t.patch
Patch4: 004-compilation-warnings.patch
Patch5: 005-use-snprintf.patch
Patch6: 006-changelog-1.0.17.patch
Patch7: 007-debian-changes.patch
Patch8: 008-slirp-amd64-log-crash.patch
Patch9: 009-i-hate-perl.patch
Patch10: 010-fullbolt-fix.patch
Patch11: 011-sizeof_ipv4.patch
Patch12: 012_ipq64.patch
Patch13: 013_hurd.patch
Patch14: 014_CVE-2020-7039.patch
Patch15: 015_949003_explicit_extern_declaration.patch
Patch16: 016_c11b4078042_fix_64_bit_issue_in_slirp.patch
Patch17: 017_CVE-2020-8608.patch
%description
Slirp is a TCP/IP emulator which turns an ordinary shell account
into a (C)SLIP/PPP account. This allows shell users to use all the
funky Internet applications like Netscape, Mosaic, CUSeeMe, etc.
Please note that maybe your ISP really doesn't like you using slirp,
because they want to charge more for a ppp connection, so use it at
your own risk.
%prep
%autosetup -p1
cp %{SOURCE1} %{SOURCE3} .
%build
cd src
export CFLAGS="$CFLAGS -Wall -I. -DUSE_PPP -DUSE_MS_DNS -fno-strict-aliasing -Wno-unused -std=gnu89 -fcommon"
export PPPCFLAGS="$CFLAGS"
%configure
# slirp-fullbolt
%make_build CFLAGS="$CFLAGS -DFULL_BOLT" PPPCFLAGS="$PPPCFLAGS" clean all
mv slirp slirp-fullbolt
# slirp-normal
%make_build CFLAGS="$CFLAGS" PPPCFLAGS="$PPPCFLAGS" clean all
%install
install -Dm 0755 src/slirp %{buildroot}%{_bindir}/slirp
install -Dm 0755 src/slirp-fullbolt %{buildroot}%{_bindir}/slirp-fullbolt
install -Dm 0644 src/slirp.man %{buildroot}/%{_mandir}/man1/slirp.1
install -Dm 0644 %{SOURCE2} %{buildroot}/%{_mandir}/man1/slirp-fullbolt.1
%files
%license copyright
%doc CONTRIB README README.NEXT TODO TODO.old docs/CONFIG docs/alt.dcom.slip-emulators.FAQ docs/slirp.doc HOWTO-TEST
%{_bindir}/slirp
%{_bindir}/slirp-fullbolt
%{_mandir}/man1/slirp-fullbolt.1%{?ext_man}
%{_mandir}/man1/slirp.1%{?ext_man}
%changelog