File tcpview.spec of Package tcpview

#
# spec file for package tcpview
#
# Copyright (c) 2023 Malcolm J Lewis <malcolmlewis@opensuse.org>
#
# 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:           tcpview
Version:        3.4.0+1
Release:        0
License:        GPL-3.0
Summary:        Graphical network connections viewer for Linux
Group:          Productivity/Networking/Security
URL:            https://github.com/chipmunk-sm/tcpview
Source0:        %{name}-%{version}.tar.xz
BuildRequires:  cmake(Qt5Widgets)
BuildRequires:  hicolor-icon-theme
BuildRequires:  libuuid-devel
Recommends:     whois

%description
TcpView For Linux. Graphical network connections viewer for Linux.

%prep
%autosetup -p1

%build
mkdir -p build
cd build
qmake-qt5 QMAKE_CFLAGS+="%optflags" \
          QMAKE_CXXFLAGS+="%optflags" \
          QMAKE_STRIP="/bin/true" \
          ../tcpview.pro
%make_jobs

%install
strip build/tcpview
install -d -m 0755 %{buildroot}%{_bindir} \
                   %{buildroot}%{_datadir}/applications \
                   %{buildroot}%{_datadir}/icons/hicolor/scalable/apps
install -m 0755 build/tcpview %{buildroot}%{_bindir}/tcpview
install -m 0644 data/tcpview.desktop  %{buildroot}%{_datadir}/applications/tcpview.desktop
install -m 0644 data/tcpview.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/tcpview.svg
install -m 0644 data/tcpviewU.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/tcpviewU.svg

%files
%license LICENSE
%{_bindir}/tcpview
%{_datadir}/applications/tcpview.desktop
%{_datadir}/icons/hicolor/scalable/apps/tcpview*.svg

%changelog

openSUSE Build Service is sponsored by