diff --git a/0001-fixed-bug-6.patch b/0001-fixed-bug-6.patch new file mode 100644 index 0000000..d0b582f --- /dev/null +++ b/0001-fixed-bug-6.patch @@ -0,0 +1,28 @@ +From 0618ad68a289b10bcc0c5fdbc8a0c8fa71542e4d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rapha=C3=ABl=20Droz?= +Date: Sun, 27 Mar 2016 17:05:44 -0300 +Subject: [PATCH 1/3] fixed bug #6 + +--- + filter.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/filter.c b/filter.c +index 2cb145c..5ae7bd6 100644 +--- a/filter.c ++++ b/filter.c +@@ -435,8 +435,10 @@ e_write_file(char *filename, int (*func) (FILE *in, struct db_enumerator e), + if((out = fopen(filename, "a")) == NULL) + return 1; + +- if(ftell(out)) ++ if(ftell(out)) { ++ fclose(out); + return 1; ++ } + + ret = (*func) (out, enumerator); + +-- +2.13.5 + diff --git a/0002-doc-manpage-mention-of-the-f-option-fix-for-bug-8.patch b/0002-doc-manpage-mention-of-the-f-option-fix-for-bug-8.patch new file mode 100644 index 0000000..04a921e --- /dev/null +++ b/0002-doc-manpage-mention-of-the-f-option-fix-for-bug-8.patch @@ -0,0 +1,54 @@ +From 02ac0ce311deed36679937a4d7ad882bfce29dfc Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rapha=C3=ABl=20Droz?= +Date: Sun, 12 Jun 2016 21:33:00 -0300 +Subject: [PATCH 2/3] doc: manpage mention of the -f option (+ fix for bug #8) + +--- + abook.1 | 8 +------- + abookrc.5 | 4 ---- + 2 files changed, 1 insertion(+), 11 deletions(-) + +diff --git a/abook.1 b/abook.1 +index 2628200..96d665d 100644 +--- a/abook.1 ++++ b/abook.1 +@@ -6,12 +6,6 @@ abook \- text\-based address book program + .B abook + [ \fIOPTION\fR ] + .SH DESCRIPTION +-This manual page documents briefly the +-.B abook +-program. +-This manual page was written for the Debian GNU/Linux distribution +-because the original program does not have a manual page. +-.PP + .B abook + is a text-based address book program. It contains Name, Email, Address + and various Phone fields. It is designed for use with mutt, but can be +@@ -24,7 +18,7 @@ Show usage. + \fB\-C \-\-config\fP \fI\fR + Use an alternative configuration file (default is \fI$HOME/.abook/abookrc\fR). + .TP +-\fB\-\-datafile\fP \fI\fR ++\fB\-f \-\-datafile\fP \fI\fR + Use an alternative addressbook file (default is \fI$HOME/.abook/addressbook\fR). + .TP + \fB\-\-mutt\-query\fP \fI\fR [ \fB\-\-outformat\fP \fI\fR ] +diff --git a/abookrc.5 b/abookrc.5 +index 88e05f6..8fbb10b 100644 +--- a/abookrc.5 ++++ b/abookrc.5 +@@ -3,10 +3,6 @@ + .SH NAME + \fB$HOME/.abook/abookrc\fP \- configuration file for abook address book program + .SH DESCRIPTION +-This manual page documents briefly the +-.B abookrc +-file. +-.br + .B abookrc + is the (optional) configuration file for use with the + .B abook(1) +-- +2.13.5 + diff --git a/abook-extern-inline.patch b/abook-extern-inline.patch new file mode 100644 index 0000000..734e7ce --- /dev/null +++ b/abook-extern-inline.patch @@ -0,0 +1,12 @@ +diff -up abook-0.6.1/database.h.orig abook-0.6.1/database.h +--- abook-0.6.1/database.h.orig 2015-10-04 04:38:25.000000000 +0200 ++++ abook-0.6.1/database.h 2025-01-09 12:40:15.733159868 +0100 +@@ -61,7 +61,7 @@ struct db_enumerator { + /* + * Field operations + */ +-inline int field_id(int i); ++extern inline int field_id(int i); + abook_field *find_standard_field(char *key, int do_declare); + abook_field *real_find_field(char *key, abook_field_list *list, int *nb); + #define find_field(key, list) real_find_field(key, list, NULL) diff --git a/abook-gcc5.patch b/abook-gcc5.patch deleted file mode 100644 index e742218..0000000 --- a/abook-gcc5.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -up abook-git-6e550af8a907a680dc845c22a7d6c36d89e900c1/database.c.gcc5 abook-git-6e550af8a907a680dc845c22a7d6c36d89e900c1/database.c ---- abook-git-6e550af8a907a680dc845c22a7d6c36d89e900c1/database.c.gcc5 2014-11-28 16:29:52.000000000 +0100 -+++ abook-git-6e550af8a907a680dc845c22a7d6c36d89e900c1/database.c 2015-02-11 16:02:15.837789303 +0100 -@@ -859,7 +859,7 @@ item_merge(list_item dest, list_item src - */ - - /* quick lookup by "standard" field number */ --inline int -+extern inline int - field_id(int i) - { - assert((i >= 0) && (i < ITEM_FIELDS)); -diff -up abook-git-6e550af8a907a680dc845c22a7d6c36d89e900c1/database.h.gcc5 abook-git-6e550af8a907a680dc845c22a7d6c36d89e900c1/database.h ---- abook-git-6e550af8a907a680dc845c22a7d6c36d89e900c1/database.h.gcc5 2014-11-28 16:29:52.000000000 +0100 -+++ abook-git-6e550af8a907a680dc845c22a7d6c36d89e900c1/database.h 2015-02-11 16:02:23.465818915 +0100 -@@ -61,7 +61,7 @@ struct db_enumerator { - /* - * Field operations - */ --inline int field_id(int i); -+extern inline int field_id(int i); - abook_field *find_standard_field(char *key, int do_declare); - abook_field *real_find_field(char *key, abook_field_list *list, int *nb); - #define find_field(key, list) real_find_field(key, list, NULL) diff --git a/abook-wcwidth.patch b/abook-wcwidth.patch new file mode 100644 index 0000000..7e2089b --- /dev/null +++ b/abook-wcwidth.patch @@ -0,0 +1,12 @@ +diff -up abook-0.6.1/configure.ac.orig abook-0.6.1/configure.ac +--- abook-0.6.1/configure.ac.orig 2015-10-04 04:37:39.000000000 +0200 ++++ abook-0.6.1/configure.ac 2025-01-09 12:32:06.449796137 +0100 +@@ -61,7 +61,7 @@ AC_CHECK_HEADER(wchar.h,[ + AC_DEFINE(HAVE_WCHAR_H, 1, [Define if you have the header file.])], + [ac_have_wchar_h=no]) + AC_CHECK_FUNCS(mbtowc wcwidth mbrtowc mbsinit,,ac_widec_funcs=no) +-AC_CHECK_DECLS(wcwidth) ++AC_CHECK_DECLS([wcwidth], [], [], [[#include ]]) + AC_CHECK_TYPE(wchar_t,,ac_widec_funcs=no) + + if test x$ac_widec_funcs = xyes -a x$ac_have_wchar_h = xyes; then diff --git a/abook.spec b/abook.spec index 51faf18..2fd272b 100644 --- a/abook.spec +++ b/abook.spec @@ -1,22 +1,30 @@ -%global commit 6e550af8a907a680dc845c22a7d6c36d89e900c1 -%global shortcommit %(c=%{commit}; echo ${c:0:7}) - Name: abook Version: 0.6.1 -Release: 1%{?dist} -License: GPLv2+ +Release: 31%{?dist} +# GPL-2.0-or-later, except: +# getopt.[ch]: LGPL-2.0-or-later +# getopt1.c: LGPL-2.0-or-later +License: GPL-2.0-or-later AND LGPL-2.0-or-later URL: http://abook.sourceforge.net/ Summary: Text-based addressbook program for mutt Source0: http://abook.sourceforge.net/devel/abook-%{version}.tar.gz # preserve all fields by default Patch0: %{name}-preserve.patch -# fix build with gcc-5.0 -Patch1: %{name}-gcc5.patch +# 0618ad6 fixed bug #6 (https://sourceforge.net/p/abook/bugs/6/) +Patch1: 0001-fixed-bug-6.patch +# 02ac0ce doc: manpage mention of the -f option + fix for bug #8 (https://sourceforge.net/p/abook/bugs/8/) +Patch2: 0002-doc-manpage-mention-of-the-f-option-fix-for-bug-8.patch +# fix compilation when used with GCC -std=gnu99 or -std=gnu11 +Patch3: abook-extern-inline.patch +# Fix detection of wcwidth() +Patch4: abook-wcwidth.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: gettext-devel +BuildRequires: make BuildRequires: ncurses-devel BuildRequires: readline-devel +BuildRequires: gcc Requires: webclient %description @@ -24,28 +32,121 @@ Abook is a small and powerful text-based addressbook program designed for use with the mutt mail client. %prep -%setup -q -%patch0 -p1 -b .p -%patch1 -p1 -b .gcc5 +%autosetup -p1 autoreconf -vif %build %configure -%{__make} %{?_smp_mflags} +%make_build %install -%{__make} DESTDIR=$RPM_BUILD_ROOT install +%make_install # generate localized files list %find_lang %{name} %files -f %{name}.lang -%defattr(-,root,root,-) -%doc AUTHORS BUGS COPYING ChangeLog FAQ README RELEASE_NOTES THANKS TODO sample.abookrc +%license COPYING +%doc AUTHORS BUGS ChangeLog FAQ README RELEASE_NOTES THANKS TODO sample.abookrc %{_bindir}/abook %{_mandir}/man1/abook.* %{_mandir}/man5/abookrc.* %changelog +* Fri Jan 16 2026 Fedora Release Engineering - 0.6.1-31 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild + +* Wed Jul 23 2025 Fedora Release Engineering - 0.6.1-30 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Thu Jan 16 2025 Fedora Release Engineering - 0.6.1-29 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Thu Jan 09 2025 Dominik Mierzejewski - 0.6.1-28 +- fix FTBFS with GCC15 (resolves: rhbz#2336029) +- switch to autosetup macro +- correct license tag + +* Thu Jul 25 2024 Miroslav Suchý - 0.6.1-27 +- convert license to SPDX + +* Wed Jul 17 2024 Fedora Release Engineering - 0.6.1-26 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Mon Jan 22 2024 Fedora Release Engineering - 0.6.1-25 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jan 19 2024 Fedora Release Engineering - 0.6.1-24 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Wed Jul 19 2023 Fedora Release Engineering - 0.6.1-23 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Wed Jan 18 2023 Fedora Release Engineering - 0.6.1-22 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Wed Jul 20 2022 Fedora Release Engineering - 0.6.1-21 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Wed Jan 19 2022 Fedora Release Engineering - 0.6.1-20 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Wed Jul 21 2021 Fedora Release Engineering - 0.6.1-19 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Mon Jan 25 2021 Fedora Release Engineering - 0.6.1-18 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Mon Dec 14 2020 Dominik Mierzejewski 0.6.1-17 +- add explicit BR on make +- use modern macros +- mark license text accordingly + +* Fri Jul 31 2020 Fedora Release Engineering - 0.6.1-16 +- Second attempt - Rebuilt for + https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Mon Jul 27 2020 Fedora Release Engineering - 0.6.1-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue Jan 28 2020 Fedora Release Engineering - 0.6.1-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Wed Jul 24 2019 Fedora Release Engineering - 0.6.1-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Sun Feb 17 2019 Igor Gnatenko - 0.6.1-12 +- Rebuild for readline 8.0 + +* Thu Jan 31 2019 Fedora Release Engineering - 0.6.1-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Thu Jul 12 2018 Fedora Release Engineering - 0.6.1-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Mon Feb 19 2018 Itamar Reis Peixoto - 0.6.1-9 +- add gcc into buildrequires + +* Wed Feb 07 2018 Fedora Release Engineering - 0.6.1-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Tue Sep 19 2017 Dominik Mierzejewski 0.6.1-7 +- backport fixes from upstream git repo + +* Wed Aug 02 2017 Fedora Release Engineering - 0.6.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 0.6.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Feb 10 2017 Fedora Release Engineering - 0.6.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Thu Jan 12 2017 Igor Gnatenko - 0.6.1-3 +- Rebuild for readline 7.x + +* Wed Feb 03 2016 Fedora Release Engineering - 0.6.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + * Sat Nov 07 2015 Dominik Mierzejewski 0.6.1-1 - update to 0.6.1 - fix build with automake <> 1.14 by running autoreconf