File lbdb.spec of Package lbdb

#
# spec file for package lbdb
#
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           lbdb
Summary:        Address Database for mutt
License:        GPL-2.0+
Group:          Productivity/Networking/Email/Utilities
Version:        0.39
Release:        0
Url:            http://www.spinnaker.de/lbdb/
Source:         http://www.spinnaker.de/debian/lbdb_%{version}.tar.xz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Patch:          lbdb.rc.dif
Patch2:         lbdb-hostname.diff
Suggests:       perl(Net::LDAP)
Suggests:       perl(Getopt::Long)

%description
The Little Brother's Database (lbdb) consists of a set of small tools
that collect mail addresses from several sources and offer these
addresses to the external query feature of the Mutt mail reader.

To use the fetch address feature, put the following lines in your
.procmailrc:

:0hc | lbdb-fetchaddr

To use the database in mutt, put the following line into your .muttrc:

set query_command="lbdbq %s"

%prep
%setup -n lbdb-%{version}
%patch -p0
%patch2 -p1

%build
CFLAGS="%{optflags} -fno-strict-aliasing" \
    PGP=/usr/bin/pgp PGPK=/usr/bin/pgpk GPG=/usr/bin/gpg \
    FINGER=/usr/bin/finger ABOOK=/usr/bin/abook \
    ADDR_EMAIL=/usr/bin/addr-email SH=/bin/sh \
    YPCAT=/usr/bin/ypcat MAWK=/usr/bin/awk \
    ./configure --prefix=%{_prefix} \
	--sysconfdir=%{_sysconfdir} \
	--mandir=%{_mandir} \
	--libdir=%{_libdir}/lbdb \
	--enable-lbdb-dotlock
make

%install
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}
BUILD_ROOT=${RPM_BUILD_ROOT} make \
	prefix=${RPM_BUILD_ROOT}%{_prefix} \
	sysconfdir=${RPM_BUILD_ROOT}%{_sysconfdir} \
	mandir=${RPM_BUILD_ROOT}%{_mandir} \
	libdir=${RPM_BUILD_ROOT}%{_libdir}/lbdb \
	install

%files
%defattr(-, root, root)
%doc README COPYING TODO
%config(noreplace) %{_sysconfdir}/*
%{_bindir}/*
%{_libdir}/lbdb/*
%dir %{_libdir}/lbdb
%{_mandir}/man?/*

%changelog