commit
8856b2e166
|
@ -0,0 +1,13 @@
|
||||||
|
Index: go/src/pkg/os/os_test.go
|
||||||
|
===================================================================
|
||||||
|
--- go.orig/src/pkg/os/os_test.go
|
||||||
|
+++ go/src/pkg/os/os_test.go
|
||||||
|
@@ -842,7 +842,7 @@ func run(t *testing.T, cmd []string) str
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
- p, err := StartProcess("/bin/hostname", []string{"hostname"}, &ProcAttr{Files: []*File{nil, w, Stderr}})
|
||||||
|
+ p, err := StartProcess("/usr/bin/hostname", []string{"hostname"}, &ProcAttr{Files: []*File{nil, w, Stderr}})
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
144
golang.spec
144
golang.spec
|
@ -23,64 +23,87 @@
|
||||||
%global __spec_install_post /usr/lib/rpm/check-rpaths /usr/lib/rpm/check-buildroot \
|
%global __spec_install_post /usr/lib/rpm/check-rpaths /usr/lib/rpm/check-buildroot \
|
||||||
/usr/lib/rpm/brp-compress
|
/usr/lib/rpm/brp-compress
|
||||||
|
|
||||||
Name: golang
|
Name: golang
|
||||||
Version: 1.1.2
|
Version: 1.1.2
|
||||||
Release: 4%{?dist}
|
Release: 7%{?dist}
|
||||||
Summary: The Go Programming Language
|
Summary: The Go Programming Language
|
||||||
|
|
||||||
License: BSD
|
License: BSD
|
||||||
URL: http://golang.org/
|
URL: http://golang.org/
|
||||||
Source0: https://go.googlecode.com/files/go%{version}.src.tar.gz
|
Source0: https://go.googlecode.com/files/go%{version}.src.tar.gz
|
||||||
|
|
||||||
BuildRequires: /bin/hostname
|
# this command moved places
|
||||||
BuildRequires: emacs
|
%if 0%{?fedora} >= 21
|
||||||
|
BuildRequires: /usr/bin/hostname
|
||||||
|
Patch1: golang-f21-hostname.patch
|
||||||
|
%else
|
||||||
|
BuildRequires: /bin/hostname
|
||||||
|
%endif
|
||||||
|
|
||||||
|
BuildRequires: emacs
|
||||||
|
# xemacs on fedora only
|
||||||
|
%if 0%{?fedora} >= 0
|
||||||
|
BuildRequires: xemacs xemacs-packages-extra
|
||||||
|
%endif
|
||||||
|
|
||||||
# We strip the meta dependency, but go does require glibc.
|
# We strip the meta dependency, but go does require glibc.
|
||||||
# This is an odd issue, still looking for a better fix.
|
# This is an odd issue, still looking for a better fix.
|
||||||
Requires: glibc
|
Requires: glibc
|
||||||
|
|
||||||
Patch0: golang-1.1-verbose-build.patch
|
# `go doc ...` calls out to godoc in $PATH
|
||||||
|
# while godoc is in go1.1, it is moved to go.tools in go1.2
|
||||||
|
Requires: /usr/bin/godoc
|
||||||
|
|
||||||
Patch10: golang-1.1.2-long-links.patch
|
Patch0: golang-1.1-verbose-build.patch
|
||||||
Patch11: golang-1.1.2-ustar-split.patch
|
|
||||||
|
|
||||||
# Having godoc and the documentation separate was broken
|
Patch10: golang-1.1.2-long-links.patch
|
||||||
Obsoletes: %{name}-godoc < 1.1-4
|
Patch11: golang-1.1.2-ustar-split.patch
|
||||||
Obsoletes: %{name}-docs < 1.1-4
|
|
||||||
|
# Having documentation separate was broken
|
||||||
|
Obsoletes: %{name}-docs < 1.1-4
|
||||||
|
|
||||||
# RPM can't handle symlink -> dir with subpackages, so merge back
|
# RPM can't handle symlink -> dir with subpackages, so merge back
|
||||||
Obsoletes: %{name}-data < 1.1.1-4
|
Obsoletes: %{name}-data < 1.1.1-4
|
||||||
|
|
||||||
ExclusiveArch: %{ix86} x86_64 %{arm}
|
ExclusiveArch: %{ix86} x86_64 %{arm}
|
||||||
|
|
||||||
Source100: golang-gdbinit
|
Source100: golang-gdbinit
|
||||||
Source101: golang-prelink.conf
|
Source101: golang-prelink.conf
|
||||||
|
|
||||||
%description
|
%description
|
||||||
%{summary}.
|
%{summary}.
|
||||||
|
|
||||||
|
|
||||||
|
%package godoc
|
||||||
|
Summary: The Go Programming Language documentation tool
|
||||||
|
%description godoc
|
||||||
|
%{summary}.
|
||||||
|
|
||||||
# Restore this package if RPM gets fixed (bug #975909)
|
# Restore this package if RPM gets fixed (bug #975909)
|
||||||
#%package data
|
#%package data
|
||||||
#Summary: Required architecture-independent files for Go
|
#Summary: Required architecture-independent files for Go
|
||||||
#Requires: %{name} = %{version}-%{release}
|
#Requires: %{name} = %{version}-%{release}
|
||||||
#BuildArch: noarch
|
#BuildArch: noarch
|
||||||
#Obsoletes: %{name}-docs < 1.1-4
|
#Obsoletes: %{name}-docs < 1.1-4
|
||||||
#
|
#
|
||||||
#%description data
|
#%description data
|
||||||
#%{summary}.
|
#%{summary}.
|
||||||
|
|
||||||
|
|
||||||
%package vim
|
%package vim
|
||||||
Summary: Vim plugins for Go
|
Summary: Vim plugins for Go
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
# xemacs on fedora only
|
||||||
|
%if 0%{?fedora} >= 0
|
||||||
|
Requires: vim-filesystem
|
||||||
|
%endif
|
||||||
|
|
||||||
%description vim
|
%description vim
|
||||||
%{summary}.
|
%{summary}.
|
||||||
|
|
||||||
|
|
||||||
%package -n emacs-%{name}
|
%package -n emacs-%{name}
|
||||||
Summary: Emacs add-on package for Go
|
Summary: Emacs add-on package for Go
|
||||||
Requires: emacs(bin) >= %{_emacs_version}
|
Requires: emacs(bin) >= %{_emacs_version}
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
|
@ -88,6 +111,19 @@ BuildArch: noarch
|
||||||
%{summary}.
|
%{summary}.
|
||||||
|
|
||||||
|
|
||||||
|
# xemacs on fedora only
|
||||||
|
%if 0%{?fedora} >= 0
|
||||||
|
%package -n xemacs-%{name}
|
||||||
|
Summary: XEmacs add-on package for Go
|
||||||
|
Requires: xemacs(bin) >= %{_xemacs_version}
|
||||||
|
Requires: xemacs-packages-extra
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description -n xemacs-%{name}
|
||||||
|
%{summary}.
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
# Workaround old RPM bug of symlink-replaced-with-dir failure
|
# Workaround old RPM bug of symlink-replaced-with-dir failure
|
||||||
%pretrans -p <lua>
|
%pretrans -p <lua>
|
||||||
for _,d in pairs({"api", "doc", "include", "lib", "src"}) do
|
for _,d in pairs({"api", "doc", "include", "lib", "src"}) do
|
||||||
|
@ -105,13 +141,16 @@ end
|
||||||
# increase verbosity of build
|
# increase verbosity of build
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
|
|
||||||
|
%if 0%{?fedora} >= 21
|
||||||
|
%patch1 -p1
|
||||||
|
%endif
|
||||||
|
|
||||||
# Fix BZ#1010271
|
# Fix BZ#1010271
|
||||||
%patch10 -p1
|
%patch10 -p1
|
||||||
%patch11 -p1
|
%patch11 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# create a gcc wrapper to allow us to build with our own flags
|
# create a gcc wrapper to allow us to build with our own flags
|
||||||
|
|
||||||
mkdir zz
|
mkdir zz
|
||||||
cd zz
|
cd zz
|
||||||
echo -e "#!/bin/sh\n/usr/bin/gcc $RPM_OPT_FLAGS $RPM_LD_FLAGS \"\$@\"" > mygcc
|
echo -e "#!/bin/sh\n/usr/bin/gcc $RPM_OPT_FLAGS $RPM_LD_FLAGS \"\$@\"" > mygcc
|
||||||
|
@ -142,9 +181,15 @@ cd ..
|
||||||
# compile for emacs
|
# compile for emacs
|
||||||
cd misc
|
cd misc
|
||||||
mv emacs/go-mode-load.el emacs/%{name}-init.el
|
mv emacs/go-mode-load.el emacs/%{name}-init.el
|
||||||
|
# xemacs on fedora only
|
||||||
|
%if 0%{?fedora} >= 0
|
||||||
|
cp -av emacs xemacs
|
||||||
|
%{_xemacs_bytecompile} xemacs/go-mode.el
|
||||||
|
%endif
|
||||||
%{_emacs_bytecompile} emacs/go-mode.el
|
%{_emacs_bytecompile} emacs/go-mode.el
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
export GOROOT=$(pwd -P)
|
export GOROOT=$(pwd -P)
|
||||||
export PATH="$PATH":"$GOROOT"/bin
|
export PATH="$PATH":"$GOROOT"/bin
|
||||||
|
@ -152,6 +197,7 @@ cd src
|
||||||
./run.bash --no-rebuild
|
./run.bash --no-rebuild
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
|
@ -170,10 +216,10 @@ rm -rfv $RPM_BUILD_ROOT%{_libdir}/%{name}/lib/time
|
||||||
# remove the doc Makefile
|
# remove the doc Makefile
|
||||||
rm -rfv $RPM_BUILD_ROOT%{_libdir}/%{name}/doc/Makefile
|
rm -rfv $RPM_BUILD_ROOT%{_libdir}/%{name}/doc/Makefile
|
||||||
|
|
||||||
# add symlinks for binaries
|
# put binaries to bindir
|
||||||
pushd $RPM_BUILD_ROOT%{_bindir}
|
pushd $RPM_BUILD_ROOT%{_bindir}
|
||||||
for z in $RPM_BUILD_ROOT%{_libdir}/%{name}/bin/*
|
for z in $RPM_BUILD_ROOT%{_libdir}/%{name}/bin/*
|
||||||
do ln -s %{_libdir}/%{name}/bin/$(basename $z)
|
do mv $RPM_BUILD_ROOT%{_libdir}/%{name}/bin/$(basename $z) .
|
||||||
done
|
done
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
@ -190,6 +236,15 @@ mkdir -p $RPM_BUILD_ROOT%{_emacs_sitestartdir}
|
||||||
cp -av misc/emacs/go-mode.* $RPM_BUILD_ROOT%{_emacs_sitelispdir}/%{name}
|
cp -av misc/emacs/go-mode.* $RPM_BUILD_ROOT%{_emacs_sitelispdir}/%{name}
|
||||||
cp -av misc/emacs/%{name}-init.el $RPM_BUILD_ROOT%{_emacs_sitestartdir}
|
cp -av misc/emacs/%{name}-init.el $RPM_BUILD_ROOT%{_emacs_sitestartdir}
|
||||||
|
|
||||||
|
# xemacs on fedora only
|
||||||
|
%if 0%{?fedora} >= 0
|
||||||
|
# misc/xemacs
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_xemacs_sitelispdir}/%{name}
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_xemacs_sitestartdir}
|
||||||
|
cp -av misc/xemacs/go-mode.* $RPM_BUILD_ROOT%{_xemacs_sitelispdir}/%{name}
|
||||||
|
cp -av misc/xemacs/%{name}-init.el $RPM_BUILD_ROOT%{_xemacs_sitestartdir}
|
||||||
|
%endif
|
||||||
|
|
||||||
# misc/vim
|
# misc/vim
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_datadir}/vim/vimfiles
|
mkdir -p $RPM_BUILD_ROOT%{_datadir}/vim/vimfiles
|
||||||
cp -av misc/vim/* $RPM_BUILD_ROOT%{_datadir}/vim/vimfiles
|
cp -av misc/vim/* $RPM_BUILD_ROOT%{_datadir}/vim/vimfiles
|
||||||
|
@ -208,15 +263,17 @@ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/prelink.conf.d
|
||||||
cp -av %{SOURCE101} $RPM_BUILD_ROOT%{_sysconfdir}/prelink.conf.d/golang.conf
|
cp -av %{SOURCE101} $RPM_BUILD_ROOT%{_sysconfdir}/prelink.conf.d/golang.conf
|
||||||
|
|
||||||
|
|
||||||
|
%files godoc
|
||||||
|
%{_bindir}/godoc
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%doc AUTHORS CONTRIBUTORS LICENSE PATENTS VERSION
|
%doc AUTHORS CONTRIBUTORS LICENSE PATENTS VERSION
|
||||||
|
|
||||||
# go files
|
# go files
|
||||||
%{_libdir}/%{name}
|
%{_libdir}/%{name}
|
||||||
|
|
||||||
# bin symlinks
|
# binary executables
|
||||||
%{_bindir}/go
|
%{_bindir}/go
|
||||||
%{_bindir}/godoc
|
|
||||||
%{_bindir}/gofmt
|
%{_bindir}/gofmt
|
||||||
|
|
||||||
# autocomplete
|
# autocomplete
|
||||||
|
@ -241,8 +298,25 @@ cp -av %{SOURCE101} $RPM_BUILD_ROOT%{_sysconfdir}/prelink.conf.d/golang.conf
|
||||||
%{_emacs_sitestartdir}/*.el
|
%{_emacs_sitestartdir}/*.el
|
||||||
|
|
||||||
|
|
||||||
|
# xemacs on fedora only
|
||||||
|
%if 0%{?fedora} >= 0
|
||||||
|
%files -n xemacs-%{name}
|
||||||
|
%doc AUTHORS CONTRIBUTORS LICENSE PATENTS
|
||||||
|
%{_xemacs_sitelispdir}/%{name}
|
||||||
|
%{_xemacs_sitestartdir}/*.el
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Fri Sep 20 2013 Adam Miller <maxamillion@fedoraproject.org> - 1.1.2-4
|
* Thu Nov 21 2013 Vincent Batts <vbatts@redhat.com> - 1.1.2-7
|
||||||
|
- patch tests for testing on rawhide
|
||||||
|
- let the same spec work for rhel and fedora
|
||||||
|
|
||||||
|
* Wed Nov 20 2013 Vincent Batts <vbatts@redhat.com> - 1.1.2-6
|
||||||
|
- don't symlink /usr/bin out to ../lib..., move the file
|
||||||
|
- seperate out godoc, to accomodate the go.tools godoc
|
||||||
|
|
||||||
|
* Fri Sep 20 2013 Adam Miller <maxamillion@fedoraproject.org> - 1.1.2-5
|
||||||
- Pull upstream patches for BZ#1010271
|
- Pull upstream patches for BZ#1010271
|
||||||
- Add glibc requirement that got dropped because of meta dep fix
|
- Add glibc requirement that got dropped because of meta dep fix
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue