File passwordmanager.spec of Package passwordmanager
#
# spec file for package passwordmanager
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2018 Martchus
#
# 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: passwordmanager
Version: 4.2.0
Release: 0
Summary: A simple password manager with Qt 5 GUI
License: GPL-2.0+
Group: System/Packages
Url: https://github.com/Martchus/%{name}
Source: %{name}-%{version}.tar.xz
BuildRequires: cmake >= 3.17
%if 0%{?fedora}
%else
BuildRequires: ninja
%endif
%if 0%{?sle_version} && 0%{?sle_version} < 160000
BuildRequires: gcc9-c++
%else
BuildRequires: gcc-c++
%endif
BuildRequires: passwordfile-devel
%if 0%{?fedora_version}
BuildRequires: openssl-devel
BuildRequires: qt5-qtbase-devel >= 5.6.0
BuildRequires: qt5-qttools-devel >= 5.6.0
%else
BuildRequires: libopenssl-devel
BuildRequires: libqt5-qtbase-devel >= 5.6.0
BuildRequires: libqt5-qttools-devel >= 5.6.0
BuildRequires: update-desktop-files
%endif
BuildRequires: qtutilities-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
A simple password manager with Qt 5 GUI using AES-256-CBC encryption via OpenSSL.
%prep
%setup -q -n %{name}-%{version}
%build
%if 0%{?sle_version} && 0%{?sle_version} < 160000
export CC=gcc-9
export CXX=g++-9
%endif
%if 0%{?fedora}
%else
%define __builder ninja
%endif
%cmake \
-DQUICK_GUI:BOOL=NO \
-DBUILD_SHARED_LIBS:BOOL=ON \
-DBUILTIN_TRANSLATIONS:BOOL=ON
%if 0%{?fedora} && 0%{?fedora_version} < 33
make %{?_smp_mflags}
%else
%cmake_build
%endif
%install
%if 0%{?fedora} && 0%{?fedora_version} < 33
DESTDIR=%{buildroot} make %{?_smp_mflags} install
%else
%cmake_install
%if 0%{?fedora}
%else
# FIXME: find decent group
%suse_update_desktop_file -r %{name} System Security
%endif
%endif
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%{_bindir}/%{name}
%dir %{_datadir}/icons/hicolor
%dir %{_datadir}/icons/hicolor/scalable
%dir %{_datadir}/icons/hicolor/scalable/apps
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
%{_datadir}/applications/%{name}.desktop
%if 0%{?sle_version} && 0%{?sle_version} <= 120400
%else
%{_datadir}/metainfo/*
%endif
%{_datadir}/bash-completion
%changelog