File authenticator.spec of Package authenticator

#
# spec file for package authenticator
#
# Copyright (c) 2024 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#


%global rustflags '-Clink-arg=-Wl,-z,relro,-z,now'
%define _lto_cflags %{nil}
%define _name Authenticator
Name:           authenticator
Version:        4.5.0
Release:        0
Summary:        Generate Two-Factor Codes
License:        GPL-3.0-or-later
URL:            https://gitlab.gnome.org/World/Authenticator
Source0:        %{name}-%{version}.tar.gz
Source1:        vendor.tar.gz
Source2:        cargo_config
BuildRequires:  clang-devel
BuildRequires:  git
%if "%_repository" == "15.5"
BuildRequires:  -python3-base
BuildRequires:  python310-base-symlink
%endif
BuildRequires:  cargo
BuildRequires:  meson
BuildRequires:  rust
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(gdk-pixbuf-2.0)
BuildRequires:  pkgconfig(gio-2.0)
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(gstreamer-1.0)
BuildRequires:  pkgconfig(gstreamer-base-1.0)
BuildRequires:  pkgconfig(gstreamer-plugins-bad-1.0)
BuildRequires:  pkgconfig(gstreamer-plugins-base-1.0)
BuildRequires:  pkgconfig(gtk4)
BuildRequires:  pkgconfig(libadwaita-1)
BuildRequires:  pkgconfig(libpipewire-0.3)
BuildRequires:  pkgconfig(openssl)
BuildRequires:  pkgconfig(zbar)

Recommends:     %{name}-lang

%description
Simple application for generating Two-Factor Authentication Codes.

%lang_package

%prep
%setup -qa1
mkdir .cargo
cp %{SOURCE2} .cargo/config

%build
%meson
%meson_build

%install
%meson_install
%find_lang %{name}

%files
%license  LICENSE
%doc README.md CONTRIBUTING.md
%dir %{_datadir}/%{name}
%dir %{_datadir}/gnome-shell
%dir %{_datadir}/gnome-shell/search-providers
%{_bindir}/%{name}
%{_datadir}/%{name}/%{name}.gresource
%{_datadir}/applications/com.belmoussaoui.%{_name}.desktop
%{_datadir}/dbus-1/services/com.belmoussaoui.%{_name}.SearchProvider.service
%{_datadir}/glib-2.0/schemas/com.belmoussaoui.%{_name}.gschema.xml
%{_datadir}/gnome-shell/search-providers/com.belmoussaoui.%{_name}.search-provider.ini
%{_datadir}/icons/hicolor/scalable/apps/com.belmoussaoui.%{_name}.svg
%{_datadir}/icons/hicolor/symbolic/apps/com.belmoussaoui.%{_name}-symbolic.svg
%{_datadir}/metainfo/com.belmoussaoui.%{_name}.metainfo.xml

%files lang -f %{name}.lang

%changelog
openSUSE Build Service is sponsored by