%if 0%{!?mkrel:1} %define mkrel(c) %{1}%{?dist} %endif %bcond_without check %global libdir %{_prefix}/lib/ Name: pizauth Version: 1.0.7 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://github.com/ltratt/pizauth/archive/refs/tags/%{name}-%{version}.tar.gz Source1: %{name}-cargo-vendor-%{version}.tar.xz Source2: config.toml BuildRequires: cargo BuildRequires: make %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 -n %{name}-%{name}-%{version} 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=%{libdir} EXAMPLESDIR=%{_docdir} %files %license COPYRIGHT LICENSE-APACHE LICENSE-MIT %doc README.md README.Linux.md %{_bindir}/%{name} %{_datadir}/bash-completion/completions/%{name} %{_docdir}/%{name}/ %{libdir}systemd/user %{_mandir}/man1/%{name}.1* %{_mandir}/man5/%{name}.conf.5*