File keepassx.spec of Package keepassx

#
# spec file for package keepassx
#
# Copyright (c) 2014 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:           keepassx
Version:        2.0~alpha6
Release:        0
Summary:        Cross Platform Password Manager
License:        GPL-2.0 and LGPL-2.1 and LGPL-3.0+
Group:          Productivity/Security
Url:            http://www.keepassx.org/
Source:         http://www.keepassx.org/dev/attachments/download/69/keepassx-2.0-alpha6.tar.gz
Patch0:         keepassx-ppc64le.patch
Patch1:         keepassx-noselftest.patch
Patch2:         KeyFileHandling.patch
BuildRequires:  cmake
BuildRequires:  fdupes
BuildRequires:  libgcrypt-devel
BuildRequires:  libqt4-devel
BuildRequires:  update-desktop-files
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
A free/open-source password manager or safe which helps you to
manage your passwords in a secure way. You can put all your passwords in one
database, which is locked with one master key or a key-disk. So you only have
to remember one single master password or insert the key-disk to unlock the
whole database. The databases are encrypted using the best and most secure
encryption algorithms currently known (AES and Twofish).

%prep
%setup -q -n keepassx-2.0-alpha6
%patch0 -p1
%patch1 -p1
%patch2 -p1

%build
mkdir -p build
pushd build
CFLAGS="%{optflags}" CXXFLAGS="%{optflags}" \
cmake \
      -DCMAKE_BUILD_TYPE=RelWithDebInfo \
      -DCMAKE_SKIP_RPATH=ON \
      -DCMAKE_INSTALL_PREFIX=%{_prefix} \
%if %{_lib} == lib64
      -DLIB_SUFFIX=64 \
%endif
      -DWITH_CXX11=ON \
      -DWITH_LTO=ON \
      ..

make %{?_smp_mflags} VERBOSE=1

%install
pushd build
%make_install
%suse_update_desktop_file %{name} X-SuSE-DesktopUtility

%fdupes %buildroot/%_prefix

%check
pushd build
make test

%files
%defattr(-,root,root)
%doc COPYING LICENSE*
%{_bindir}/%{name}
%{_datadir}/%{name}/
%{_datadir}/applications/keepassx.desktop
%{_libdir}/%{name}/
%{_datadir}/icons/hicolor
%{_datadir}/mime/packages/keepassx.xml

%changelog
openSUSE Build Service is sponsored by