File yad.spec of Package yad

#
# spec file for package yad
#
# 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:           yad
Version:        14.1
Release:        0
Summary:        Display graphical dialogs from shell scripts or command line
License:        GPL-3.0-or-later
URL:            https://github.com/v1cont/yad
Source0:        %{url}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires:  autoconf
BuildRequires:  intltool >= 0.40.0
BuildRequires:  libtool
BuildRequires:  pkgconfig
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(enchant)
BuildRequires:  pkgconfig(gspell-1)
BuildRequires:  pkgconfig(gtk+-3.0) >= 3.22
BuildRequires:  pkgconfig(gtksourceview-3.0)
BuildRequires:  pkgconfig(webkit2gtk-4.1)

%description
Yad (yet another dialog) is a fork of Zenity with many improvements, such as
custom buttons, additional dialogs, pop-up menu in notification icon and more.

%lang_package

%prep
%autosetup

%build
export CFLAGS="%{optflags} -Wno-deprecated-declarations -Wno-pointer-sign -Wno-error=return-type"
autoreconf -ivf
%configure \
    --enable-html       \
    --enable-tray       \
    --enable-spell      \
    --enable-sourceview \
    --enable-tools      \
    --enable-icon-browser
%make_build

%install
%make_install
%find_lang %{name}
%suse_update_desktop_file %{name}-settings
%suse_update_desktop_file %{name}-icon-browser

sed -i 's@#! /usr/bin/env bash@#! /usr/bin/bash@g' %{buildroot}%{_bindir}/%{name}-settings

%files
%doc AUTHORS NEWS README.md
%license COPYING
%{_bindir}/%{name}
%{_bindir}/%{name}-*
%{_datadir}/applications/%{name}-*.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.png
%{_datadir}/aclocal/%{name}.m4
%{_datadir}/glib-2.0/schemas/yad.gschema.xml
%{_mandir}/man?/%{name}*.?%{?ext_man}

%files lang -f %{name}.lang

%changelog
openSUSE Build Service is sponsored by