%global debug_package %{nil} Name: howdy Version: 0.1.0 Release: 1%{?dist} Summary: Windows Hello™ style authentication for Linux License: MIT URL: https://github.com/KLOSYX/%{name} Source0: https://github.com/KLOSYX/%{name}/archive/refs/tags/v%{version}.tar.gz Source1: com.github.boltgolt.howdy.policy Source2: howdy_profile.sh Source3: howdy_profile.csh BuildRequires: polkit-devel # We need python3-devel for pathfix.py BuildRequires: python3-devel Requires: python3dist(dlib) >= 6.0 Requires: python3-opencv Requires: pam_python %description Windows Hello™ style authentication for Linux. Use your built-in IR emitters and camera in combination with face recognition to prove who you are. %prep %autosetup pathfix.py -i %{__python3} . %build ## nothing to build %install mkdir -p %{buildroot}%{_sysconfdir}/%{name} # Remove backup file rm -fr howdy/src/*~ cp -pr howdy/src/* %{buildroot}%{_sysconfdir}/%{name} # Install facial recognition, may look at better alternative # for offline user sh %{buildroot}%{_sysconfdir}/%{name}/dlib-data/install.sh mv *.dat %{buildroot}%{_sysconfdir}/%{name}/dlib-data rm -fr %{buildroot}%{_sysconfdir}/%{name}/dlib-data/{Readme.md,install.sh,.gitignore} # Add polkit rules mkdir -p %{buildroot}%{_datadir}/polkit-1/actions install -Dm 0644 %{SOURCE1} %{buildroot}%{_datadir}/polkit-1/actions/ #Add bash completion mkdir -p %{buildroot}%{_datadir}/bash-completion/completions install -Dm 644 howdy/src/autocomplete/%{name} %{buildroot}%{_datadir}/bash-completion/completions # Create an executable mkdir -p %{buildroot}%{_bindir} chmod +x %{buildroot}%{_sysconfdir}/%{name}/cli.py ln -s %{_sysconfdir}/%{name}/cli.py %{buildroot}%{_bindir}/%{name} # Add environment variables install -Dm 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/profile.d/howdy.sh install -Dm 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/profile.d/howdy.csh %files %license LICENSE %doc README.md %{_bindir}/%{name} %{_datadir}/bash-completion/completions/%{name} %{_datadir}/polkit-1/actions/ %{_sysconfdir}/%{name} %config(noreplace) %{_sysconfdir}/%{name}/config.ini %config(noreplace) %{_sysconfdir}/profile.d/howdy.* %changelog ## no changelog