File keepassxc.spec of Package keepassxc

#
# spec file for package keepassxc
#
# Copyright (c) 2017 SUSE LINUX 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:           keepassxc
Version:        2.1.4
Release:        0
Summary:        Qt5-based Password Manager
License:        GPL-2.0 OR GPL-3.0
Group:          Productivity/Security
Url:            https://www.keepassxc.org/
Source0:        https://github.com/keepassxreboot/keepassxc/releases/download/%{version}/keepassxc-%{version}-src.tar.xz
Source1:        https://github.com/keepassxreboot/keepassxc/releases/download/%{version}/keepassxc-%{version}-src.tar.xz.sig
Source2:        https://keepassxc.org/keepassxc_master_signing_key.asc#/%{name}.keyring
# PATCH-FIX-UPSTREAM keepassxc-qt5.9.patch gh#keepassxreboot/keepassxc#528
Patch0:         keepassxc-qt5.9.patch
BuildRequires:  cmake
BuildRequires:  fdupes
BuildRequires:  hicolor-icon-theme
BuildRequires:  libgcrypt-devel
BuildRequires:  libqt5-linguist-devel
BuildRequires:  pkgconfig
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(Qt5Concurrent)
BuildRequires:  pkgconfig(Qt5Core)
BuildRequires:  pkgconfig(Qt5DBus)
BuildRequires:  pkgconfig(Qt5Network)
BuildRequires:  pkgconfig(Qt5Test)
BuildRequires:  pkgconfig(Qt5Widgets)
BuildRequires:  pkgconfig(Qt5X11Extras)
BuildRequires:  pkgconfig(bash-completion)
BuildRequires:  pkgconfig(xi)
BuildRequires:  pkgconfig(xtst)
BuildRequires:  pkgconfig(zlib)
Requires:       hicolor-icon-theme
Requires(post): hicolor-icon-theme
Requires(post): shared-mime-info
Requires(post): update-desktop-files
Requires(postun): hicolor-icon-theme
Requires(postun): shared-mime-info
Requires(postun): update-desktop-files
Recommends:     %{name}-lang

%description
A password manager or safe which manages your passwords. Databases
are locked with a master key/password or a key disk. The databases
are encrypted using AES and Twofish.

%lang_package

%prep
%setup -q
%patch0 -p1

%build
%cmake \
  -DWITH_XC_AUTOTYPE=ON \
  -DWITH_XC_HTTP=ON
make %{?_smp_mflags}

%install
%cmake_install
%suse_update_desktop_file %{name} X-SuSE-DesktopUtility
%fdupes -s %{buildroot}/%{_prefix}

%check
%ctest

%post
%mime_database_post
%desktop_database_post
%icon_theme_cache_post

%postun
%mime_database_postun
%desktop_database_postun
%icon_theme_cache_postun

%files
%defattr(-,root,root)
%doc COPYING LICENSE*
%{_bindir}/%{name}
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/icons
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor
%{_datadir}/mime/packages/%{name}.xml
%dir %{_libdir}/%{name}
%{_libdir}/keepassxc/libkeepassx-autotype-xcb.so

%files lang
%defattr(-,root,root)
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/translations
%{_datadir}/%{name}/translations

%changelog
openSUSE Build Service is sponsored by