# Generated by go2rpm 1.8.0 %bcond_without check %global debug_package %{nil} %global gover 1.19.3 # https://github.com/rfjakob/gocryptfs %global goipath github.com/rfjakob/gocryptfs Version: 2.3 %gometa %global common_description %{expand: Encrypted overlay filesystem written in Go.} %global golicenses LICENSE %global godocs README.md Documentation/CLI_ABI.md\\\ Documentation/MANPAGE-STATFS.md\\\ Documentation/MANPAGE-XRAY.md\\\ Documentation/SECURITY.md Documentation/duplicate-\\\ inodes.txt Documentation/extractloop.md\\\ Documentation/performance-reverse.txt\\\ Documentation/performance.txt\\\ Documentation/MANPAGE.md Documentation/XFSTESTS.md\\\ Documentation/file-format.md Name: %{goname} Release: %autorelease Summary: Encrypted overlay filesystem written in Go License: MIT URL: %{gourl} Source: %{gosource} Source1: https://dl.google.com/go/go%{gover}.linux-amd64.tar.gz Provides: gocryptfs BuildRequires: git BuildRequires: openssl-devel %description %{common_description} %gopkg %package -n gocryptfs Summary: %{summary} Requires: fuse %description -n gocryptfs %{common_description} %prep %setup -b 1 -n go %goprep %build export GO111MODULE=on export GOPATH=$(pwd)/../gopath export GOROOT=$(pwd)/../go export PATH=$GOROOT/bin:$PATH export GOFUSEVER=$(grep go-fuse go.mod | cut -d' ' -f2-) export BUILDDATE=$(date +%Y-%m-%d) export LDFLAGS="-X \"main.GitVersion=%{version}-%{release}\" -X \"main.GitVersionFuse=$GOFUSEVER\" -X \"main.BuildDate=$BUILDDATE\"" go build "-ldflags=$LDFLAGS" -o %{gobuilddir}/bin/gocryptfs . for cmd in gocryptfs-xray contrib/atomicrename contrib/findholes contrib/statfs; do go build "-ldflags=$LDFLAGS" -o %{gobuilddir}/bin/$(basename $cmd) ./$cmd done %install %gopkginstall install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ %files %license LICENSE %doc README.md Documentation/CLI_ABI.md Documentation/MANPAGE-STATFS.md %doc Documentation/MANPAGE-XRAY.md Documentation/SECURITY.md %doc Documentation/duplicate-inodes.txt Documentation/extractloop.md %doc Documentation/performance-reverse.txt Documentation/performance.txt %doc Documentation/MANPAGE.md Documentation/XFSTESTS.md %doc Documentation/file-format.md %{_bindir}/* %gopkgfiles %changelog %autochangelog