Skip to content

Instantly share code, notes, and snippets.

@masudak
Created December 18, 2014 01:52
Show Gist options
  • Save masudak/1f53968cfcf7b43dda19 to your computer and use it in GitHub Desktop.
Save masudak/1f53968cfcf7b43dda19 to your computer and use it in GitHub Desktop.
%define name go
%define goroot /usr/local/%{name}
%define version 1.4
%define release 1
#%define debug_package %{nil}
Name: %{name}
Version: %{version}
Release: %{release}
Summary: %{name} %{version}
License: None
URL: http://golang.org/
Source0: go1.4.src.tar.gz
BuildRoot: %{_tmppath}/%{name}-root
Requires(install): /bin/cp
%description
Go is an open source programming environment that makes
it easy to build simple, reliable, and efficient software.
%prep
%setup -c -q
%build
cd go/src
./all.bash
%install
rm -rf %{buildroot}
# installコマンドでは再帰的なコピーができないので、まとめてコピーしています
#%{__mkdir_p} %{buildroot}%{goroot}
#%{__cp} -raf go/* %{buildroot}%{goroot}
%{__install} -m 755 -d %{buildroot}%{goroot}/bin
%{__install} -m 755 go/bin/{go,gofmt} %{buildroot}%{goroot}/bin
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%{goroot}
%{goroot}/bin/*
%changelog
* Thu Dec 18 2014 Kenichi Masuda <masuda_kenichi@cyberagent.co.jp>
- 1.4.1 release
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment