Accepting request 131022 from home:andtecheu

BNC#776058

OBS-URL: https://build.opensuse.org/request/show/131022
OBS-URL: https://build.opensuse.org/package/show/devel:languages:go/go?expand=0&rev=147
This commit is contained in:
Graham Anderson 2012-08-16 11:34:24 +00:00 committed by Git OBS Bridge
parent 494a9d55d9
commit cc00205605
3 changed files with 21 additions and 9 deletions

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Thu Aug 16 11:15:13 UTC 2012 - graham@andtech.eu
- BNC#776058
- spec changes, reverse positions of compiled items and package
source in the %install section. touch compiled package archives
after source is installed for go-doc, this prevents the go tool
trying to re-compile/install std libraries.
-------------------------------------------------------------------
Tue Aug 14 22:31:47 UTC 2012 - graham@andtech.eu

19
go.spec
View File

@ -159,14 +159,6 @@ ln -s %{_libdir}/go/contrib/README-openSUSE %{buildroot}%{_datadir}/go/contrib/R
mkdir -p %{buildroot}%{_unitdir}
install -Dm644 godoc.service %{buildroot}%{_unitdir}/godoc.service
# copy document templates, packages, obj libs and command utilities
mkdir -p %{buildroot}%{_bindir}
mkdir -p $GOROOT/lib
cp -ar lib/godoc $GOROOT/lib
mv pkg $GOROOT
mv bin/* %{buildroot}%{_bindir}
rm -f %{buildroot}%{_bindir}/{hgpatch,quietgcc}
# source files for go install, godoc, etc
install -d %{buildroot}%{_datadir}/go
for ext in *.{go,c,h,s,S,py}; do
@ -176,6 +168,14 @@ mkdir -p $GOROOT/src
ln -s /usr/share/go/src/pkg $GOROOT/src/pkg
ln -s /usr/share/go/src/cmd $GOROOT/src/cmd
# copy document templates, packages, obj libs and command utilities
mkdir -p %{buildroot}%{_bindir}
mkdir -p $GOROOT/lib
cp -ar lib/godoc $GOROOT/lib
mv pkg $GOROOT
mv bin/* %{buildroot}%{_bindir}
rm -f %{buildroot}%{_bindir}/{hgpatch,quietgcc}
# documentation and examples
# fix documetation permissions (rpmlint warning)
find doc/ misc/ -type f -exec chmod 0644 '{}' \;
@ -212,6 +212,9 @@ ln -s %{_datadir}/go/src/pkg/runtime/{cgocall,runtime}.h %{buildroot}%{_libdir}/
%service_add_post godoc.service
%endif
%post -n go-doc
find %{_libdir}/go/pkg -type f -exec touch {} +
%preun
%if 0%{?suse_version} >= 1210
%service_del_preun godoc.service

View File

@ -94,7 +94,7 @@ install -d %{buildroot}%{_bindir} \
#
# See: go help install, go help packages
%gobuild() \
export BUILDFLAGS="-s -v -p 4 -x" \
export BUILDFLAGS="-v -p 4 -x" \
export GOPATH=%{_builddir}/go:%{_libdir}/go/contrib \
export GOBIN=%{_builddir}/go/bin \
MOD="" \