File passwordmanager-qt6.spec of Package passwordmanager-qt6
#
# spec file for package passwordmanager-qt6
#
# Copyright (c) 2024 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/
#
%define reponame passwordmanager
%define cfg qt6
Name: %{reponame}-%{cfg}
Version: 4.2.0
Release: 0
Summary: A simple password manager with Qt GUI
License: GPL-2.0+
Group: System/Packages
Url: https://github.com/Martchus/%{reponame}
Source: %{reponame}-%{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
%else
BuildRequires: libopenssl-devel
BuildRequires: update-desktop-files
%endif
BuildRequires: cmake(Qt6Core)
BuildRequires: cmake(Qt6Gui)
BuildRequires: cmake(Qt6Widgets)
BuildRequires: cmake(Qt6LinguistTools)
BuildRequires: qtutilities-%{cfg}-devel
BuildRoot: %{_tmppath}/%{reponame}-%{version}-build
%description
A simple password manager with Qt GUI using AES-256-CBC encryption via OpenSSL.
%prep
%setup -q -n %{reponame}-%{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 \
-DCONFIGURATION_NAME:STRING="%{cfg}" \
-DCONFIGURATION_TARGET_SUFFIX:STRING="%{cfg}" \
-DCONFIGURATION_DISPLAY_NAME="" \
-DCONFIGURATION_PACKAGE_SUFFIX_QTUTILITIES:STRING="-%{cfg}" \
-DQT_PACKAGE_PREFIX:STRING='Qt6' \
-DKF_PACKAGE_PREFIX:STRING='KF6' \
-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