consul/consul.spec
2019-03-25 19:36:40 +03:00

65 lines
No EOL
2.1 KiB
RPMSpec

%define getsource github.com/hashicorp/%{name}
%define debug %nil
%define debug_package %nil
Name: consul
Version: 1.4.4
Release: 1
Summary: Service discovery tool
URL: https://www.consul.io/
License: MPLv2.0
Group: System/Cluster
Source1000: %{name}.rpmlintrc
BuildRequires: go
BuildRequires: git
BuildRequires: upx
%description
Consul is a tool for service discovery and configuration.
Consul is distributed, highly available, and extremely scalable.
Consul provides several key features:
- Service Discovery - Consul makes it simple for services to register
themselves and to discover other services via a DNS or HTTP interface.
External services such as SaaS providers can be registered as well.
- Health Checking - Health Checking enables Consul to quickly alert
operators about any issues in a cluster. The integration with service
discovery prevents routing traffic to unhealthy hosts and enables
service level circuit breakers.
- Key/Value Storage - A flexible key/value store enables storing
dynamic configuration, feature flagging, coordination, leader
election and more. The simple HTTP API makes it easy to use anywhere.
- Multi-Datacenter - Consul is built to be datacenter aware,
and can support any number of regions without complex configuration.
- Service Segmentation - Consul Connect enables secure service-to-service
communication with automatic TLS encryption and identity-based authorization.
Consul runs on Linux, Mac OS X, FreeBSD, Solaris, and Windows.
A commercial version called Consul Enterprise is also available.
%prep
#setup -q
%build
rm -rf $RPM_BUILD_DIR/%{name}-%{version}
install -d $RPM_BUILD_DIR/%{name}-%{version}
GOPATH=$RPM_BUILD_DIR/%{name}-%{version} go get -tags "v%{version}" %{getsource}
upx $RPM_BUILD_DIR/%{name}-%{version}/bin/%{name}
%install
install -d %{buildroot}%{_bindir}
install -d %{buildroot}%{_docdir}/%{name}
install -Dm0755 $RPM_BUILD_DIR/%{name}-%{version}/bin/%{name} %{buildroot}%{_bindir}
pushd $RPM_BUILD_DIR/%{name}-%{version}/src/%{getsource}
install -Dm0644 README.md LICENSE INTERNALS.md CHANGELOG.md %{buildroot}%{_docdir}/%{name}
popd
%files
%{_bindir}/%{name}
%{_docdir}/%{name}