|
|
c4eb463 |
%global debug_package %{nil}
|
|
|
c4eb463 |
%global provider google
|
|
|
c4eb463 |
%global provider_sub code
|
|
|
c4eb463 |
%global provider_tld com
|
|
|
c4eb463 |
%global project p
|
|
|
c4eb463 |
%global repo crypto
|
|
|
c4eb463 |
%global import_path %{provider_sub}.%{provider}.%{provider_tld}/%{project}/go.%{repo}
|
|
|
c4eb463 |
%global rev 69e2a90ed92d03812364aeb947b7068dc42e561e
|
|
|
c4eb463 |
%global shortrev %(r=%{rev}; echo ${r:0:12})
|
|
|
c4eb463 |
|
|
|
c4eb463 |
%global x_provider golang
|
|
|
c4eb463 |
%global x_provider_tld org
|
|
|
c4eb463 |
%global x_repo crypto
|
|
|
c4eb463 |
%global x_import_path %{x_provider}.%{x_provider_tld}/x/%{x_repo}
|
|
|
c4eb463 |
%global x_name golang-%{x_provider}%{x_provider_tld}-%{repo}
|
|
|
c4eb463 |
|
|
|
c4eb463 |
Name: golang-%{provider}%{provider_sub}-go-%{repo}
|
|
|
c4eb463 |
Version: 0
|
|
|
9897f48 |
Release: 0.2.hg%{shortrev}%{?dist}
|
|
|
c4eb463 |
Summary: Supplementary Go cryptography libraries
|
|
|
c4eb463 |
License: BSD
|
|
|
c4eb463 |
URL: https://%{import_path}
|
|
|
9897f48 |
Source0: https://%{repo}.go.%{provider}%{provider_sub}.%{provider_tld}/archive/%{rev}.tar.gz
|
|
|
c4eb463 |
%if 0%{?fedora} >= 19 || 0%{?rhel} >= 7
|
|
|
c4eb463 |
BuildArch: noarch
|
|
|
c4eb463 |
%else
|
|
|
c4eb463 |
ExclusiveArch: %{ix86} x86_64 %{arm}
|
|
|
c4eb463 |
%endif
|
|
|
c4eb463 |
|
|
|
c4eb463 |
%description
|
|
|
c4eb463 |
%{summary}
|
|
|
c4eb463 |
|
|
|
c4eb463 |
%package devel
|
|
|
c4eb463 |
BuildRequires: golang >= 1.2.1-3
|
|
|
c4eb463 |
Requires: golang >= 1.2.1-3
|
|
|
c4eb463 |
Summary: %{summary}
|
|
|
c4eb463 |
Provides: golang(%{import_path}/bcrypt) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{import_path}/blowfish) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{import_path}/bn256) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{import_path}/cast5) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{import_path}/curve25519) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{import_path}/hkdf) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{import_path}/md4) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{import_path}/nacl/box) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{import_path}/nacl/secretbox) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{import_path}/ocsp) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{import_path}/openpgp) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{import_path}/openpgp/armor) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{import_path}/openpgp/clearsign) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{import_path}/openpgp/elgamal) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{import_path}/openpgp/errors) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{import_path}/openpgp/packet) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{import_path}/openpgp/s2k) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{import_path}/otr) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{import_path}/pbkdf2) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{import_path}/poly1305) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{import_path}/ripemd160) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{import_path}/salsa20) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{import_path}/salsa20/salsa) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{import_path}/scrypt) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{import_path}/sha3) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{import_path}/ssh) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{import_path}/ssh/agent) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{import_path}/ssh/terminal) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{import_path}/ssh/test) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{import_path}/ssh/testdata) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{import_path}/twofish) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{import_path}/xtea) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{import_path}/xts) = %{version}-%{release}
|
|
|
c4eb463 |
|
|
|
c4eb463 |
%description devel
|
|
|
c4eb463 |
%{summary}
|
|
|
c4eb463 |
|
|
|
c4eb463 |
This package contains library source intended for building other packages
|
|
|
c4eb463 |
which use the supplementary Go crypto libraries with code.google.com/p/ imports.
|
|
|
c4eb463 |
|
|
|
c4eb463 |
%package -n %{x_name}-devel
|
|
|
c4eb463 |
BuildRequires: golang >= 1.2.1-3
|
|
|
c4eb463 |
Requires: golang >= 1.2.1-3
|
|
|
c4eb463 |
Summary: %{summary}
|
|
|
c4eb463 |
Provides: golang(%{x_import_path}/bcrypt) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{x_import_path}/blowfish) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{x_import_path}/bn256) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{x_import_path}/cast5) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{x_import_path}/curve25519) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{x_import_path}/hkdf) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{x_import_path}/md4) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{x_import_path}/nacl/box) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{x_import_path}/nacl/secretbox) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{x_import_path}/ocsp) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{x_import_path}/openpgp) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{x_import_path}/openpgp/armor) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{x_import_path}/openpgp/clearsign) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{x_import_path}/openpgp/elgamal) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{x_import_path}/openpgp/errors) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{x_import_path}/openpgp/packet) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{x_import_path}/openpgp/s2k) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{x_import_path}/otr) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{x_import_path}/pbkdf2) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{x_import_path}/poly1305) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{x_import_path}/ripemd160) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{x_import_path}/salsa20) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{x_import_path}/salsa20/salsa) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{x_import_path}/scrypt) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{x_import_path}/sha3) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{x_import_path}/ssh) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{x_import_path}/ssh/agent) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{x_import_path}/ssh/terminal) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{x_import_path}/ssh/test) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{x_import_path}/ssh/testdata) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{x_import_path}/twofish) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{x_import_path}/xtea) = %{version}-%{release}
|
|
|
c4eb463 |
Provides: golang(%{x_import_path}/xts) = %{version}-%{release}
|
|
|
c4eb463 |
|
|
|
c4eb463 |
|
|
|
c4eb463 |
%description -n %{x_name}-devel
|
|
|
c4eb463 |
%{summary}
|
|
|
c4eb463 |
|
|
|
c4eb463 |
This package contains library source intended for building other packages
|
|
|
c4eb463 |
which use the supplementary Go crypto libraries with golang.org/x/ imports.
|
|
|
c4eb463 |
|
|
|
c4eb463 |
%prep
|
|
|
c4eb463 |
%setup -q -n %{repo}.go-%{shortrev}
|
|
|
c4eb463 |
|
|
|
c4eb463 |
%build
|
|
|
c4eb463 |
|
|
|
c4eb463 |
%install
|
|
|
9897f48 |
install -d -p %{buildroot}%{gopath}/src/%{import_path}/
|
|
|
9897f48 |
install -d -p %{buildroot}%{gopath}/src/%{x_import_path}/
|
|
|
9897f48 |
for dir in */ ; do
|
|
|
9897f48 |
cp -rpav $dir %{buildroot}%{gopath}/src/%{import_path}/
|
|
|
9897f48 |
cp -rpav $dir %{buildroot}%{gopath}/src/%{x_import_path}/
|
|
|
9897f48 |
done
|
|
|
c4eb463 |
|
|
|
c4eb463 |
cd %{buildroot}/%{gopath}/src/%{import_path}/
|
|
|
c4eb463 |
# from https://groups.google.com/forum/#!topic/golang-nuts/eD8dh3T9yyA, first post
|
|
|
c4eb463 |
sed -i 's/"golang\.org\/x\//"code\.google\.com\/p\/go\./g' \
|
|
|
c4eb463 |
$(find . -name '*.go')
|
|
|
c4eb463 |
|
|
|
c4eb463 |
%check
|
|
|
9897f48 |
GOPATH=%{buildroot}%{gopath}:%{gopath} go test %{import_path}/xts
|
|
|
9897f48 |
GOPATH=%{buildroot}%{gopath}:%{gopath} go test %{import_path}/xtea
|
|
|
9897f48 |
GOPATH=%{buildroot}%{gopath}:%{gopath} go test %{import_path}/twofish
|
|
|
c4eb463 |
# fails on ssh/keys_test.go:55: undefined: elliptic.P224
|
|
|
c4eb463 |
#GOPATH=%{buildroot}/%{gopath}:%{gopath} go test %{import_path}/ssh
|
|
|
9897f48 |
GOPATH=%{buildroot}%{gopath}:%{gopath} go test %{import_path}/ssh/test
|
|
|
9897f48 |
GOPATH=%{buildroot}%{gopath}:%{gopath} go test %{import_path}/ssh/terminal
|
|
|
9897f48 |
GOPATH=%{buildroot}%{gopath}:%{gopath} go test %{import_path}/ssh/agent
|
|
|
9897f48 |
GOPATH=%{buildroot}%{gopath}:%{gopath} go test %{import_path}/sha3
|
|
|
9897f48 |
GOPATH=%{buildroot}%{gopath}:%{gopath} go test %{import_path}/scrypt
|
|
|
9897f48 |
GOPATH=%{buildroot}%{gopath}:%{gopath} go test %{import_path}/salsa20
|
|
|
9897f48 |
GOPATH=%{buildroot}%{gopath}:%{gopath} go test %{import_path}/salsa20/salsa
|
|
|
9897f48 |
GOPATH=%{buildroot}%{gopath}:%{gopath} go test %{import_path}/ripemd160
|
|
|
9897f48 |
GOPATH=%{buildroot}%{gopath}:%{gopath} go test %{import_path}/poly1305
|
|
|
9897f48 |
GOPATH=%{buildroot}%{gopath}:%{gopath} go test %{import_path}/pbkdf2
|
|
|
9897f48 |
GOPATH=%{buildroot}%{gopath}:%{gopath} go test %{import_path}/otr
|
|
|
9897f48 |
GOPATH=%{buildroot}%{gopath}:%{gopath} go test %{import_path}/openpgp
|
|
|
9897f48 |
GOPATH=%{buildroot}%{gopath}:%{gopath} go test %{import_path}/openpgp/s2k
|
|
|
9897f48 |
GOPATH=%{buildroot}%{gopath}:%{gopath} go test %{import_path}/openpgp/packet
|
|
|
9897f48 |
GOPATH=%{buildroot}%{gopath}:%{gopath} go test %{import_path}/openpgp/elgamal
|
|
|
9897f48 |
GOPATH=%{buildroot}%{gopath}:%{gopath} go test %{import_path}/openpgp/clearsign
|
|
|
9897f48 |
GOPATH=%{buildroot}%{gopath}:%{gopath} go test %{import_path}/openpgp/armor
|
|
|
9897f48 |
GOPATH=%{buildroot}%{gopath}:%{gopath} go test %{import_path}/ocsp
|
|
|
9897f48 |
GOPATH=%{buildroot}%{gopath}:%{gopath} go test %{import_path}/nacl/secretbox
|
|
|
9897f48 |
GOPATH=%{buildroot}%{gopath}:%{gopath} go test %{import_path}/nacl/box
|
|
|
9897f48 |
GOPATH=%{buildroot}%{gopath}:%{gopath} go test %{import_path}/md4
|
|
|
9897f48 |
GOPATH=%{buildroot}%{gopath}:%{gopath} go test %{import_path}/hkdf
|
|
|
9897f48 |
GOPATH=%{buildroot}%{gopath}:%{gopath} go test %{import_path}/curve25519
|
|
|
9897f48 |
GOPATH=%{buildroot}%{gopath}:%{gopath} go test %{import_path}/cast5
|
|
|
9897f48 |
GOPATH=%{buildroot}%{gopath}:%{gopath} go test %{import_path}/bn256
|
|
|
9897f48 |
GOPATH=%{buildroot}%{gopath}:%{gopath} go test %{import_path}/blowfish
|
|
|
9897f48 |
GOPATH=%{buildroot}%{gopath}:%{gopath} go test %{import_path}/bcrypt
|
|
|
c4eb463 |
|
|
|
c4eb463 |
%files devel
|
|
|
c4eb463 |
%doc LICENSE README
|
|
|
c4eb463 |
%{gopath}/src/%{import_path}/
|
|
|
c4eb463 |
|
|
|
c4eb463 |
%files -n %{x_name}-devel
|
|
|
c4eb463 |
%doc AUTHORS CONTRIBUTORS LICENSE PATENTS README
|
|
|
c4eb463 |
%{gopath}/src/%{x_import_path}
|
|
|
c4eb463 |
|
|
|
c4eb463 |
%changelog
|
|
|
9897f48 |
* Sun Dec 14 2014 Lokesh Mandvekar <lsm5@fedoraproject.org> - 0-0.2.hg69e2a90ed92d
|
|
|
9897f48 |
- Correct Source0 URL
|
|
|
9897f48 |
- Correct paths for golang.org/x/crypto/*
|
|
|
9897f48 |
|
|
|
c4eb463 |
* Thu Dec 04 2014 jchaloup <jchaloup@redhat.com> - 0-0.1.hg69e2a90ed92d
|
|
|
c4eb463 |
- First package for Fedora
|
|
|
c4eb463 |
resolves: #1148704
|
|
|
c4eb463 |
|