diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d395b30 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/gocryptfs_v1.7_src.tar.gz diff --git a/golang-github-rfjakob-gocryptfs.spec b/golang-github-rfjakob-gocryptfs.spec new file mode 100644 index 0000000..9165270 --- /dev/null +++ b/golang-github-rfjakob-gocryptfs.spec @@ -0,0 +1,100 @@ +# Generated by go2rpm +%bcond_with check + +%global source_date_epoch_from_changelog Y + +# https://github.com/rfjakob/gocryptfs +%global goipath github.com/rfjakob/gocryptfs +Version: 1.7 +%global extractdir gocryptfs_v1.7_src + +%gometa + +%global common_description %{expand: +Encrypted overlay filesystem written in Go.} + +%global golicenses LICENSE +%global godocs README.md +Name: %{goname} +Release: 1%{?dist} +Summary: Encrypted overlay filesystem written in Go + +License: MIT +URL: %{gourl} +Source0: https://%{goipath}/releases/download/v%{version}/gocryptfs_v%{version}_src.tar.gz + +BuildRequires: golang(github.com/hanwen/go-fuse/fuse) +BuildRequires: golang(github.com/hanwen/go-fuse/fuse/nodefs) +BuildRequires: golang(github.com/hanwen/go-fuse/fuse/pathfs) +BuildRequires: golang(github.com/jacobsa/crypto/siv) +BuildRequires: golang(github.com/rfjakob/eme) +BuildRequires: golang(golang.org/x/crypto/hkdf) +BuildRequires: golang(golang.org/x/crypto/scrypt) +BuildRequires: golang(golang.org/x/crypto/ssh/terminal) +BuildRequires: golang(golang.org/x/sync/syncmap) +BuildRequires: golang(golang.org/x/sys/unix) +BuildRequires: openssl-devel +Requires: fuse + +%description +%{common_description} + +%gopkg + +%package -n gocryptfs +Summary: %{summary} + +%description -n gocryptfs +%{common_description} + +%package -n gocryptfs-xray +Summary: %{summary} + +%description -n gocryptfs-xray +%{common_description} + +This package contains the xray tool. + +%prep +%goprep + +%build +USVERSION=$(cat VERSION) +GCVERSION=$USVERSION-Fedora-%{version}-%{release} +FUSEVERSION=$(rpm -q golang-github-hanwen-fuse-devel --queryformat '%%{version}') +BUILDDATE=$(date +%Y-%m-%d -d @$SOURCE_DATE_EPOCH) +# bex - notice the space here - it is needed and silly see https://pagure.io/go-rpm-macros/issue/19 +LDFLAGS="-X main.GitVersion=$GCVERSION -X main.GitVersionFuse=$FUSEVERSION -X main.BuildDate=$BUILDDATE " +%gobuild -o %{gobuilddir}/bin/gocryptfs %{goipath} +for cmd in gocryptfs-xray; do + %gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd +done + +%install +%gopkginstall +install -m 0755 -vd %{buildroot}%{_bindir} +install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ +install -D -m 644 Documentation/gocryptfs.1 %{buildroot}%{_mandir}/man1/gocryptfs.1 +install -D -m 644 Documentation/gocryptfs-xray.1 %{buildroot}%{_mandir}/man1/gocryptfs-xray.1 + +%if %{with check} +%check +%gocheck +%endif + +%files -n gocryptfs +%license LICENSE +%doc README.md +%{_bindir}/gocryptfs +%{_mandir}/man1/gocryptfs.1* + +%files -n gocryptfs-xray +%license LICENSE +%{_bindir}/gocryptfs-xray +%{_mandir}/man1/gocryptfs-xray.1* + +%gopkgfiles + +%changelog +* Sun Jun 23 11:36:48 CEST 2019 Brian (bex) Exelbierd - 1.7-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..13cc8df --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (gocryptfs_v1.7_src.tar.gz) = 3f3481bef22c4c69ccb945f3d60b9d6ed55630467cc6b84e46447d1fcc4ec6ba103f53fc22fbf611a2982857cc8acb643974b677b5edeea8ec9afea88ac48def