File golang-github-aws-aws-sdk-go.spec of Package golang-github-aws-aws-sdk-go

# If any of the following macros should be set otherwise,
# you can wrap any of them with the following conditions:
# - %%if 0%%{centos} == 7
# - %%if 0%%{?rhel} == 7
# - %%if 0%%{?fedora} == 23
# Or just test for particular distribution:
# - %%if 0%%{centos}
# - %%if 0%%{?rhel}
# - %%if 0%%{?fedora}
#
# Be aware, on centos, both %%rhel and %%centos are set. If you want to test
# rhel specific macros, you can use %%if 0%%{?rhel} && 0%%{?centos} == 0 condition.
# (Don't forget to replace double percentage symbol with single one in order to apply a condition)

# Generate devel rpm
%global with_devel 1
# Build project from bundled dependencies
%global with_bundled 0
# Build with debug info rpm
%global with_debug 0
# Run tests in check section
# it takes too much time
%global with_check 1
# Generate unit-test rpm
%global with_unit_test 1

%if 0%{?with_debug}
%global _dwz_low_mem_die_limit 0
%else
%global debug_package   %{nil}
%endif

#%%global provided_packages    aws private service

%global provider        github
%global provider_tld    com
%global project         aws
%global repo            aws-sdk-go
# https://github.com/aws/aws-sdk-go
%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo}
%global import_path     %{provider_prefix}
%global commit          6c577e9e7b08a6d10bad1c9703227cd0403a8dd7
%global shortcommit     %(c=%{commit}; echo ${c:0:7})

Name:           golang-%{provider}-%{project}-%{repo}
Version:        1.4.22
Release:        0.1.git%{shortcommit}%{?dist}
Summary:        AWS SDK for the Go programming language
License:        ASL 2.0
URL:            https://%{provider_prefix}
Source0:        https://%{provider_prefix}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz

# e.g. el6 has ppc64 arch without gcc-go, so EA tag is required
ExclusiveArch:  %{?go_arches:%{go_arches}}%{!?go_arches:%{ix86} x86_64 aarch64 %{arm}}
# If go_compiler is not set to 1, there is no virtual provide. Use golang instead.
BuildRequires:  %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang}

%description
%{summary}

%if 0%{?with_devel}
%package devel
Summary:       %{summary}
BuildArch:     noarch

%if 0%{?with_check}
BuildRequires: golang(github.com/go-ini/ini)
BuildRequires: golang(github.com/gucumber/gucumber)
BuildRequires: golang(github.com/jmespath/go-jmespath)
BuildRequires: golang(github.com/stretchr/testify/assert)
BuildRequires: golang(golang.org/x/net/html)
BuildRequires: golang(golang.org/x/tools/go/loader)
%endif

Requires:      golang(github.com/go-ini/ini)
Requires:      golang(github.com/gucumber/gucumber)
Requires:      golang(github.com/jmespath/go-jmespath)
Requires:      golang(github.com/stretchr/testify/assert)
Requires:      golang(golang.org/x/net/html)
Requires:      golang(golang.org/x/tools/go/loader)

Provides:      golang(%{import_path}) = %{version}-%{release}
Provides:      golang(%{import_path}/aws) = %{version}-%{release}
Provides:      golang(%{import_path}/aws/awserr) = %{version}-%{release}
Provides:      golang(%{import_path}/aws/awsutil) = %{version}-%{release}
Provides:      golang(%{import_path}/aws/client) = %{version}-%{release}
Provides:      golang(%{import_path}/aws/client/metadata) = %{version}-%{release}
Provides:      golang(%{import_path}/aws/corehandlers) = %{version}-%{release}
Provides:      golang(%{import_path}/aws/credentials) = %{version}-%{release}
Provides:      golang(%{import_path}/aws/credentials/ec2rolecreds) = %{version}-%{release}
Provides:      golang(%{import_path}/aws/credentials/endpointcreds) = %{version}-%{release}
Provides:      golang(%{import_path}/aws/credentials/stscreds) = %{version}-%{release}
Provides:      golang(%{import_path}/aws/defaults) = %{version}-%{release}
Provides:      golang(%{import_path}/aws/ec2metadata) = %{version}-%{release}
Provides:      golang(%{import_path}/aws/request) = %{version}-%{release}
Provides:      golang(%{import_path}/aws/session) = %{version}-%{release}
Provides:      golang(%{import_path}/aws/signer/v4) = %{version}-%{release}
Provides:      golang(%{import_path}/awsmigrate/awsmigrate-renamer/rename) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/customizations/s3) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/customizations/s3/s3crypto) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/customizations/s3/s3manager) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/acm) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/apigateway) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/applicationdiscoveryservice) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/autoscaling) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/cloudformation) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/cloudfront) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/cloudhsm) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/cloudsearch) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/cloudtrail) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/cloudwatch) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/cloudwatchlogs) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/codecommit) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/codedeploy) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/codepipeline) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/cognitoidentity) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/cognitosync) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/configservice) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/datapipeline) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/devicefarm) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/directconnect) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/directoryservice) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/dynamodb) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/dynamodbstreams) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/ec2) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/ecs) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/efs) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/elasticache) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/elasticbeanstalk) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/elasticloadbalancing) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/elastictranscoder) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/emr) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/es) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/glacier) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/iam) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/iotdataplane) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/kinesis) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/kms) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/lambda) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/machinelearning) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/opsworks) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/rds) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/redshift) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/route53) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/route53domains) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/ses) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/simpledb) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/sns) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/sqs) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/ssm) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/storagegateway) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/sts) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/support) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/swf) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/waf) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/integration/smoke/workspaces) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/mock) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/performance) = %{version}-%{release}
Provides:      golang(%{import_path}/awstesting/unit) = %{version}-%{release}
Provides:      golang(%{import_path}/private/endpoints) = %{version}-%{release}
Provides:      golang(%{import_path}/private/model) = %{version}-%{release}
Provides:      golang(%{import_path}/private/model/api) = %{version}-%{release}
Provides:      golang(%{import_path}/private/protocol) = %{version}-%{release}
Provides:      golang(%{import_path}/private/protocol/ec2query) = %{version}-%{release}
Provides:      golang(%{import_path}/private/protocol/json/jsonutil) = %{version}-%{release}
Provides:      golang(%{import_path}/private/protocol/jsonrpc) = %{version}-%{release}
Provides:      golang(%{import_path}/private/protocol/query) = %{version}-%{release}
Provides:      golang(%{import_path}/private/protocol/query/queryutil) = %{version}-%{release}
Provides:      golang(%{import_path}/private/protocol/rest) = %{version}-%{release}
Provides:      golang(%{import_path}/private/protocol/restjson) = %{version}-%{release}
Provides:      golang(%{import_path}/private/protocol/restxml) = %{version}-%{release}
Provides:      golang(%{import_path}/private/protocol/xml/xmlutil) = %{version}-%{release}
Provides:      golang(%{import_path}/private/signer/v2) = %{version}-%{release}
Provides:      golang(%{import_path}/private/util) = %{version}-%{release}
Provides:      golang(%{import_path}/private/waiter) = %{version}-%{release}
Provides:      golang(%{import_path}/service) = %{version}-%{release}
Provides:      golang(%{import_path}/service/acm) = %{version}-%{release}
Provides:      golang(%{import_path}/service/acm/acmiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/apigateway) = %{version}-%{release}
Provides:      golang(%{import_path}/service/apigateway/apigatewayiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/applicationautoscaling) = %{version}-%{release}
Provides:      golang(%{import_path}/service/applicationautoscaling/applicationautoscalingiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/applicationdiscoveryservice) = %{version}-%{release}
Provides:      golang(%{import_path}/service/applicationdiscoveryservice/applicationdiscoveryserviceiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/autoscaling) = %{version}-%{release}
Provides:      golang(%{import_path}/service/autoscaling/autoscalingiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/budgets) = %{version}-%{release}
Provides:      golang(%{import_path}/service/budgets/budgetsiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/cloudformation) = %{version}-%{release}
Provides:      golang(%{import_path}/service/cloudformation/cloudformationiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/cloudfront) = %{version}-%{release}
Provides:      golang(%{import_path}/service/cloudfront/cloudfrontiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/cloudfront/sign) = %{version}-%{release}
Provides:      golang(%{import_path}/service/cloudhsm) = %{version}-%{release}
Provides:      golang(%{import_path}/service/cloudhsm/cloudhsmiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/cloudsearch) = %{version}-%{release}
Provides:      golang(%{import_path}/service/cloudsearch/cloudsearchiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/cloudsearchdomain) = %{version}-%{release}
Provides:      golang(%{import_path}/service/cloudsearchdomain/cloudsearchdomainiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/cloudtrail) = %{version}-%{release}
Provides:      golang(%{import_path}/service/cloudtrail/cloudtrailiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/cloudwatch) = %{version}-%{release}
Provides:      golang(%{import_path}/service/cloudwatch/cloudwatchiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/cloudwatchevents) = %{version}-%{release}
Provides:      golang(%{import_path}/service/cloudwatchevents/cloudwatcheventsiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/cloudwatchlogs) = %{version}-%{release}
Provides:      golang(%{import_path}/service/cloudwatchlogs/cloudwatchlogsiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/codecommit) = %{version}-%{release}
Provides:      golang(%{import_path}/service/codecommit/codecommitiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/codedeploy) = %{version}-%{release}
Provides:      golang(%{import_path}/service/codedeploy/codedeployiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/codepipeline) = %{version}-%{release}
Provides:      golang(%{import_path}/service/codepipeline/codepipelineiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/cognitoidentity) = %{version}-%{release}
Provides:      golang(%{import_path}/service/cognitoidentity/cognitoidentityiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/cognitoidentityprovider) = %{version}-%{release}
Provides:      golang(%{import_path}/service/cognitoidentityprovider/cognitoidentityprovideriface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/cognitosync) = %{version}-%{release}
Provides:      golang(%{import_path}/service/cognitosync/cognitosynciface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/configservice) = %{version}-%{release}
Provides:      golang(%{import_path}/service/configservice/configserviceiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/databasemigrationservice) = %{version}-%{release}
Provides:      golang(%{import_path}/service/databasemigrationservice/databasemigrationserviceiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/datapipeline) = %{version}-%{release}
Provides:      golang(%{import_path}/service/datapipeline/datapipelineiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/devicefarm) = %{version}-%{release}
Provides:      golang(%{import_path}/service/devicefarm/devicefarmiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/directconnect) = %{version}-%{release}
Provides:      golang(%{import_path}/service/directconnect/directconnectiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/directoryservice) = %{version}-%{release}
Provides:      golang(%{import_path}/service/directoryservice/directoryserviceiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/dynamodb) = %{version}-%{release}
Provides:      golang(%{import_path}/service/dynamodb/dynamodbattribute) = %{version}-%{release}
Provides:      golang(%{import_path}/service/dynamodb/dynamodbiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/dynamodbstreams) = %{version}-%{release}
Provides:      golang(%{import_path}/service/dynamodbstreams/dynamodbstreamsiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/ec2) = %{version}-%{release}
Provides:      golang(%{import_path}/service/ec2/ec2iface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/ecr) = %{version}-%{release}
Provides:      golang(%{import_path}/service/ecr/ecriface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/ecs) = %{version}-%{release}
Provides:      golang(%{import_path}/service/ecs/ecsiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/efs) = %{version}-%{release}
Provides:      golang(%{import_path}/service/efs/efsiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/elasticache) = %{version}-%{release}
Provides:      golang(%{import_path}/service/elasticache/elasticacheiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/elasticbeanstalk) = %{version}-%{release}
Provides:      golang(%{import_path}/service/elasticbeanstalk/elasticbeanstalkiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/elasticsearchservice) = %{version}-%{release}
Provides:      golang(%{import_path}/service/elasticsearchservice/elasticsearchserviceiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/elastictranscoder) = %{version}-%{release}
Provides:      golang(%{import_path}/service/elastictranscoder/elastictranscoderiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/elb) = %{version}-%{release}
Provides:      golang(%{import_path}/service/elb/elbiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/elbv2) = %{version}-%{release}
Provides:      golang(%{import_path}/service/elbv2/elbv2iface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/emr) = %{version}-%{release}
Provides:      golang(%{import_path}/service/emr/emriface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/firehose) = %{version}-%{release}
Provides:      golang(%{import_path}/service/firehose/firehoseiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/gamelift) = %{version}-%{release}
Provides:      golang(%{import_path}/service/gamelift/gameliftiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/glacier) = %{version}-%{release}
Provides:      golang(%{import_path}/service/glacier/glacieriface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/iam) = %{version}-%{release}
Provides:      golang(%{import_path}/service/iam/iamiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/inspector) = %{version}-%{release}
Provides:      golang(%{import_path}/service/inspector/inspectoriface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/iot) = %{version}-%{release}
Provides:      golang(%{import_path}/service/iot/iotiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/iotdataplane) = %{version}-%{release}
Provides:      golang(%{import_path}/service/iotdataplane/iotdataplaneiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/kinesis) = %{version}-%{release}
Provides:      golang(%{import_path}/service/kinesis/kinesisiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/kinesisanalytics) = %{version}-%{release}
Provides:      golang(%{import_path}/service/kinesisanalytics/kinesisanalyticsiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/kms) = %{version}-%{release}
Provides:      golang(%{import_path}/service/kms/kmsiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/lambda) = %{version}-%{release}
Provides:      golang(%{import_path}/service/lambda/lambdaiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/machinelearning) = %{version}-%{release}
Provides:      golang(%{import_path}/service/machinelearning/machinelearningiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/marketplacecommerceanalytics) = %{version}-%{release}
Provides:      golang(%{import_path}/service/marketplacecommerceanalytics/marketplacecommerceanalyticsiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/marketplacemetering) = %{version}-%{release}
Provides:      golang(%{import_path}/service/marketplacemetering/marketplacemeteringiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/mobileanalytics) = %{version}-%{release}
Provides:      golang(%{import_path}/service/mobileanalytics/mobileanalyticsiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/opsworks) = %{version}-%{release}
Provides:      golang(%{import_path}/service/opsworks/opsworksiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/rds) = %{version}-%{release}
Provides:      golang(%{import_path}/service/rds/rdsiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/redshift) = %{version}-%{release}
Provides:      golang(%{import_path}/service/redshift/redshiftiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/route53) = %{version}-%{release}
Provides:      golang(%{import_path}/service/route53/route53iface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/route53domains) = %{version}-%{release}
Provides:      golang(%{import_path}/service/route53domains/route53domainsiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/s3) = %{version}-%{release}
Provides:      golang(%{import_path}/service/s3/s3crypto) = %{version}-%{release}
Provides:      golang(%{import_path}/service/s3/s3iface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/s3/s3manager) = %{version}-%{release}
Provides:      golang(%{import_path}/service/s3/s3manager/s3manageriface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/servicecatalog) = %{version}-%{release}
Provides:      golang(%{import_path}/service/servicecatalog/servicecatalogiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/ses) = %{version}-%{release}
Provides:      golang(%{import_path}/service/ses/sesiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/simpledb) = %{version}-%{release}
Provides:      golang(%{import_path}/service/simpledb/simpledbiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/sms) = %{version}-%{release}
Provides:      golang(%{import_path}/service/sms/smsiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/snowball) = %{version}-%{release}
Provides:      golang(%{import_path}/service/snowball/snowballiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/sns) = %{version}-%{release}
Provides:      golang(%{import_path}/service/sns/snsiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/sqs) = %{version}-%{release}
Provides:      golang(%{import_path}/service/sqs/sqsiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/ssm) = %{version}-%{release}
Provides:      golang(%{import_path}/service/ssm/ssmiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/storagegateway) = %{version}-%{release}
Provides:      golang(%{import_path}/service/storagegateway/storagegatewayiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/sts) = %{version}-%{release}
Provides:      golang(%{import_path}/service/sts/stsiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/support) = %{version}-%{release}
Provides:      golang(%{import_path}/service/support/supportiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/swf) = %{version}-%{release}
Provides:      golang(%{import_path}/service/swf/swfiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/waf) = %{version}-%{release}
Provides:      golang(%{import_path}/service/waf/wafiface) = %{version}-%{release}
Provides:      golang(%{import_path}/service/workspaces) = %{version}-%{release}
Provides:      golang(%{import_path}/service/workspaces/workspacesiface) = %{version}-%{release}

%description devel
%{summary}

This package contains library source intended for
building other packages which use import path with
%{import_path} prefix.
%endif

%if 0%{?with_unit_test} && 0%{?with_devel}
%package unit-test
Summary:         Unit tests for %{name} package
%if 0%{?with_check}
#Here comes all BuildRequires: PACKAGE the unit tests
#in %%check section need for running
%endif

# test subpackage tests code from devel subpackage
Requires:        %{name}-devel = %{version}-%{release}

%description unit-test
%{summary}

This package contains unit tests for project
providing packages with %{import_path} prefix.
%endif

%prep
%setup -q -n %{repo}-%{commit}

%build

%install
%if !0%{?with_bundled}
pushd vendor
mkdir -p src
mv $(ls | grep -v "src") src/.
popd
%endif

# source codes for building projects
%if 0%{?with_devel}
install -d -p %{buildroot}/%{gopath}/src/%{import_path}/
echo "%%dir %%{gopath}/src/%%{import_path}/." >> devel.file-list
# find all *.go but no *_test.go files and generate devel.file-list
for file in $(find . -iname "*.go" \! -iname "*_test.go" | grep -v "./vendor") ; do
    echo "%%dir %%{gopath}/src/%%{import_path}/$(dirname $file)" >> devel.file-list
    install -d -p %{buildroot}/%{gopath}/src/%{import_path}/$(dirname $file)
    cp -pav $file %{buildroot}/%{gopath}/src/%{import_path}/$file
    echo "%%{gopath}/src/%%{import_path}/$file" >> devel.file-list
done
%endif

# testing files for this project
%if 0%{?with_unit_test} && 0%{?with_devel}
install -d -p %{buildroot}/%{gopath}/src/%{import_path}/
# find all *_test.go files and generate unit-test.file-list
for file in $(find . -iname "*_test.go" | grep -v "./vendor"); do
    echo "%%dir %%{gopath}/src/%%{import_path}/$(dirname $file)" >> devel.file-list
    install -d -p %{buildroot}/%{gopath}/src/%{import_path}/$(dirname $file)
    cp -pav $file %{buildroot}/%{gopath}/src/%{import_path}/$file
    echo "%%{gopath}/src/%%{import_path}/$file" >> unit-test.file-list
done
for file in $(find . -iname "*.json" | grep -v "./vendor"); do
    echo "%%dir %%{gopath}/src/%%{import_path}/$(dirname $file)" >> devel.file-list
    install -d -p %{buildroot}/%{gopath}/src/%{import_path}/$(dirname $file)
    cp -pav $file %{buildroot}/%{gopath}/src/%{import_path}/$file
    echo "%%{gopath}/src/%%{import_path}/$file" >> unit-test.file-list
done
for file in ./aws/credentials/example.ini; do
    echo "%%dir %%{gopath}/src/%%{import_path}/$(dirname $file)" >> devel.file-list
    install -d -p %{buildroot}/%{gopath}/src/%{import_path}/$(dirname $file)
    cp -pav $file %{buildroot}/%{gopath}/src/%{import_path}/$file
    echo "%%{gopath}/src/%%{import_path}/$file" >> unit-test.file-list
done
%endif

%if 0%{?with_devel}
sort -u -o devel.file-list devel.file-list
%endif

%check
%if 0%{?with_check} && 0%{?with_unit_test} && 0%{?with_devel}
%if ! 0%{?with_bundled}
export GOPATH=%{buildroot}/%{gopath}:%{gopath}
%else
export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath}
%endif

%if ! 0%{?gotest:1}
%global gotest go test
%endif

%gotest %{import_path}/aws
%gotest %{import_path}/aws/awsutil
%gotest %{import_path}/aws/corehandlers
%gotest %{import_path}/aws/credentials
%gotest %{import_path}/aws/credentials/ec2rolecreds
%gotest %{import_path}/aws/credentials/stscreds
%gotest %{import_path}/aws/ec2metadata
%gotest %{import_path}/aws/request
# %gotest %{import_path}/aws/session
%gotest %{import_path}/awstesting
%gotest %{import_path}/awstesting/integration/customizations/s3
%gotest %{import_path}/awstesting/integration/customizations/s3/s3manager
%gotest %{import_path}/private/endpoints
#%gotest %{import_path}/private/model/api
%gotest %{import_path}/private/protocol
%gotest %{import_path}/private/protocol/ec2query
%gotest %{import_path}/private/protocol/json/jsonutil
%gotest %{import_path}/private/protocol/jsonrpc
%gotest %{import_path}/private/protocol/query
%gotest %{import_path}/private/protocol/restjson
%gotest %{import_path}/private/protocol/restxml
%gotest %{import_path}/private/signer/v2
%gotest %{import_path}/private/waiter
%gotest %{import_path}/service/acm
%gotest %{import_path}/service/apigateway
%gotest %{import_path}/service/autoscaling
%gotest %{import_path}/service/cloudformation
%gotest %{import_path}/service/cloudfront
%gotest %{import_path}/service/cloudfront/sign
%gotest %{import_path}/service/cloudhsm
%gotest %{import_path}/service/cloudsearch
%gotest %{import_path}/service/cloudsearchdomain
%gotest %{import_path}/service/cloudtrail
%gotest %{import_path}/service/cloudwatch
%gotest %{import_path}/service/cloudwatchevents
%gotest %{import_path}/service/cloudwatchlogs
%gotest %{import_path}/service/codecommit
%gotest %{import_path}/service/codedeploy
%gotest %{import_path}/service/codepipeline
%gotest %{import_path}/service/cognitoidentity
%gotest %{import_path}/service/cognitosync
%gotest %{import_path}/service/configservice
%gotest %{import_path}/service/datapipeline
%gotest %{import_path}/service/devicefarm
%gotest %{import_path}/service/directconnect
%gotest %{import_path}/service/directoryservice
%gotest %{import_path}/service/dynamodb
%gotest %{import_path}/service/dynamodb/dynamodbattribute
%gotest %{import_path}/service/dynamodbstreams
%gotest %{import_path}/service/ec2
%gotest %{import_path}/service/ecr
%gotest %{import_path}/service/ecs
%gotest %{import_path}/service/efs
%gotest %{import_path}/service/elasticache
%gotest %{import_path}/service/elasticbeanstalk
%gotest %{import_path}/service/elasticsearchservice
%gotest %{import_path}/service/elastictranscoder
%gotest %{import_path}/service/elb
%gotest %{import_path}/service/emr
%gotest %{import_path}/service/firehose
%gotest %{import_path}/service/gamelift
%gotest %{import_path}/service/glacier
%gotest %{import_path}/service/iam
%gotest %{import_path}/service/inspector
%gotest %{import_path}/service/iot
%gotest %{import_path}/service/iotdataplane
%gotest %{import_path}/service/kinesis
%gotest %{import_path}/service/kms
%gotest %{import_path}/service/lambda
%gotest %{import_path}/service/machinelearning
%gotest %{import_path}/service/marketplacecommerceanalytics
%gotest %{import_path}/service/mobileanalytics
%gotest %{import_path}/service/opsworks
%gotest %{import_path}/service/rds
%gotest %{import_path}/service/redshift
%gotest %{import_path}/service/route53
%gotest %{import_path}/service/route53domains
%gotest %{import_path}/service/s3
%gotest %{import_path}/service/s3/s3manager
%gotest %{import_path}/service/ses
%gotest %{import_path}/service/simpledb
%gotest %{import_path}/service/sns
%gotest %{import_path}/service/sqs
%gotest %{import_path}/service/ssm
%gotest %{import_path}/service/storagegateway
%gotest %{import_path}/service/sts
%gotest %{import_path}/service/support
%gotest %{import_path}/service/swf
%gotest %{import_path}/service/waf
%gotest %{import_path}/service/workspaces
%endif

#define license tag if not already defined
%{!?_licensedir:%global license %doc}

%if 0%{?with_devel}
%files devel -f devel.file-list
%license LICENSE.txt
%doc README.md
%dir %{gopath}/src/%{provider}.%{provider_tld}/%{project}
%endif

%if 0%{?with_unit_test} && 0%{?with_devel}
%files unit-test -f unit-test.file-list
%license LICENSE.txt
%endif

%changelog
* Fri Jan 20 2017 Jan Chaloupka <jchaloup@redhat.com> - 1.4.22-0.1.git6c577e9
- Bump to upstream 6c577e9e7b08a6d10bad1c9703227cd0403a8dd7
  resolves: #1274280

* Thu Sep 15 2016 Matthias Runge <mrunge@redhat.com> - 1.4.9-1
- update to 1.4.9 (rhbz#1297679)

* Thu Jul 21 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.3-2
- https://fedoraproject.org/wiki/Changes/golang1.7

* Wed Apr 20 2016 jchaloup <jchaloup@redhat.com> - 1.1.3-1
- Bump to v1.1.3
  related: #1269806

* Mon Feb 22 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.5-3
- https://fedoraproject.org/wiki/Changes/golang1.6

* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Thu Oct 22 2015 jchaloup <jchaloup@redhat.com> - 0.9.5-1
- Bump to upstream f096b7d61df3d7d6d97f0e701f92616d1ea5420d
  related: #1269806

* Thu Oct 22 2015 jchaloup <jchaloup@redhat.com> - 0.9.4-1.rc5.1
- Bump to upstream 5c0313fff8cd85670ae4fc996254dd7d66cb4cf7
  related: #1269806

* Thu Oct 08 2015 jchaloup <jchaloup@redhat.com> - 0.6.1-1
- First package for Fedora
  resolves: #1269806