This repository has been archived by the owner on Dec 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathploop-flexvol.spec
74 lines (58 loc) · 2.04 KB
/
ploop-flexvol.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
%global with_devel 0
%global with_bundled 0
%global with_debug 0
%global with_check 0
%global with_unit_test 0
%if 0%{?with_debug}
%global _dwz_low_mem_die_limit 0
%else
%global debug_package %{nil}
%endif
%global provider github
%global provider_tld com
%global project jaxxstorm
%global repo ploop-flexvol
%global bin ploop
# https://github.com/kolyshkin/docker-volume-ploop
%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo}
%global import_path %{provider_prefix}
%global commit 57b2f919e620fb62b9c7e49121f023141d38ffba
%global shortcommit %(c=%{commit}; echo ${c:0:7})
Name: %{repo}
Version: 0.1
Release: 1
Summary: Ploop Flexvolume Plugin for Kubernetes
License: MIT
URL: https://%{provider_prefix}
Source: %{name}-%{version}.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 %{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}
BuildRequires: ploop-devel
BuildRequires: git
%description
%{summary}
%prep
%setup -q -n %{name}-%{version}
%build
ls -alh
mkdir -p %{buildroot}/usr/libexec/kubernetes/kubelet-plugins/volume/exec/%{project}~%{bin}
mkdir -p src/github.com/jaxxstorm
ln -s ../../../ src/github.com/jaxxstorm/ploop-flexvol
export GOPATH=$(pwd):%{gopath}
cd src/github.com/jaxxstorm/ploop-flexvol
go build -o %{bin} main.go
%install
mkdir -p %{buildroot}/usr/libexec/kubernetes/kubelet-plugins/volume/exec/%{project}~%{bin}
%{__install} -m0755 ploop %{buildroot}/usr/libexec/kubernetes/kubelet-plugins/volume/exec/%{project}~%{bin}/%{bin}
%files
%defattr(-,root,root,755)
/usr/libexec/kubernetes/kubelet-plugins/volume/exec/%{project}~%{bin}/%{bin}
%clean
%post
#define license tag if not already defined
%{!?_licensedir:%global license %doc}
%changelog
* Thu Feb 09 2017 Unknown name 0.1-1
- new package built with tito