diff --git a/.gitignore b/.gitignore index f6d337c..c8918c8 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/libnotify-0.7.7.tar.xz +libnotify-0.8.6.tar.xz diff --git a/.libnotify.metadata b/.libnotify.metadata deleted file mode 100644 index 90fb564..0000000 --- a/.libnotify.metadata +++ /dev/null @@ -1 +0,0 @@ -4cdf482737df504ac37f5489940b5c7ea5e18d57 SOURCES/libnotify-0.7.7.tar.xz diff --git a/SOURCES/0001-notify-send-Give-failing-exit-code-if-showing-notifi.patch b/SOURCES/0001-notify-send-Give-failing-exit-code-if-showing-notifi.patch deleted file mode 100644 index 3129e10..0000000 --- a/SOURCES/0001-notify-send-Give-failing-exit-code-if-showing-notifi.patch +++ /dev/null @@ -1,139 +0,0 @@ -From d530d52df61731f1e36071a89e4d2a8719a3cfbf Mon Sep 17 00:00:00 2001 -From: Ray Strode -Date: Tue, 12 May 2020 10:12:26 -0400 -Subject: [PATCH] notify-send: Give failing exit code if showing notification - fails - -Right now notify-send will quietly return a successful exit status -even if showing the notification fails. - -This commit changes the behavior to instead fail on failure. - -https://gitlab.gnome.org/GNOME/libnotify/-/merge_requests/13 ---- - tools/notify-send.c | 18 ++++++++++++++---- - 1 file changed, 14 insertions(+), 4 deletions(-) - -diff --git a/tools/notify-send.c b/tools/notify-send.c -index c0b9eeb..f8d59de 100644 ---- a/tools/notify-send.c -+++ b/tools/notify-send.c -@@ -104,61 +104,61 @@ notify_notification_set_hint_variant (NotifyNotification *notification, - N_("Invalid hint type \"%s\". Valid types " - "are int, double, string and byte."), - type); - return FALSE; - } - - if (conv_error) { - *error = g_error_new (G_OPTION_ERROR, - G_OPTION_ERROR_BAD_VALUE, - N_("Value \"%s\" of hint \"%s\" could not be " - "parsed as type \"%s\"."), value, key, - type); - return FALSE; - } - - return TRUE; - } - - int - main (int argc, char *argv[]) - { - static const char *summary = NULL; - char *body; - static const char *type = NULL; - static char *app_name = NULL; - static char *icon_str = NULL; - static char *icons = NULL; - static char **n_text = NULL; - static char **hints = NULL; - static gboolean do_version = FALSE; -- static gboolean hint_error = FALSE; -+ static gboolean hint_error = FALSE, show_error = FALSE; - static glong expire_timeout = NOTIFY_EXPIRES_DEFAULT; - GOptionContext *opt_ctx; - NotifyNotification *notify; - GError *error = NULL; - gboolean retval; - - static const GOptionEntry entries[] = { - {"urgency", 'u', 0, G_OPTION_ARG_CALLBACK, - g_option_arg_urgency_cb, - N_("Specifies the urgency level (low, normal, critical)."), - N_("LEVEL")}, - {"expire-time", 't', 0, G_OPTION_ARG_INT, &expire_timeout, - N_ - ("Specifies the timeout in milliseconds at which to expire the " - "notification."), N_("TIME")}, - {"app-name", 'a', 0, G_OPTION_ARG_STRING, &app_name, - N_("Specifies the app name for the icon"), N_("APP_NAME")}, - {"icon", 'i', 0, G_OPTION_ARG_FILENAME, &icons, - N_("Specifies an icon filename or stock icon to display."), - N_("ICON[,ICON...]")}, - {"category", 'c', 0, G_OPTION_ARG_FILENAME, &type, - N_("Specifies the notification category."), - N_("TYPE[,TYPE...]")}, - {"hint", 'h', 0, G_OPTION_ARG_FILENAME_ARRAY, &hints, - N_ - ("Specifies basic extra data to pass. Valid types are int, double, string and byte."), - N_("TYPE:NAME:VALUE")}, - {"version", 'v', 0, G_OPTION_ARG_NONE, &do_version, - N_("Version of the package."), - NULL}, -@@ -242,39 +242,49 @@ main (int argc, char *argv[]) - - while ((hint = hints[i++])) { - tokens = g_strsplit (hint, ":", -1); - l = g_strv_length (tokens); - - if (l != 3) { - fprintf (stderr, "%s\n", - N_("Invalid hint syntax specified. " - "Use TYPE:NAME:VALUE.")); - hint_error = TRUE; - } else { - retval = notify_notification_set_hint_variant (notify, - tokens[0], - tokens[1], - tokens[2], - &error); - - if (!retval) { - fprintf (stderr, "%s\n", error->message); - g_error_free (error); - hint_error = TRUE; - } - } - - g_strfreev (tokens); - if (hint_error) - break; - } - } - -- if (!hint_error) -- notify_notification_show (notify, NULL); -+ if (!hint_error) { -+ retval = notify_notification_show (notify, &error); -+ -+ if (!retval) { -+ fprintf (stderr, "%s\n", error->message); -+ g_error_free (error); -+ show_error = TRUE; -+ } -+ } - - g_object_unref (G_OBJECT (notify)); - - notify_uninit (); - -- exit (hint_error); -+ if (hint_error || show_error) -+ exit (1); -+ -+ return 0; - } --- -2.32.0 - diff --git a/drop-docbook5-style-xsl.patch b/drop-docbook5-style-xsl.patch new file mode 100644 index 0000000..aee8cab --- /dev/null +++ b/drop-docbook5-style-xsl.patch @@ -0,0 +1,225 @@ +From b0f7fc9293e6ee2d42ebd85ac6c1c8fe15353a8a Mon Sep 17 00:00:00 2001 +From: rpm-build +Date: Wed, 17 Jul 2024 11:00:42 +0200 +Subject: [PATCH] drop-docbook5-style-xsl.patch + +--- + docs/meson.build | 7 +-- + docs/notify-send.1 | 141 +++++++++++++++++++++++++++++++++++++++++++++ + meson.build | 21 ------- + meson_options.txt | 2 +- + 4 files changed, 143 insertions(+), 28 deletions(-) + create mode 100644 docs/notify-send.1 + +diff --git a/docs/meson.build b/docs/meson.build +index 4c5ba64..bd44664 100644 +--- a/docs/meson.build ++++ b/docs/meson.build +@@ -30,11 +30,6 @@ if get_option('man') + manpages = ['notify-send'] + + foreach page : manpages +- custom_target(page + '-man', +- input: page + '.xml', +- output: page + '.1', +- command: xsltproc_command, +- install: true, +- install_dir: man1dir) ++ install_man(page + '.1') + endforeach + endif +diff --git a/docs/notify-send.1 b/docs/notify-send.1 +new file mode 100644 +index 0000000..fb58424 +--- /dev/null ++++ b/docs/notify-send.1 +@@ -0,0 +1,141 @@ ++'\" t ++.\" Title: notify-send ++.\" Author: Andre Filipe de Assuncao e Brito ++.\" Generator: DocBook XSL Stylesheets vsnapshot ++.\" Date: November 2005 ++.\" Manual: User Commands ++.\" Source: libnotify ++.\" Language: English ++.\" ++.TH "NOTIFY\-SEND" "1" "" "libnotify" "User Commands" ++.\" ----------------------------------------------------------------- ++.\" * Define some portability stuff ++.\" ----------------------------------------------------------------- ++.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++.\" http://bugs.debian.org/507673 ++.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html ++.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++.ie \n(.g .ds Aq \(aq ++.el .ds Aq ' ++.\" ----------------------------------------------------------------- ++.\" * set default formatting ++.\" ----------------------------------------------------------------- ++.\" disable hyphenation ++.nh ++.\" disable justification (adjust text to left margin only) ++.ad l ++.\" ----------------------------------------------------------------- ++.\" * MAIN CONTENT STARTS HERE * ++.\" ----------------------------------------------------------------- ++.SH "NAME" ++notify-send \- a program to send desktop notifications ++.SH "SYNOPSIS" ++.HP \w'\fBnotify\-send\fR\ 'u ++\fBnotify\-send\fR [\fIOPTIONS\fR] {\fIsummary\fR} [\fIbody\fR] ++.SH "DESCRIPTION" ++.PP ++With ++\fBnotify\-send\fR ++you can send desktop notifications to the user via a notification daemon from the command line\&. These notifications can be used to inform the user about an event or display some form of information without getting in the user\(cqs way\&. ++.SH "OPTIONS" ++.PP ++\fB\-?\fR, \fB\-\-help\fR ++.RS 4 ++Show help and exit\&. ++.RE ++.PP ++\fB\-a\fR, \fB\-\-app\-name\fR=\fIAPP_NAME\fR ++.RS 4 ++Specifies the app name for the notification\&. ++.RE ++.PP ++\fB\-A\fR, \fB\-\-action\fR=[\fINAME\fR=]\fIText\&.\&.\&.\fR ++.RS 4 ++Specifies the actions to display to the user\&. Implies ++\fB\-\-wait\fR ++to wait for user input\&. May be set multiple times\&. The ++\fINAME\fR ++of the action is output to ++stdout\&. If ++\fINAME\fR ++is not specified, the numerical index of the option is used (starting with ++1)\&. ++.RE ++.PP ++\fB\-u\fR, \fB\-\-urgency\fR=\fILEVEL\fR ++.RS 4 ++Specifies the urgency level (low, ++normal, ++critical)\&. ++.RE ++.PP ++\fB\-t\fR, \fB\-\-expire\-time\fR=\fITIME\fR ++.RS 4 ++The duration, in milliseconds, for the notification to appear on screen\&. ++.sp ++Not all implementations use this parameter\&. GNOME Shell and Notify OSD always ignore it, while Plasma ignores it for notifications with the critical urgency level\&. ++.RE ++.PP ++\fB\-i\fR, \fB\-\-icon\fR=\fIICON\fR ++.RS 4 ++Specifies an icon filename or stock icon to display\&. ++.RE ++.PP ++\fB\-c\fR, \fB\-\-category\fR=\fITYPE\fR[,\fITYPE\fR\&...] ++.RS 4 ++Specifies the notification category\&. ++.RE ++.PP ++\fB\-h\fR, \fB\-\-hint\fR=\fITYPE\fR:\fINAME\fR:\fIVALUE\fR ++.RS 4 ++Specifies basic extra data to pass\&. Valid types are ++BOOLEAN, ++INT, ++DOUBLE, ++STRING, ++BYTE ++and ++VARIANT\&. ++.RE ++.PP ++\fB\-p\fR, \fB\-\-print\-id\fR ++.RS 4 ++Print the notification ID\&. ++.RE ++.PP ++\fB\-r\fR, \fB\-\-replace\-id\fR=\fIREPLACE_ID\fR ++.RS 4 ++The ID of the notification to replace\&. ++.RE ++.PP ++\fB\-w\fR, \fB\-\-wait\fR ++.RS 4 ++Wait for the notification to be closed before exiting\&. If the ++\fBexpire\-time\fR ++is set, it will be used as the maximum waiting time\&. ++.RE ++.PP ++\fB\-e\fR, \fB\-\-transient\fR ++.RS 4 ++Show a transient notification\&. Transient notifications by\-pass the server\*(Aqs persistence capability, if any\&. And so it won\*(Aqt be preserved until the user acknowledges it\&. ++.RE ++.SH "SEE ALSO" ++.PP ++The Desktop Notification Spec on ++\m[blue]\fBhttps://specifications\&.freedesktop\&.org/notification\-spec/\fR\m[]\&. ++.SH "AUTHORS" ++.PP ++\fBAndre Filipe de Assuncao e Brito\fR <\&decko@noisemakers\&.org\&> ++.RS 4 ++Original author ++.RE ++.PP ++\fBPaul van Tilburg\fR <\&paulvt@debian\&.org\&> ++.RS 4 ++Original author ++.RE ++.PP ++\fBRiccardo Setti\fR <\&giskard@debian\&.org\&> ++.RS 4 ++Original author ++.RE +diff --git a/meson.build b/meson.build +index 82e796a..9c3fe81 100644 +--- a/meson.build ++++ b/meson.build +@@ -55,27 +55,6 @@ configure_file(input: 'config.h.meson', + output : 'config.h', + configuration : conf) + +-if get_option('man') +- xsltproc = find_program('xsltproc', required: true) +- stylesheet = 'http://docbook.sourceforge.net/release/xsl-ns/current/manpages/docbook.xsl' +- xsltproc_command = [ +- xsltproc, +- '--nonet', +- '--stringparam', 'man.output.quietly', '1', +- '--stringparam', 'funcsynopsis.style', 'ansi', +- '--stringparam', 'man.th.extra1.suppress', '1', +- '-o', '@OUTPUT@', +- stylesheet, +- '@INPUT@', +- ] +- +- testrun = run_command(xsltproc, '--nonet', stylesheet, check: false) +- +- if testrun.returncode() != 0 +- error('DocBook stylesheet for generating man pages not found, you need to install docbook-xsl-ns or similar package.') +- endif +-endif +- + subdir('libnotify') + subdir('tools') + subdir('docs') +diff --git a/meson_options.txt b/meson_options.txt +index d20d16d..fb0f005 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -9,7 +9,7 @@ option('introspection', + option('man', + type: 'boolean', + value: true, +- description: 'Enable generating the manual page (depends on xsltproc)') ++ description: 'Install the manual page') + option('gtk_doc', + type: 'boolean', + value: true, +-- +2.45.1 + diff --git a/SPECS/libnotify.spec b/libnotify.spec similarity index 67% rename from SPECS/libnotify.spec rename to libnotify.spec index 2ff57fd..52a3602 100644 --- a/SPECS/libnotify.spec +++ b/libnotify.spec @@ -1,23 +1,25 @@ -%define glib2_version 2.26.0 +%define glib2_version 2.38.0 -Name: libnotify -Version: 0.7.7 -Release: 6%{?dist} -Summary: Desktop notification library +Name: libnotify +Version: 0.8.6 +Release: 1%{?dist} +Summary: Desktop notification library -License: LGPLv2+ -URL: http://www.gnome.org -Source0: http://ftp.gnome.org/pub/GNOME/sources/libnotify/0.7/%{name}-%{version}.tar.xz +License: LGPL-2.1-or-later +URL: https://gitlab.gnome.org/GNOME/libnotify +Source0: https://download.gnome.org/sources/libnotify/0.8/%{name}-%{version}.tar.xz -Patch10001: 0001-notify-send-Give-failing-exit-code-if-showing-notifi.patch +Patch0: drop-docbook5-style-xsl.patch -BuildRequires: chrpath -BuildRequires: git -BuildRequires: glib2-devel >= %{glib2_version} -BuildRequires: gdk-pixbuf2-devel -BuildRequires: gtk3-devel -BuildRequires: gobject-introspection-devel -Requires: glib2%{?_isa} >= %{glib2_version} +BuildRequires: pkgconfig(gdk-pixbuf-2.0) +BuildRequires: pkgconfig(glib-2.0) >= %{glib2_version} +BuildRequires: pkgconfig(gobject-introspection-1.0) +BuildRequires: gi-docgen +BuildRequires: meson +BuildRequires: xmlto +BuildRequires: /usr/bin/xsltproc + +Requires: glib2%{?_isa} >= %{glib2_version} %description libnotify is a library for sending desktop notifications to a notification @@ -25,54 +27,130 @@ daemon, as defined in the freedesktop.org Desktop Notifications spec. These notifications can be used to inform the user about an event or display some form of information without getting in the user's way. -%package devel +%package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} -%description devel +%description devel This package contains libraries and header files needed for development of programs using %{name}. %prep -%autosetup -S git +%autosetup -p1 %build -%configure -make %{?_smp_mflags} +%meson -Dtests=false +%meson_build %install -%make_install - -# Remove lib64 rpaths -chrpath --delete $RPM_BUILD_ROOT%{_bindir}/notify-send - -rm -f $RPM_BUILD_ROOT%{_libdir}/*.la -rm -f $RPM_BUILD_ROOT%{_libdir}/*.a - -%post -p /sbin/ldconfig - -%postun -p /sbin/ldconfig +%meson_install %files %license COPYING -%doc NEWS AUTHORS +%doc NEWS AUTHORS README.md %{_bindir}/notify-send %{_libdir}/libnotify.so.* %{_libdir}/girepository-1.0/Notify-0.7.typelib +%{_mandir}/man1/notify-send.1* %files devel %dir %{_includedir}/libnotify %{_includedir}/libnotify/* %{_libdir}/libnotify.so %{_libdir}/pkgconfig/libnotify.pc -%dir %{_datadir}/gtk-doc/html/libnotify -%{_datadir}/gtk-doc/html/libnotify/* %{_datadir}/gir-1.0/Notify-0.7.gir +%{_docdir}/libnotify-0/ +%doc %{_docdir}/libnotify/spec/ %changelog -* Mon Oct 25 2021 Ray Strode - 0.7.7-6 -- Make notify-send return failure when it fails - Resolves: #1834682 +* Mon May 05 2025 Florian Müllner - 0.8.6-6 +- Update to 0.8.6 + Resolves: RHEL-88017 + +* Tue Oct 29 2024 Troy Dawson - 0.8.3-6 +- Bump release for October 2024 mass rebuild: + Resolves: RHEL-64018 + +* Wed Jul 17 2024 Tomas Popela - 0.8.3-5 +- Drop the requirement on docbook5-style-xsl as it will be removed from RHEL. + As it was used to build the man page, add the man page in the native format. +- Resolves: RHEL-45565 + +* Mon Jun 24 2024 Troy Dawson - 0.8.3-4 +- Bump release for June 2024 mass rebuild + +* Thu Jan 25 2024 Fedora Release Engineering - 0.8.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sun Jan 21 2024 Fedora Release Engineering - 0.8.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sat Oct 21 2023 Kalev Lember - 0.8.3-1 +- Update to 0.8.3 + +* Thu Jul 20 2023 Fedora Release Engineering - 0.8.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Mon Feb 20 2023 David King - 0.8.2-1 +- Update to 0.8.2 + +* Thu Jan 19 2023 Fedora Release Engineering - 0.8.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Thu Jul 21 2022 Fedora Release Engineering - 0.8.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Mon Jul 18 2022 Kalev Lember - 0.8.1-1 +- Update to 0.8.1 + +* Thu May 05 2022 David King - 0.7.12-1 +- Update to 0.7.12 + +* Thu Apr 28 2022 David King - 0.7.11-1 +- Update to 0.7.11 + +* Thu Jan 20 2022 Fedora Release Engineering - 0.7.9-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Tue Dec 14 2021 David King - 0.7.9-6 +- Use pkgconfig for BuildRequires +- Disable building unused tests + +* Thu Jul 22 2021 Fedora Release Engineering - 0.7.9-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Tue Jan 26 2021 Fedora Release Engineering - 0.7.9-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Sat Aug 01 2020 Fedora Release Engineering - 0.7.9-3 +- Second attempt - Rebuilt for + https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue Jul 28 2020 Fedora Release Engineering - 0.7.9-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Wed Feb 26 2020 Kalev Lember - 0.7.9-1 +- Update to 0.7.9 + +* Wed Jan 29 2020 Fedora Release Engineering - 0.7.8-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Jul 25 2019 Fedora Release Engineering - 0.7.8-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Tue Apr 16 2019 Adam Williamson - 0.7.8-2 +- Rebuild with Meson fix for #1699099 + +* Sat Apr 06 2019 Kalev Lember - 0.7.8-1 +- Update to 0.7.8 +- Switch to the meson build system +- Build DocBook documentation + +* Fri Feb 01 2019 Fedora Release Engineering - 0.7.7-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jul 13 2018 Fedora Release Engineering - 0.7.7-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Wed Feb 07 2018 Fedora Release Engineering - 0.7.7-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild diff --git a/sources b/sources new file mode 100644 index 0000000..0d7b049 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (libnotify-0.8.6.tar.xz) = 6e566f5907cfd7d623d58f5aa22d547271feb7e52bf28e463ecb98a763d6f7ad38cacc473d65e6f4a7e44c0514ab008078042e56a8b61edb719b9a1d192c2e34