# The libraries and binaries produced by this compiler are not compatible # with coreutils strip (yet). %global debug_package %{nil} %global __spec_install_post /usr/lib/rpm/check-rpaths /usr/lib/rpm/check-buildroot \ /usr/lib/rpm/redhat/brp-compress Name: go Version: 20110120 Release: 1%{?dist} Summary: The Go programming language Group: Development/Languages License: BSD URL: http://golang.org/ # Presently available using # hg clone -r release.2011-01-20 https://go.googlecode.com/hg go # cd go # hg archive ../go-20110120.tar.gz Source0: %{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: ed BuildRequires: bison ExclusiveArch: %ix86 x86_64 %description The Go programming language is an open source project to make programmers more productive. Go is expressive, concise, clean, and efficient. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel type system enables flexible and modular program construction. Go compiles quickly to machine code yet has the convenience of garbage collection and the power of run-time reflection. It's a fast, statically typed, compiled language that feels like a dynamically typed, interpreted language. %package vim Summary: go syntax files for vim Group: Applications/Editors Requires: vim-common Requires: %{name} = %{version}-%{release} %description vim Go syntax for vim. %package emacs Summary: go syntax files for emacs Group: Applications/Editors Requires: emacs-common Requires: %{name} = %{version}-%{release} %description emacs Go syntax for emacs. %prep %setup -q cat << EOF > README.Fedora Everything should work as normal. Please, visit http://golang.org/ in order to learn more about this language. Feel free to report bugs to me: renich@woralelandia.com EOF %build GOROOT=%{_builddir}/%{name}-%{version} GOROOT_FINAL=%{_libdir}/go/ GOBIN=$GOROOT/bin HOST_EXTRA_LDFLAGS="-Wl -z noexecstack --build-id" cd src && ./make.bash %install install -d -m 755 %{buildroot}%{_bindir} install -d -m 755 %{buildroot}%{_libdir}/go/ install -p -m 755 bin/* %{buildroot}%{_bindir} cp -pR pkg/ %{buildroot}%{_libdir}/go/ install -D -m 644 misc/bash/go %{buildroot}/%{_sysconfdir}/bash_completion.d/go install -D -m 644 misc/emacs/go-mode-load.el %{buildroot}/%{_datadir}/emacs/site-lisp/go-mode-load.el install -D -m 644 misc/emacs/go-mode.el %{buildroot}/%{_datadir}/emacs/site-lisp/go-mode.el install -D -m 644 misc/vim/syntax/go.vim %{buildroot}/%{_datadir}/vim/vimfiles/syntax/go.vim install -D -m 644 misc/vim/ftdetect/gofiletype.vim %{buildroot}/%{_datadir}/vim/vimfiles/ftdetect/gofiletype.vim %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %{_bindir}/* %{_libdir}/go/ %{_sysconfdir}/bash_completion.d/go %doc AUTHORS CONTRIBUTORS LICENSE README doc/* README.Fedora %files vim %defattr(-,root,root,-) %{_datadir}/vim/vimfiles/syntax/go.vim %{_datadir}/vim/vimfiles/ftdetect/gofiletype.vim %files emacs %defattr(-,root,root,-) %{_datadir}/emacs/site-lisp/go-mode-load.el %{_datadir}/emacs/site-lisp/go-mode.el %changelog * Tue Jan 25 2011 Renich Bon Ciric - 20110120-1 - Initial build - Took stuff from petullo and meyer spec files