Blame golang-github-rfjakob-gocryptfs.spec

9ebe167
# Generated by go2rpm
9ebe167
%bcond_with check
9ebe167
9ebe167
%global source_date_epoch_from_changelog Y
9ebe167
9ebe167
# https://github.com/rfjakob/gocryptfs
9ebe167
%global goipath         github.com/rfjakob/gocryptfs
9ebe167
Version:                1.7
9ebe167
%global extractdir      gocryptfs_v1.7_src
9ebe167
9ebe167
%gometa
9ebe167
9ebe167
%global common_description %{expand:
9ebe167
Encrypted overlay filesystem written in Go.}
9ebe167
9ebe167
Name:           %{goname}
5f625a6
Release:        2%{?dist}
9ebe167
Summary:        Encrypted overlay filesystem written in Go
9ebe167
9ebe167
License:        MIT
9ebe167
URL:            %{gourl}
9ebe167
Source0:        https://%{goipath}/releases/download/v%{version}/gocryptfs_v%{version}_src.tar.gz
9ebe167
9ebe167
BuildRequires:  golang(github.com/hanwen/go-fuse/fuse)
9ebe167
BuildRequires:  golang(github.com/hanwen/go-fuse/fuse/nodefs)
9ebe167
BuildRequires:  golang(github.com/hanwen/go-fuse/fuse/pathfs)
9ebe167
BuildRequires:  golang(github.com/jacobsa/crypto/siv)
9ebe167
BuildRequires:  golang(github.com/rfjakob/eme)
9ebe167
BuildRequires:  golang(golang.org/x/crypto/hkdf)
9ebe167
BuildRequires:  golang(golang.org/x/crypto/scrypt)
9ebe167
BuildRequires:  golang(golang.org/x/crypto/ssh/terminal)
9ebe167
BuildRequires:  golang(golang.org/x/sync/syncmap)
9ebe167
BuildRequires:  golang(golang.org/x/sys/unix)
9ebe167
BuildRequires:  openssl-devel
9ebe167
9ebe167
%description
9ebe167
%{common_description}
9ebe167
16b95e9
%package devel
16b95e9
Summary:       %{summary}
16b95e9
16b95e9
%description devel
16b95e9
%{common_description}
16b95e9
16b95e9
This package contains library source intended for
16b95e9
building other packages which use import path with
16b95e9
%{goipath} prefix.
9ebe167
9ebe167
%package -n gocryptfs
9ebe167
Summary:       %{summary}
5f625a6
Requires:  fuse
9ebe167
9ebe167
%description -n gocryptfs
9ebe167
%{common_description}
9ebe167
9ebe167
%package -n gocryptfs-xray
9ebe167
Summary:       %{summary}
9ebe167
9ebe167
%description -n gocryptfs-xray
9ebe167
%{common_description}
9ebe167
9ebe167
This package contains the xray tool.
9ebe167
9ebe167
%prep
16b95e9
%forgeautosetup
9ebe167
9ebe167
%build
9ebe167
USVERSION=$(cat VERSION)
9ebe167
GCVERSION=$USVERSION-Fedora-%{version}-%{release}
9ebe167
FUSEVERSION=$(rpm -q golang-github-hanwen-fuse-devel --queryformat '%%{version}')
9ebe167
BUILDDATE=$(date +%Y-%m-%d -d @$SOURCE_DATE_EPOCH)
9ebe167
# bex - notice the space here - it is needed and silly see https://pagure.io/go-rpm-macros/issue/19
9ebe167
LDFLAGS="-X main.GitVersion=$GCVERSION -X main.GitVersionFuse=$FUSEVERSION -X main.BuildDate=$BUILDDATE "
16b95e9
%gobuildroot
9ebe167
%gobuild -o %{gobuilddir}/bin/gocryptfs %{goipath}
9ebe167
for cmd in gocryptfs-xray; do
9ebe167
  %gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd
9ebe167
done
9ebe167
9ebe167
%install
16b95e9
%goinstall
9ebe167
install -m 0755 -vd                     %{buildroot}%{_bindir}
9ebe167
install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/
9ebe167
install -D -m 644 Documentation/gocryptfs.1 %{buildroot}%{_mandir}/man1/gocryptfs.1
9ebe167
install -D -m 644 Documentation/gocryptfs-xray.1 %{buildroot}%{_mandir}/man1/gocryptfs-xray.1
9ebe167
9ebe167
%if %{with check}
9ebe167
%check
16b95e9
%gochecks
9ebe167
%endif
9ebe167
16b95e9
%files devel -f devel.file-list
16b95e9
%license LICENSE
16b95e9
%doc README.md
16b95e9
9ebe167
%files -n gocryptfs
9ebe167
%license LICENSE
9ebe167
%doc README.md
9ebe167
%{_bindir}/gocryptfs
9ebe167
%{_mandir}/man1/gocryptfs.1*
9ebe167
9ebe167
%files -n gocryptfs-xray
9ebe167
%license LICENSE
9ebe167
%{_bindir}/gocryptfs-xray
9ebe167
%{_mandir}/man1/gocryptfs-xray.1*
9ebe167
9ebe167
%changelog
5f625a6
* Sun Aug 10 18:32:00 CEST 2019 Brian (bex) Exelbierd <bex@pobox.com> - 1.7-1
5f625a6
- Update Requires
5f625a6
9ebe167
* Sun Jun 23 11:36:48 CEST 2019 Brian (bex) Exelbierd <bex@pobox.com> - 1.7-1
9ebe167
- Initial package