File mdp.spec of Package mdp

# vim: set sw=4 ts=4 et nu:

# Copyright (c) 2013 Pascal Bleser <pascal.bleser@opensuse.org>
#
# 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:               mdp
Version:            0.7.4
Release:            0
Summary:            Simple Password List Manager
Source:             http://tamentis.com/projects/mdp/files/mdp-%{version}.tar.gz
Patch1:             mdp-optflags.patch
Patch2:             mdp-add_destdir.patch
Patch3:             mdp-fix_printf_format.patch
URL:                http://tamentis.com/projects/mdp/
Group:              Productivity/Networking/Security
License:            BSD-3-Clause
BuildRoot:          %{_tmppath}/build-%{name}-%{version}
BuildRequires:      gpg
Requires:           gpg
BuildRequires:      ncurses-devel
BuildRequires:      gcc make glibc-devel pkgconfig
BuildRequires:      autoconf automake libtool

%description
mdp stands for "Mot de Passe", which means "password" in French. It wraps GnuPG
for encryption and deals with all the small details of generating, managing,
and fetching your passwords. It is similar to many other programs, but
differentiates itself with simplicity (not button-driven simplicity, but with a
Unix less-is-more style). For example, beyond the use of GnuPG for encryption,
it lets you use your own editor to manage your passwords, categorize them, and
delete them. In order to avoid passwords lingering on your screen, the results
from the queries are displayed through a custom pager which is cleared after a
customizable timeout (defaulting to ten seconds).

%prep
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p0

%build
PREFIX="%{_prefix}" \
MANDEST="share/man" \
./configure

make OPTFLAGS="%{optflags}"

%install
make install DESTDIR="%{buildroot}"

# still broken for now, only in the build chroot, don't know why yet
#check
#make test OPTFLAGS="%{optflags}"

%clean
%{?buildroot:%__rm -rf "%{buildroot}"}

%files
%defattr(-,root,root)
%doc AUTHORS ChangeLog LICENSE README TODO
%{_bindir}/mdp
%doc %{_mandir}/man1/mdp.1*

%changelog
openSUSE Build Service is sponsored by