# Generated by go2rpm 1.16.0 %bcond check 0 %global gomodulesmode GO111MODULE=on # https://github.com/rfjakob/gocryptfs %global goipath github.com/rfjakob/gocryptfs/v2 Version: 2.5.2 %gometa -L -f %global common_description %{expand: Encrypted overlay filesystem written in Go.} Name: gocryptfs Release: %autorelease Summary: Encrypted overlay filesystem written in Go # Generated by go-vendor-tools License: Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND MIT URL: %{gourl} Source0: %{gosource} # Generated by go-vendor-tools Source1: %{archivename}-vendor.tar.bz2 Source2: go-vendor-tools.toml BuildRequires: gcc BuildRequires: go-vendor-tools BuildRequires: pandoc BuildRequires: pkgconfig(libcrypto) Requires: fuse3 %description %{common_description} %prep %goprep -A %setup -q -T -D -a1 %{forgesetupargs} %autopatch -p1 %generate_buildrequires %go_vendor_license_buildrequires -c %{S:2} %build %{set_build_flags} export CGO_CFLAGS="$CFLAGS" export CGO_CPPFLAGS="$CPPFLAGS" export CGO_CXXFLAGS="$CXXFLAGS" export CGO_LDFLAGS="$LDFLAGS" export GO_LDFLAGS="-X main.GitVersion=%{version} \ -X main.GitVersionFuse=$(go list -m github.com/hanwen/go-fuse/v2 | cut -d' ' -f2-) \ -X main.BuildDate=$(date -u --date="@${SOURCE_DATE_EPOCH}" +%Y-%m-%d)" unset LDFLAGS %gobuild -o %{gobuilddir}/bin/gocryptfs %{goipath} for cmd in gocryptfs-xray contrib/statfs; do %gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd done ./Documentation/MANPAGE-render.bash %install %go_vendor_license_install -c %{S:2} install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ install -Dpm644 Documentation/gocryptfs.1 -t %{buildroot}%{_mandir}/man1 install -Dpm644 Documentation/gocryptfs-xray.1 -t %{buildroot}%{_mandir}/man1 install -Dpm644 Documentation/statfs.1 -t %{buildroot}%{_mandir}/man1 %check %go_vendor_license_check -c %{S:2} %if %{with check} %gocheck %endif %files -f %{go_vendor_license_filelist} %license vendor/modules.txt %doc README.md %{_bindir}/gocryptfs %{_bindir}/gocryptfs-xray %{_bindir}/statfs %{_mandir}/man1/gocryptfs-xray.1.* %{_mandir}/man1/gocryptfs.1.* %{_mandir}/man1/statfs.1.* %changelog %autochangelog