# Generated by go2rpm 1.9.0 %bcond_without check # These aren't defined on EPEL 9 %{!?_pam_moduledir:%global _pam_moduledir %{_libdir}/security} %{!?_pam_vendordir:%global _pam_vendordir %{_datadir}/pam.d} # https://github.com/google/fscrypt %global goipath github.com/google/fscrypt Version: 0.3.4 %gometa -f %global common_description %{expand: fscrypt is a high-level tool for the management of Linux filesystem encryption. This tool manages metadata, key generation, key wrapping, PAM integration, and provides a uniform interface for creating and modifying encrypted directories.} %global golicenses LICENSE %global godocs CODE_OF_CONDUCT.md CONTRIBUTING.md NEWS.md README.md Name: fscrypt Release: 6%{?dist} Summary: Go tool for managing Linux filesystem encryption License: Apache-2.0 URL: %{gourl} Source0: %{gosource} Source1: %{name}.pam # Non-Go build dependencies BuildRequires: gcc BuildRequires: pam-devel Requires: (pam_%{name}%{?_isa} = %{version}-%{release} if pam%{?_isa}) %description %{common_description} %package -n pam_%{name} Summary: PAM module for managing Linux filesystem encryption Requires: %{name}%{?_isa} = %{version}-%{release} %description -n pam_%{name} %{common_description} This is the PAM module associated with %{name}. %gopkg %prep %goprep %autopatch -p1 %generate_buildrequires %go_generate_buildrequires %build for cmd in cmd/* ; do %gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd done for cmd in pam_%{name}; do %gobuild -o %{gobuilddir}/lib/$(basename $cmd).so %{goipath}/$cmd done %install %gopkginstall install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ install -m 0755 -vd %{buildroot}%{_datadir}/bash-completion/completions install -m 0755 -vp cmd/fscrypt/fscrypt_bash_completion %{buildroot}%{_datadir}/bash-completion/completions/%{name} install -m 0755 -vd %{buildroot}%{_pam_moduledir} install -m 0755 -vp %{gobuilddir}/lib/pam_%{name}.so %{buildroot}%{_pam_moduledir}/ install -m 0755 -vd %{buildroot}%{_pam_vendordir} install -m 0644 -vp %{SOURCE1} %{buildroot}%{_pam_vendordir}/%{name} %if %{with check} %check %ifarch x86_64 %gocheck %else # Tests fail on non-x86_64 arches # Cf. https://github.com/google/fscrypt/issues/382 ( %gocheck ) || : %endif %endif %files %license LICENSE %doc CODE_OF_CONDUCT.md CONTRIBUTING.md NEWS.md README.md %{_bindir}/%{name} %{_datadir}/bash-completion/completions/%{name} %files -n pam_%{name} %license LICENSE %{_pam_moduledir}/pam_%{name}.so %{_pam_vendordir}/%{name} %gopkgfiles %changelog * Wed Jul 17 2024 Fedora Release Engineering - 0.3.4-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Sun Feb 11 2024 Maxwell G - 0.3.4-5 - Rebuild for golang 1.22.0 * Wed Jan 24 2024 Fedora Release Engineering - 0.3.4-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Fri Jan 19 2024 Fedora Release Engineering - 0.3.4-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Thu Dec 21 2023 Davide Cavalca - 0.3.4-2 - Make it build on EPEL 9 * Sat Sep 02 2023 Neal Gompa - 0.3.4-1 - Initial package