Merged by openshift-bot
OpenShift Bot authored on 2015/04/15 04:12:08... | ... |
@@ -72,6 +72,17 @@ Requires: %{name} = %{version}-%{release} |
72 | 72 |
%description -n tuned-profiles-openshift-node |
73 | 73 |
%{summary} |
74 | 74 |
|
75 |
+%package -n osc-macosx-amd64 |
|
76 |
+Summary: Openshift Client Packages for Mac OSX |
|
77 |
+BuildRequires: golang-pkg-darwin-amd64 |
|
78 |
+%description -n osc-macosx-amd64 |
|
79 |
+%{summary} |
|
80 |
+ |
|
81 |
+%package -n osc-windows-386 |
|
82 |
+Summary: OpenShift Client Packages for Windows |
|
83 |
+BuildRequires: golang-pkg-windows-386 |
|
84 |
+%description -n osc-windows-386 |
|
85 |
+%{summary} |
|
75 | 86 |
|
76 | 87 |
%prep |
77 | 88 |
%setup -q |
... | ... |
@@ -97,12 +108,20 @@ pushd _thirdpartyhacks |
97 | 97 |
src |
98 | 98 |
popd |
99 | 99 |
export GOPATH=$(pwd)/_build:$(pwd)/_thirdpartyhacks:%{buildroot}%{gopath}:%{gopath} |
100 |
- |
|
101 | 100 |
# Default to building all of the components |
102 |
-for cmd in openshift |
|
101 |
+for OS in linux darwin windows |
|
103 | 102 |
do |
104 |
- #go build %{import_path}/cmd/${cmd} |
|
105 |
- go build -ldflags "%{ldflags}" %{import_path}/cmd/${cmd} |
|
103 |
+ export GOOS=${OS} |
|
104 |
+ for cmd in openshift |
|
105 |
+ do |
|
106 |
+ if [ $GOOS == 'windows' ] |
|
107 |
+ then |
|
108 |
+ export GOARCH='386' |
|
109 |
+ else |
|
110 |
+ export GOARCH='amd64' |
|
111 |
+ fi |
|
112 |
+ go install -ldflags "%{ldflags}" %{import_path}/cmd/${cmd} |
|
113 |
+ done |
|
106 | 114 |
done |
107 | 115 |
# set the IMAGES |
108 | 116 |
sed -i 's|IMAGES=.*|IMAGES=%{docker_images}|' rel-eng/openshift-{master,node}.sysconfig |
... | ... |
@@ -110,10 +129,15 @@ sed -i 's|IMAGES=.*|IMAGES=%{docker_images}|' rel-eng/openshift-{master,node}.sy |
110 | 110 |
%install |
111 | 111 |
|
112 | 112 |
install -d %{buildroot}%{_bindir} |
113 |
+install -d %{buildroot}%{_datadir}/%{name}/macosx |
|
114 |
+install -d %{buildroot}%{_datadir}/%{name}/windows |
|
115 |
+ |
|
113 | 116 |
for bin in openshift |
114 | 117 |
do |
115 | 118 |
echo "+++ INSTALLING ${bin}" |
116 |
- install -p -m 755 ${bin} %{buildroot}%{_bindir}/${bin} |
|
119 |
+ install -p -m 755 _build/bin/${bin} %{buildroot}%{_bindir}/${bin} |
|
120 |
+ install -p -m 755 _build/bin/darwin_amd64/${bin} %{buildroot}%{_datadir}/%{name}/macosx/osc |
|
121 |
+ install -p -m 755 _build/bin/windows_386/${bin}.exe %{buildroot}%{_datadir}/%{name}/windows/osc.exe |
|
117 | 122 |
done |
118 | 123 |
|
119 | 124 |
install -d -m 0755 %{buildroot}/etc/%{name} |
... | ... |
@@ -195,6 +219,12 @@ if [ "$1" = 0 ]; then |
195 | 195 |
/usr/sbin/tuned-adm profile $recommended > /dev/null 2>&1 |
196 | 196 |
fi |
197 | 197 |
|
198 |
+%files -n osc-macosx-amd64 |
|
199 |
+%{_datadir}/%{name}/macosx/osc |
|
200 |
+ |
|
201 |
+%files -n osc-windows-386 |
|
202 |
+%{_datadir}/%{name}/windows/osc.exe |
|
203 |
+ |
|
198 | 204 |
|
199 | 205 |
%changelog |
200 | 206 |
* Mon Jan 26 2015 Scott Dodson <sdodson@redhat.com> 0.2-3 |