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

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

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

:0hc | lbdb-fetchaddr

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

set query_command="lbdbq %s"

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

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 \

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

%defattr(-, root, root)
%config(noreplace) %{_sysconfdir}/*
%dir %{_libdir}/lbdb