# Generated by go2rpm 1.10.0 %bcond_without check %global gofuse_version %(rpm -q golang-github-hanwen-fuse-2-devel --queryformat %{version}) # https://github.com/rfjakob/gocryptfs %global goipath github.com/rfjakob/gocryptfs/v2 Version: 2.4.0 %gometa -f %global goname gocryptfs %global common_description %{expand: Encrypted overlay filesystem written in Go.} %global golicenses LICENSE %global godocs README.md Documentation/*.txt Documentation/*.md\\\ Documentation/*.png Name: %{goname} Release: %autorelease Summary: Encrypted overlay filesystem written in Go # License for github.com/rfjakob/gocryptfs/v2: MIT # License for github.com/aperturerobotics/jacobsa-crypto: Apache-2.0 # License for github.com/hanwen/go-fuse/v2: BSD-3-Clause # License for github.com/moby/sys/mountinfo: Apache-2.0 # License for github.com/pkg/xattr: BSD-2-Clause # License for github.com/rfjakob/eme: MIT # License for github.com/sabhiram/go-gitignore: MIT # License for github.com/spf13/pflag: BSD-3-Clause # License for golang.org/x/crypto: BSD-3-Clause # License for golang.org/x/sys: BSD-3-Clause # License for golang.org/x/term: BSD-3-Clause License: MIT AND BSD-3-Clause AND Apache-2.0 AND BSD-2-Clause URL: %{gourl} Source: %{gosource} BuildRequires: gcc BuildRequires: pandoc BuildRequires: pkgconfig(openssl) > 3.0.0 %description %{common_description} %gopkg %prep %goprep %autopatch -p1 %generate_buildrequires %go_generate_buildrequires %build export LDFLAGS="-X \"main.GitVersion=%{version}\" -X \"main.GitVersionFuse=%{gofuse_version}\" -X \"main.BuildDate=${SOURCE_DATE_EPOCH}\" " %gobuild -o %{gobuilddir}/bin/gocryptfs %{goipath} for cmd in contrib/findholes contrib/statfs gocryptfs-xray contrib/atomicrename; do %gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd done bash Documentation/MANPAGE-render.bash %install %gopkginstall install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ install -m 0755 -vd %{buildroot}%{_mandir}/man1 install -m 0644 -vp Documentation/gocryptfs.1 %{buildroot}%{_mandir}/man1/ install -m 0644 -vp Documentation/gocryptfs-xray.1 %{buildroot}%{_mandir}/man1/ install -m 0644 -vp Documentation/statfs.1 %{buildroot}%{_mandir}/man1/ find %{gobuilddir}/src/%{goipath} -type f -iname "*.md" -delete %if %{with check} %check for test in "TestPrepareAtSyscall" \ "TestPrepareAtSyscallPlaintextnames" \ "TestGetdents" \ ; do awk -i inplace '/^func.*'"$test"'\(/ { print; print "\tt.Skip(\"disabled failing test\")"; next}1' $(grep -rl $test) done %gocheck -d tests/matrix %endif %files %license LICENSE %doc README.md Documentation/*.txt Documentation/*.md Documentation/*.png %{_bindir}/gocryptfs %{_bindir}/findholes %{_bindir}/statfs %{_bindir}/gocryptfs-xray %{_bindir}/atomicrename %{_mandir}/man1/gocryptfs.1* %{_mandir}/man1/gocryptfs-xray.1* %{_mandir}/man1/statfs.1* %gopkgfiles %changelog %autochangelog