%undefine __cmake_in_source_build %global gitcommit 36a26308d0cf8fc548a57e093b1fb3fc6ebe8a44 %global shortcommit %(c=%{gitcommit}; echo ${c:0:7}) %define name keepassxc %define version 2.8.0 Name: %{name} Version: %{version} Release: git%{shortcommit}%{?dist} Summary: Cross-platform password manager # Automatically converted from old format: Boost and BSD and CC0 and GPLv3 and LGPLv2 and LGPLv2+ and LGPLv3+ and Public Domain - review is highly recommended. License: BSL-1.0 AND LicenseRef-Callaway-BSD AND CC0-1.0 AND GPL-3.0-only AND LicenseRef-Callaway-LGPLv2 AND LicenseRef-Callaway-LGPLv2+ AND LGPL-3.0-or-later AND LicenseRef-Callaway-Public-Domain URL: https://keepassxc.org/ Source0: https://github.com/keepassxreboot/keepassxc/archive/%{gitcommit}.tar.gz %if (%{defined fedora} && 0%{?fedora} >= 44) BuildRequires: botan3-devel %else BuildRequires: botan2-devel %endif BuildRequires: cmake >= 3.1 BuildRequires: desktop-file-utils BuildRequires: gcc-c++ # required for check BuildRequires: glibc-langpack-en BuildRequires: libappstream-glib BuildRequires: libargon2-devel BuildRequires: libcurl-devel BuildRequires: libgcrypt-devel >= 1.7 BuildRequires: libmicrohttpd-devel BuildRequires: libsodium-devel BuildRequires: libusb1-devel BuildRequires: libXi-devel BuildRequires: libXtst-devel BuildRequires: libyubikey-devel # Concerning minizip dependency drama, this is the list of available minizip packages # for all active branches # == fedora >= 40 == # minizip-ng # minizip-ng-compat # Read https://fedoraproject.org/wiki/Changes/MinizipNGTransition BuildRequires: minizip-ng-compat-devel BuildRequires: pcsc-lite-devel BuildRequires: qrencode-devel BuildRequires: readline-devel BuildRequires: qt5-qtbase-devel >= 5.2 BuildRequires: qt5-qtbase-private-devel BuildRequires: qt5-qtsvg-devel BuildRequires: qt5-qttools-devel >= 5.2 BuildRequires: qt5-qtx11extras-devel BuildRequires: zlib-devel BuildRequires: rubygem-asciidoctor # for gpg verification BuildRequires: gnupg2 # enforces on the user system, Qt version to be the same one used to build KeepassXC # This avoids "not a bug" bugreports like this one # https://bugzilla.redhat.com/show_bug.cgi?id=2068981 # Moreover it is very important in case of mass rebuild of Qt+applications that # are dependent from Qt, because it happened (see following bugreport) that users experienced # that their system was not able to install a new Qt update due packaging bugs, but the system # was able to update keepassxc (which was built upon new Qt release), resulting in a # Qt - KeepassXC mismatch # https://bugzilla.redhat.com/show_bug.cgi?id=2111413 %{?_qt5:Requires: %{_qt5}%{?_isa} = %{_qt5_version}} # KeePassXC bundles the ykcore code due to lack of support from Yubico and # stratification of version across various operating system distros. Additionally, # KeePassXC has modified the API of ykcore to make it more functional when using # non-YubiKey keys (ie, OnlyKey). Provides: bundled(ykcore) # GNOME-Shell does not allow clearing the clipboard when KeePassXC does not have focus. # KeePassXC already works around this by calling wl-copy, which is part of wl-clipboard. # See: https://github.com/keepassxreboot/keepassxc/issues/4498 Recommends: (wl-clipboard if gnome-shell) %description KeePassXC is a community fork of KeePassX KeePassXC is an application for people with extremely high demands on secure personal data management. KeePassXC saves many different information e.g. user names, passwords, urls, attachemts and comments in one single database. For a better management user-defined titles and icons can be specified for each single entry. Furthermore the entries are sorted in groups, which are customizable as well. The integrated search function allows to search in a single group or the complete database. KeePassXC offers a little utility for secure password generation. The password generator is very customizable, fast and easy to use. Especially someone who generates passwords frequently will appreciate this feature. The complete database is always encrypted either with AES (alias Rijndael) or Twofish encryption algorithm using a 256 bit key. Therefore the saved information can be considered as quite safe. %prep %setup -a 0 -n %{name}-%{gitcommit} %build %cmake \ %{?flatpak:-DKEEPASSXC_DIST_TYPE=Flatpak} \ -DCMAKE_BUILD_TYPE=Snapshot \ -DKEEPASSXC_BUILD_TYPE=Snapshot \ -DWITH_XC_ALL=ON \ -DWITH_XC_DOCS=ON \ -DWITH_XC_UPDATECHECK=OFF %cmake_build %install %cmake_install %if %{defined flatpak} install -m0755 utils/keepassxc-flatpak-wrapper.sh %{buildroot}%{_bindir}/keepassxc-wrapper %endif desktop-file-install \ --dir %{buildroot}%{_datadir}/applications \ --delete-original \ --add-mime-type application/x-keepassxc \ %{buildroot}%{_datadir}/applications/org.%{name}.KeePassXC.desktop %find_lang %{name} --with-qt %check # C language fails https://github.com/keepassxreboot/keepassxc/issues/11813 export LC_ALL=en_US.UTF-8 # 'testcli' fails with "Subprocess aborted" in Koji and local mock %ctest --exclude-regex testcli desktop-file-validate %{buildroot}%{_datadir}/applications/org.%{name}.KeePassXC.desktop appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/org.%{name}.KeePassXC.appdata.xml %files -f %{name}.lang %doc README.md %license COPYING LICENSE* %{_bindir}/%{name} %{_bindir}/%{name}-cli %{_bindir}/%{name}-proxy %if %{defined flatpak} %{_bindir}/%{name}-wrapper %endif %{_datadir}/%{name}/docs/*.html %{_datadir}/%{name}/icons/application/256x256/apps/%{name}.png %{_datadir}/%{name}/wordlists %{_datadir}/applications/org.%{name}.KeePassXC.desktop %{_datadir}/polkit-1/actions/org.%{name}.KeePassXC.policy %{_datadir}/metainfo/org.%{name}.KeePassXC.appdata.xml %{_datadir}/mime/packages/*.xml %{_datadir}/icons/hicolor/*/*/*keepassxc* %{_libdir}/%{name} %{_mandir}/man1/%{name}-cli.1* %{_mandir}/man1/%{name}.1* %changelog