%define getsource github.com/hashicorp/%{name} %define debug %nil %define debug_package %nil Name: consul Version: 1.9.2 Release: 1 Summary: Service discovery tool URL: https://www.consul.io Source0: https://github.com/hashicorp/consul/archive/v%{version}/%{name}-%{version}.tar.gz License: MPLv2.0 Group: System/Cluster Source1000: %{name}.rpmlintrc BuildRequires: go >=1.10 BuildRequires: git-core BuildRequires: upx BuildRequires: ncurses %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} %make %install #install -d %{buildroot}%{_bindir} #install -d %{buildroot}%{_docdir}/%{name} #install -Dm0755 $RPM_BUILD_DIR/%{name}-%{version}/bin/%{name} %{buildroot}%{_bindir} install -Dm0755 bin/%{name} %{buildroot}%{_bindir}/%{name} #pushd $RPM_BUILD_DIR/%{name}-%{version}/src/%{getsource} #install -Dm0644 README.md LICENSE INTERNALS.md CHANGELOG.md %{buildroot}%{_docdir}/%{name} #popd %files %doc README.md LICENSE %{_bindir}/%{name}