|
| 1 | +%global debug_package %{nil} |
| 2 | +# See: https://src.fedoraproject.org/rpms/yad/blob/rawhide/f/yad.spec |
| 3 | + |
| 4 | +Name: yad |
| 5 | +# renovate: datasource=github-releases depName=v1cont/yad |
| 6 | +Version: 14.1 |
| 7 | +Release: 1%{?dist} |
| 8 | +Summary: Display graphical dialogs from shell scripts or command line |
| 9 | + |
| 10 | +License: GPL-3.0-or-later |
| 11 | +URL: https://github.com/v1cont/%{name} |
| 12 | +Source0: https://github.com/v1cont/%{name}/archive/refs/tags/v%{version}.tar.gz |
| 13 | + |
| 14 | +BuildRequires: make |
| 15 | +BuildRequires: automake |
| 16 | +BuildRequires: intltool |
| 17 | +BuildRequires: gtk3-devel >= 3.22.0 |
| 18 | +BuildRequires: webkit2gtk4.1-devel |
| 19 | +BuildRequires: desktop-file-utils |
| 20 | +BuildRequires: perl(XML::Parser) |
| 21 | +BuildRequires: intltool >= 0.40.0 |
| 22 | +BuildRequires: pkgconfig |
| 23 | +BuildRequires: gettext |
| 24 | +BuildRequires: gtksourceview3-devel |
| 25 | +BuildRequires: gspell-devel |
| 26 | + |
| 27 | +BuildRequires: gcc |
| 28 | + |
| 29 | + |
| 30 | +%description |
| 31 | +Yad (yet another dialog) is a fork of zenity with many improvements, such as |
| 32 | +custom buttons, additional dialogs, pop-up menu in notification icon and more. |
| 33 | + |
| 34 | + |
| 35 | +%prep |
| 36 | +%setup -q |
| 37 | + |
| 38 | + |
| 39 | +%build |
| 40 | +autoreconf -ivf && intltoolize |
| 41 | + |
| 42 | +%configure --enable-standalone |
| 43 | + |
| 44 | +make %{?_smp_mflags} |
| 45 | + |
| 46 | + |
| 47 | +%install |
| 48 | +make install DESTDIR=%{buildroot} |
| 49 | + |
| 50 | +rm -f %{buildroot}%{_bindir}/pfd |
| 51 | + |
| 52 | +%find_lang %{name} |
| 53 | + |
| 54 | +# Encoding key in group "Desktop Entry" is deprecated. |
| 55 | +# Place the menu entry for yad-icon-browser under "Utilities". |
| 56 | +desktop-file-install --remove-key Encoding \ |
| 57 | + --remove-category Development \ |
| 58 | + --add-category Utility \ |
| 59 | + --dir=%{buildroot}%{_datadir}/applications \ |
| 60 | + %{buildroot}%{_datadir}/applications/%{name}-icon-browser.desktop |
| 61 | + |
| 62 | + |
| 63 | +%post |
| 64 | +update-desktop-database %{_datadir}/applications &>/dev/null || : |
| 65 | +/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : |
| 66 | + |
| 67 | + |
| 68 | +%postun |
| 69 | +update-desktop-database %{_datadir}/applications &>/dev/null || : |
| 70 | +if [ $1 -eq 0 ] ; then |
| 71 | + /usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || : |
| 72 | + /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : |
| 73 | + /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : |
| 74 | +fi |
| 75 | + |
| 76 | + |
| 77 | +%posttrans |
| 78 | +/usr/bin/glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || : |
| 79 | +/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : |
| 80 | + |
| 81 | + |
| 82 | +%files -f %{name}.lang |
| 83 | +%doc README.md AUTHORS NEWS THANKS TODO |
| 84 | +%license COPYING |
| 85 | +%{_bindir}/* |
| 86 | +%{_datadir}/icons/hicolor/*/apps/* |
| 87 | +%{_datadir}/applications/*.desktop |
| 88 | +%{_datadir}/glib-2.0/schemas/* |
| 89 | +%{_datadir}/aclocal/%{name}.m4 |
| 90 | +%{_mandir}/*/* |
| 91 | + |
| 92 | + |
| 93 | +%changelog |
| 94 | +%autochangelog |
0 commit comments