File surf.spec of Package surf

#
# spec file for package tabbed
#
# Copyright (c) 2024 SUSE LLC
#
# 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:           surf
Version:        2.1+git20250419.48517e5
Release:        0
Summary:        A simple web browser based on WebKit2/GTK+
License:        MIT
URL:            http://surf.suckless.org
Source0:        http://dl.suckless.org/%{name}/%{name}-%{version}.tar.gz
Source1:        surf.desktop
Source2:        surf-tabbed.desktop
Source3:        suckless-surf.png
#Patch0:         update-webkit2gtk.diff
Patch1:         DOWNLOAD.config.def.h.diff
Patch2:         notifications-config.def.h.diff
Patch3:         notifications-surf.c.diff
Patch4:         surf-icon-smb.diff
Patch5:         surf-icon-2.1.diff
# ----
BuildRequires:  pkgconfig(gcr-3)
BuildRequires:  pkgconfig(gio-2.0)
BuildRequires:  pkgconfig(gtk+-3.0)
BuildRequires:  pkgconfig(webkit2gtk-4.1)
BuildRequires:  pkgconfig(webkit2gtk-web-extension-4.1)
BuildRequires:  pkgconfig(x11)
# ----
Requires:       aria2
Requires:       dmenu
Requires:       xdg-utils
Requires:       xprop
Recommends:     tabbed

%description
* surf is a simple web browser based on WebKit2/GTK+.
* It is able to display websites and follow links.
* It supports the XEmbed protocol which makes it possible to embed it in another application.
* Furthermore, one can point surf to another URI by setting its XProperties.

%prep
%setup
#%%patch -P 0
%patch -P 1
%patch -P 2
%patch -P 3
%patch -P 4
%patch -P5 -p1

%build
export CFLAGS="%{optflags} -Wno-error=incompatible-pointer-types"
%make_build CC="gcc"

%install
%make_install PREFIX=%{_prefix} LIBPREFIX=%{_prefix}/lib64 LIBDIR=%{_prefix}/lib64/surf
install -D -m0644 "%{SOURCE1}" "%{buildroot}%{_datadir}/applications/%{name}.desktop"
install -D -m0644 "%{SOURCE2}" "%{buildroot}%{_datadir}/applications/%{name}-tabbed.desktop"
install -D -m0644 "%{SOURCE3}" "%{buildroot}%{_datadir}/icons/suckless-%{name}.png"

%files
%dir %{_libdir}/surf
%{_bindir}/surf
%{_libdir}/%{name}/webext-surf.so
%{_datadir}/applications/%{name}.desktop
%{_datadir}/applications/%{name}-tabbed.desktop
%{_datadir}/icons/suckless-%{name}.png
%{_mandir}/man1/surf.1.gz
%license LICENSE
%doc README

%changelog

openSUSE Build Service is sponsored by