[packages/gox: 1/3] new, version 0.2.0

glen glen at pld-linux.org
Sun Aug 7 13:17:53 CEST 2016


commit 1f1e699d3b1a9183150cfb173f5b5f15b454db16
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sun Aug 7 14:08:24 2016 +0300

    new, version 0.2.0
    
    based on mageia .spec
    http://svnweb.mageia.org/packages/cauldron/gox/current/SPECS/gox.spec?revision=744617&view=co&pathrev=882223

 gox.spec | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 60 insertions(+)
---
diff --git a/gox.spec b/gox.spec
new file mode 100644
index 0000000..587d4f1
--- /dev/null
+++ b/gox.spec
@@ -0,0 +1,60 @@
+Summary:	Simple Go Cross Compilation
+Name:		gox
+Version:	0.2.0
+Release:	0.1
+License:	MPLv2.0
+Group:		Development
+Source0:	https://github.com/mitchellh/gox/archive/v%{version}/%{name}-%{version}.tar.gz
+# Source0-md5:	a34e1bdec4bce04afa9643a9dadac113
+URL:		https://github.com/mitchellh/gox
+BuildRequires:	golang >= 1.1
+#BuildRequires:	golang(github.com/mitchellh/iochan)
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Gox is a simple, no-frills tool for Go cross compilation that behaves
+a lot like standard go build. Gox will parallelize builds for multiple
+platforms. Gox will also build the cross-compilation toolchain for
+you.
+
+%prep
+# For building go binaries we must install the tarballed git repo into the
+# appropriate src directory
+mkdir -p src/github.com/mitchellh/
+cd src/github.com/mitchellh/
+tar xzf %{SOURCE0}
+cd -
+mv src/github.com/mitchellh/%{name}-%{version}\
+  src/github.com/mitchellh/%{name}
+
+# Symlink the go lib build dependencies to the build directory
+%define gopath %{_libdir}/golang
+%define buildgosrc src
+mkdir -p %{buildgosrc}/github.com/mitchellh
+ln -sv %{gopath}/src/github.com/mitchellh/* %{buildgosrc}/github.com/mitchellh/
+
+%build
+# set the GOPATH so that internal dependencies are automatically downloaded to
+# the correct location
+%define packer_gopath %{_builddir}/%{name}-%{version}
+export GOPATH=%{packer_gopath}
+
+# set the GOBIN so compiled files go into the builddir
+mkdir -p %{packer_gopath}/bin
+export GOBIN=%{packer_gopath}/bin
+
+# Checkout the specific tag in git for the version we are building
+cd %{packer_gopath}
+go get github.com/mitchellh/gox
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{_bindir}
+cp -p %{packer_gopath}/bin/gox $RPM_BUILD_ROOT%{_bindir}/gox
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/gox
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/gox.git/commitdiff/b82d942c6fbb1d31c67fe498b5a8f91dc588eb13



More information about the pld-cvs-commit mailing list