]> git.pld-linux.org Git - packages/vault-ssh-helper.git/blob - vault-ssh-helper.spec
new, version 0.1.2
[packages/vault-ssh-helper.git] / vault-ssh-helper.spec
1 #
2 # Conditional build:
3 %bcond_with     tests           # build with tests
4 %bcond_without  tests           # build without tests
5
6 Summary:        Vault SSH Agent is used to enable one time keys and passwords
7 Name:           vault-ssh-helper
8 Version:        0.1.2
9 Release:        0.1
10 License:        MPL v2.0
11 Group:          Base
12 Source0:        https://github.com/hashicorp/vault-ssh-helper/archive/v%{version}/%{name}-%{version}.tar.gz
13 # Source0-md5:  d81009708ddf16d4aa9cd2e51f352ac8
14 URL:            https://github.com/hashicorp/vault-ssh-helper
15 Source1:        config.hcl
16 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17
18 %define         _enable_debug_packages 0
19 %define         gobuild(o:) go build -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n')" -a -v -x %{?**};
20 %define         gopath          %{_libdir}/golang
21 %define         import_path             github.com/hashicorp/vault-ssh-helper
22
23 %description
24 Vault SSH Agent is a counterpart to Vault's SSH backend. It enables
25 creation of One-Time-Passwords (OTP) by Vault servers. OTPs will be
26 used as client authentication credentials while establishing SSH
27 connections with remote hosts.
28
29 %prep
30 %setup -q
31
32 mkdir -p src/github.com/hashicorp
33 ln -s ../../../ src/github.com/hashicorp/vault-ssh-helper
34
35 %build
36 export GOPATH=$(pwd):%{gopath}
37 %gobuild -o bin/%{name} %{import_path}
38
39 %install
40 rm -rf $RPM_BUILD_ROOT
41 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name}.d,%{_bindir}}
42 install -p bin/%{name} $RPM_BUILD_ROOT%{_bindir}
43 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.d/config.hcl
44
45 %clean
46 rm -rf $RPM_BUILD_ROOT
47
48 %files
49 %defattr(644,root,root,755)
50 %doc README.md LICENSE
51 %attr(755,root,root) %{_bindir}/%{name}
52 %config(noreplace) %{_sysconfdir}/%{name}.d/config.hcl
This page took 0.134289 seconds and 3 git commands to generate.