LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File go-gorun.spec of Package go-gorun (Project devel:languages:go)

# Copyright (c), 2011, Sascha Peilicke <saschpe@gmx.de>
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

Name:           go-gorun
Version:        0.0.0+bzr20120304
Release:        0
Summary:        Enables Go source files to be used as scripts
Group:          Development/Languages/Other
License:        GPLv3
URL:            https://launchpad.net/gorun
Source0:        gorun-%{version}.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  go-devel
%if 0%{?suse_version} >= 1100
Recommends:     go-gorun-doc

gorun is a tool enabling one to put a "bang line" in the source code of a Go
program to run it, or to run such a source code file explicitly. It was created
in an attempt to make experimenting with Go more appealing to people used to
Python and similar languages which operate most visibly with source code.

As an example, copy the following content to a file named "hello.go" (or
"hello", if you prefer):


    package main

    func main() {
        println("Hello world!")

Then, simply run it:

    $ chmod +x hello.go
    $ ./hello.go
    Hello world!

%setup -q -n gorun

%goprep launchpad.net/gorun



rm -rf %{buildroot}