%define gitsha a243d4a18a64f4ee188191a797b34f60d4ff852f

# The naming scheme in non-Mandriva-based distros
%if 0%{!?mklibname:1}
%define mklibname(ds)  lib%{1}%{?2:%{2}}%{-s:-static}%{-d:-devel}
%endif
%if 0%{!?mkrel:1}
%define mkrel(c) %{1}%{?dist}
%endif

Summary:	Text-based addressbook program
Name:		abook
Version:	0.6.2
Release:	%mkrel 1.1
License:	GPL
Group:		Utilities
%dnl Source:		http://prdownloads.sourceforge.net/abook/%{name}-%{version}.tar.gz
# This version was released only through a Git tag
Source:         https://sourceforge.net/code-snapshots/git/a/ab/%{name}/git.git/%{name}-git-%{gitsha}.zip
Patch0:         abook-silence-stringop-overflow-warnings.diff
Patch2:         abook-tinfo_link.patch
URL:		http://abook.sourceforge.net/
BuildRequires:	autoconf >= 2.71
BuildRequires:	automake
BuildRequires:  libtool
BuildRequires:	pkgconfig(ncurses)
BuildRequires:	(pkgconfig(readline) or readline-devel)
BuildRequires:  gettext
BuildRequires:	gettext-devel
BuildRequires:  unzip

%description
Abook is a text-based addressbook program designed to
use with mutt mail client.


%prep
%autosetup -p1 -n %{name}-git-%{gitsha}


%build
autoreconf -vif
%configure
%make_build


%install
%make_install

%find_lang %{name}


%files -f %{name}.lang
%defattr(-,root,root)
%doc AUTHORS BUGS COPYING ChangeLog FAQ NEWS README THANKS TODO sample.abookrc
%{_bindir}/abook
%{_mandir}/man1/abook.*
%{_mandir}/man5/abookrc.*


%changelog
* Mon Mar 11 2002 Jaakko Heinonen <jheinonen@users.sourceforge.net>
- rewrote the spec file originally written by
  Gustavo Niemeyer <niemeyer@conectiva.com>