%if 0%{!?mkrel:1} %define mkrel(c) %{1}%{?dist} %endif %bcond_without check %global _lib32dir %{_prefix}/lib/ Name: pizauth Version: 1.0.9 Release: %mkrel 1 Summary: Command-line OAuth2 authentication daemon Group: Networking/Authentication License: ASL 2.0 or MIT URL: https://tratt.net/laurie/src/pizauth/ Source0: https://tratt.net/laurie/src/pizauth/releases/%{name}-%{version}.tgz Source1: %{name}-%{version}-cargo-vendor.tar.xz Source2: config.toml BuildRequires: cargo >= 1.85 BuildRequires: make ExcludeArch: %{ix86} %description pizauth is a simple program for requesting, showing, and refreshing OAuth2 access tokens. pizauth is formed of two components: a persistent server which interacts with the user to request tokens, and refreshes them as necessary; and a command-line interface which can be used by programs such as fdm and msmtp to authenticate with OAuth2. %prep %autosetup -a1 -p1 mkdir .cargo cp %{SOURCE2} .cargo %build cargo build --verbose mv target/debug target/release %if %{with check} %check %{__make} test %endif %install %make_install PREFIX=%{_prefix} LIBDIR=%{_lib32dir} EXAMPLESDIR=%{_docdir} %files %license COPYRIGHT LICENSE-APACHE LICENSE-MIT %doc README.md README.systemd.md %{_bindir}/%{name} %{_datadir}/bash-completion/completions/%{name} %{_datadir}/fish/vendor_completions.d/pizauth.fish %{_docdir}/%{name}/ %{_lib32dir}systemd/user/ %{_mandir}/man1/%{name}.1* %{_mandir}/man5/%{name}.conf.5*