Skip to content

Instantly share code, notes, and snippets.

@tkuchiki
Created October 6, 2015 13:03
Show Gist options
  • Save tkuchiki/1071e0088ecccd67b954 to your computer and use it in GitHub Desktop.
Save tkuchiki/1071e0088ecccd67b954 to your computer and use it in GitHub Desktop.
golang.spec
Name: golang
Version: 1.5.1
Release: 1%{?dist}
Summary: The Go Programming Language
License: BSD
URL: http://golang.org
Source0: https://storage.googleapis.com/golang/go%{version}.linux-amd64.tar.gz
AutoReqProv: no
%define __spec_install_post %{nil}
%description
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
%prep
%setup -q -n go
%install
%{__rm} -rf %{buildroot}
install -d %{buildroot}/usr/local/go
cp -a ./ %{buildroot}/usr/local/go
mkdir -p %{buildroot}%{_bindir}
ln -sf /usr/local/go/bin/go %{buildroot}%{_bindir}/go
ln -sf /usr/local/go/bin/gofmt %{buildroot}%{_bindir}/gofmt
ln -sf /usr/local/go/bin/godoc %{buildroot}%{_bindir}/godoc
%clean
%{__rm} -rf %{buildroot}
%{__rm} -rf %{_builddir}/go
%files
%defattr(-,root,root,-)
%{_bindir}/go
%{_bindir}/godoc
%{_bindir}/gofmt
/usr/local/go
%changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment