Merged by openshift-bot
OpenShift Bot authored on 2015/11/26 02:28:43... | ... |
@@ -24,6 +24,12 @@ |
24 | 24 |
%global ldflags -X github.com/openshift/origin/pkg/version.majorFromGit 0 -X github.com/openshift/origin/pkg/version.minorFromGit 0+ -X github.com/openshift/origin/pkg/version.versionFromGit v0.0.1 -X github.com/openshift/origin/pkg/version.commitFromGit 86b5e46 -X k8s.io/kubernetes/pkg/version.gitCommit 6241a21 -X k8s.io/kubernetes/pkg/version.gitVersion v0.11.0-330-g6241a21 |
25 | 25 |
} |
26 | 26 |
|
27 |
+ %if 0%{?fedora} || 0%{?epel} |
|
28 |
+%global make_redistributable 0 |
|
29 |
+%else |
|
30 |
+%global make_redistributable 1 |
|
31 |
+%endif |
|
32 |
+ |
|
27 | 33 |
%if "%{dist}" == ".el7aos" |
28 | 34 |
%global package_name atomic-openshift |
29 | 35 |
%global product_name Atomic OpenShift |
... | ... |
@@ -94,6 +100,7 @@ Obsoletes: openshift-clients < %{package_refector_version} |
94 | 94 |
%description clients |
95 | 95 |
%{summary} |
96 | 96 |
|
97 |
+%if 0%{?make_redistributable} |
|
97 | 98 |
%package clients-redistributable |
98 | 99 |
Summary: %{product_name} Client binaries for Linux, Mac OSX, and Windows |
99 | 100 |
BuildRequires: golang-pkg-darwin-amd64 |
... | ... |
@@ -102,6 +109,7 @@ Obsoletes: openshift-clients-redistributable < %{package_refector_version} |
102 | 102 |
|
103 | 103 |
%description clients-redistributable |
104 | 104 |
%{summary} |
105 |
+%endif |
|
105 | 106 |
|
106 | 107 |
%package dockerregistry |
107 | 108 |
Summary: Docker Registry v2 for %{product_name} |
... | ... |
@@ -165,9 +173,11 @@ do |
165 | 165 |
go install -ldflags "%{ldflags}" %{import_path}/cmd/${cmd} |
166 | 166 |
done |
167 | 167 |
|
168 |
+%if 0%{?make_redistributable} |
|
168 | 169 |
# Build clients for other platforms |
169 | 170 |
GOOS=windows GOARCH=386 go install -ldflags "%{ldflags}" %{import_path}/cmd/oc |
170 | 171 |
GOOS=darwin GOARCH=amd64 go install -ldflags "%{ldflags}" %{import_path}/cmd/oc |
172 |
+%endif |
|
171 | 173 |
|
172 | 174 |
#Build our pod |
173 | 175 |
pushd images/pod/ |
... | ... |
@@ -185,11 +195,13 @@ do |
185 | 185 |
install -p -m 755 _build/bin/${bin} %{buildroot}%{_bindir}/${bin} |
186 | 186 |
done |
187 | 187 |
|
188 |
+%if 0%{?make_redistributable} |
|
188 | 189 |
# Install client executable for windows and mac |
189 | 190 |
install -d %{buildroot}%{_datadir}/%{name}/{linux,macosx,windows} |
190 | 191 |
install -p -m 755 _build/bin/oc %{buildroot}%{_datadir}/%{name}/linux/oc |
191 | 192 |
install -p -m 755 _build/bin/darwin_amd64/oc %{buildroot}/%{_datadir}/%{name}/macosx/oc |
192 | 193 |
install -p -m 755 _build/bin/windows_386/oc.exe %{buildroot}/%{_datadir}/%{name}/windows/oc.exe |
194 |
+%endif |
|
193 | 195 |
|
194 | 196 |
#Install pod |
195 | 197 |
install -p -m 755 images/pod/pod %{buildroot}%{_bindir}/ |
... | ... |
@@ -384,10 +396,12 @@ fi |
384 | 384 |
%{_bindir}/kubectl |
385 | 385 |
%{_sysconfdir}/bash_completion.d/oc |
386 | 386 |
|
387 |
+%if 0%{?make_redistributable} |
|
387 | 388 |
%files clients-redistributable |
388 | 389 |
%{_datadir}/%{name}/linux/oc |
389 | 390 |
%{_datadir}/%{name}/macosx/oc |
390 | 391 |
%{_datadir}/%{name}/windows/oc.exe |
392 |
+%endif |
|
391 | 393 |
|
392 | 394 |
%files dockerregistry |
393 | 395 |
%defattr(-,root,root,-) |