From e4ab328485798545db15e9603a6594bd68145a26fdb8a3c31c2a0a8b6f8a549d Mon Sep 17 00:00:00 2001 From: Guido Berhoerster Date: Wed, 23 Mar 2011 23:55:34 +0000 Subject: [PATCH] - dropped weechat-0.3.4-remove-date-time.patch, use date/time from last changelog entry rather than removing it completely - use %desktop_database_post/un OBS-URL: https://build.opensuse.org/package/show/server:irc/weechat?expand=0&rev=33 --- weechat-0.3.4-remove-date-time.patch | 97 ---------------------------- weechat.changes | 7 ++ weechat.spec | 17 ++++- 3 files changed, 22 insertions(+), 99 deletions(-) delete mode 100644 weechat-0.3.4-remove-date-time.patch diff --git a/weechat-0.3.4-remove-date-time.patch b/weechat-0.3.4-remove-date-time.patch deleted file mode 100644 index 81cb3f3..0000000 --- a/weechat-0.3.4-remove-date-time.patch +++ /dev/null @@ -1,97 +0,0 @@ ---- src/core/wee-command.c.orig 2011-01-16 16:12:43.000000000 +0100 -+++ src/core/wee-command.c 2011-01-16 16:13:34.000000000 +0100 -@@ -3898,11 +3898,8 @@ - if (translated_string) - { - snprintf (string, sizeof (string), -- "WeeChat %s [%s %s %s]", -- PACKAGE_VERSION, -- _("compiled on"), -- __DATE__, -- __TIME__); -+ "WeeChat %s", -+ PACKAGE_VERSION); - input_data (buffer, string); - if (weechat_upgrade_count > 0) - { -@@ -3918,11 +3915,8 @@ - else - { - snprintf (string, sizeof (string), -- "WeeChat %s [%s %s %s]", -- PACKAGE_VERSION, -- "compiled on", -- __DATE__, -- __TIME__); -+ "WeeChat %s", -+ PACKAGE_VERSION); - input_data (buffer, string); - if (weechat_upgrade_count > 0) - { -@@ -3938,14 +3932,9 @@ - } - else - { -- gui_chat_printf (NULL, "%sWeeChat %s %s[%s%s %s %s%s]", -+ gui_chat_printf (NULL, "%sWeeChat %s %s", - GUI_COLOR(GUI_COLOR_CHAT_BUFFER), - PACKAGE_VERSION, -- GUI_COLOR(GUI_COLOR_CHAT_DELIMITERS), -- GUI_COLOR(GUI_COLOR_CHAT_VALUE), -- _("compiled on"), -- __DATE__, -- __TIME__, - GUI_COLOR(GUI_COLOR_CHAT_DELIMITERS)); - if (weechat_upgrade_count > 0) - { ---- src/core/wee-log.c.orig 2011-01-16 16:12:05.000000000 +0100 -+++ src/core/wee-log.c 2011-01-16 16:12:22.000000000 +0100 -@@ -114,8 +114,6 @@ - "with another home using \"--dir\" command line option.\n")); - exit (1); - } -- log_printf ("%s (%s %s %s)", -- PACKAGE_STRING, _("compiled on"), __DATE__, __TIME__); - } - - /* ---- src/core/wee-backtrace.c.orig 2011-01-16 16:13:39.000000000 +0100 -+++ src/core/wee-backtrace.c 2011-01-16 16:13:49.000000000 +0100 -@@ -161,8 +161,8 @@ - #endif - - weechat_backtrace_printf ("======= WeeChat backtrace ======="); -- weechat_backtrace_printf ("(written by %s, compiled on %s %s)", -- PACKAGE_STRING, __DATE__, __TIME__); -+ weechat_backtrace_printf ("(written by %s)", -+ PACKAGE_STRING); - - #ifdef HAVE_BACKTRACE - trace_size = backtrace (trace, BACKTRACE_MAX); ---- src/core/weechat.c.orig 2011-01-16 16:12:27.000000000 +0100 -+++ src/core/weechat.c 2011-01-16 16:12:38.000000000 +0100 -@@ -113,11 +113,11 @@ - string_iconv_fprintf (stdout, "\n"); - string_iconv_fprintf (stdout, - /* TRANSLATORS: "%s %s" after "compiled on" is date and time */ -- _("WeeChat %s Copyright %s, compiled on %s %s\n" -+ _("WeeChat %s Copyright %s\n" - "Developed by Sebastien Helleu " - "- %s"), - PACKAGE_VERSION, WEECHAT_COPYRIGHT_DATE, -- __DATE__, __TIME__, WEECHAT_WEBSITE); -+ WEECHAT_WEBSITE); - string_iconv_fprintf (stdout, "\n"); - } - ---- src/plugins/plugin-api.c.orig 2011-01-16 16:13:55.000000000 +0100 -+++ src/plugins/plugin-api.c 2011-01-16 16:14:16.000000000 +0100 -@@ -287,7 +287,7 @@ - } - else if (string_strcasecmp (info_name, "date") == 0) - { -- return __DATE__; -+ return ""; - } - else if (string_strcasecmp (info_name, "dir_separator") == 0) - { diff --git a/weechat.changes b/weechat.changes index 863dc40..1829a0d 100644 --- a/weechat.changes +++ b/weechat.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Mar 23 23:38:19 UTC 2011 - gber@opensuse.org + +- dropped weechat-0.3.4-remove-date-time.patch, use date/time from + last changelog entry rather than removing it completely +- use %desktop_database_post/un + ------------------------------------------------------------------- Mon Mar 21 16:49:05 UTC 2011 - coolo@novell.com diff --git a/weechat.spec b/weechat.spec index e9a089d..13309e6 100644 --- a/weechat.spec +++ b/weechat.spec @@ -24,7 +24,6 @@ Summary: Portable, Fast, Light and Extensible Chat Client Source: http://www.weechat.org/files/src/weechat-%{version}.tar.bz2 Source1: weechat.desktop Patch1: weechat-0.3.3-fix-strftime.patch -Patch2: weechat-0.3.4-remove-date-time.patch Patch3: weechat-0.3.4-fix-array-overflow.patch URL: http://www.weechat.org Group: Productivity/Networking/IRC @@ -116,8 +115,13 @@ Spell-checking support for %{name}, using the aspell library. %prep %setup -q %patch1 -p1 -%patch2 %patch3 -p1 +modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{_sourcedir}/%{name}.changes")" +DATE="\"$(date -d "${modified}" "+%%b %%e %%Y")\"" +TIME="\"$(date -d "${modified}" "+%%R")\"" +find . -name '*.[ch]' |\ + xargs sed -i "s/__DATE__/${DATE}/g;s/__TIME__/${TIME}/g" + %build export CFLAGS="%{optflags}" @@ -146,6 +150,15 @@ popd #build %clean %{?buildroot:%__rm -rf "%{buildroot}"} +%if 0%{?suse_version} >= 1140 + +%post +%desktop_database_post + +%postun +%desktop_database_postun +%endif + %files %defattr(-,root,root) %doc AUTHORS ChangeLog COPYING NEWS README