|
|
|
@ -24,7 +24,7 @@
|
|
|
|
|
# package version |
|
|
|
|
%define V_consul_opkg 1.1.0 |
|
|
|
|
%define V_consul_base 1.1.0 |
|
|
|
|
%define V_consul_snap 20180529 |
|
|
|
|
%define V_consul_snap 20180531 |
|
|
|
|
|
|
|
|
|
# package information |
|
|
|
|
Name: consul |
|
|
|
@ -37,7 +37,7 @@ Class: EVAL
|
|
|
|
|
Group: Networking |
|
|
|
|
License: MPL |
|
|
|
|
Version: %{V_consul_opkg}.%{V_consul_snap} |
|
|
|
|
Release: 20180529 |
|
|
|
|
Release: 20180531 |
|
|
|
|
|
|
|
|
|
# list of sources |
|
|
|
|
Source0: http://download.openpkg.org/components/versioned/consul/consul-%{V_consul_snap}.tar.xz |
|
|
|
@ -96,6 +96,7 @@ PreReq: OpenPKG, openpkg >= 20160101
|
|
|
|
|
# create directory hierarchy |
|
|
|
|
%{l_shtool} mkdir -f -p -m 755 \ |
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/sbin \ |
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/libexec/consul \ |
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \ |
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/etc/consul \ |
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/var/consul/log \ |
|
|
|
@ -109,8 +110,10 @@ PreReq: OpenPKG, openpkg >= 20160101
|
|
|
|
|
|
|
|
|
|
# install configuration files |
|
|
|
|
key=`src/github.com/hashicorp/consul/bin/consul keygen` |
|
|
|
|
token=`uuid -v4` |
|
|
|
|
%{l_shtool} install -c -m 644 %{l_value -s -a} \ |
|
|
|
|
-e "s;@key@;$key;g" \ |
|
|
|
|
-e "s;@token@;$token;g" \ |
|
|
|
|
%{SOURCE consul.hcl} \ |
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/etc/consul/ |
|
|
|
|
|
|
|
|
@ -120,7 +123,7 @@ PreReq: OpenPKG, openpkg >= 20160101
|
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/sbin/ |
|
|
|
|
%{l_shtool} install -c -m 755 %{l_value -s -a} \ |
|
|
|
|
%{SOURCE consul-openpkg-service.sh} \ |
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/sbin/ |
|
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/libexec/consul/ |
|
|
|
|
|
|
|
|
|
# install run-command script |
|
|
|
|
%{l_shtool} install -c -m 755 %{l_value -s -a} \ |
|
|
|
|