summaryrefslogtreecommitdiff
path: root/dev-go
diff options
context:
space:
mode:
authorJesus Rivero <neurogeek@gentoo.org>2012-10-25 17:21:47 -0400
committerJesus Rivero <neurogeek@gentoo.org>2012-10-25 17:21:47 -0400
commit0330c1d4e0b317964f32c425079ccecdacf2e6e0 (patch)
tree04031164249f2189b5b868a2371ef9fb60e0dc5a /dev-go
parentChanged repo_name (diff)
downloadneurogeek-0330c1d4e0b317964f32c425079ccecdacf2e6e0.tar.gz
neurogeek-0330c1d4e0b317964f32c425079ccecdacf2e6e0.tar.bz2
neurogeek-0330c1d4e0b317964f32c425079ccecdacf2e6e0.zip
Proof-of-Concept on packaging go packages
Diffstat (limited to 'dev-go')
-rw-r--r--dev-go/godis/Manifest2
-rw-r--r--dev-go/godis/godis-0.1.ebuild77
2 files changed, 79 insertions, 0 deletions
diff --git a/dev-go/godis/Manifest b/dev-go/godis/Manifest
new file mode 100644
index 0000000..a2ef793
--- /dev/null
+++ b/dev-go/godis/Manifest
@@ -0,0 +1,2 @@
+DIST godis-0.1.tar.gz 35778 SHA256 7eb2824b717fda590eb8cf90b87ff8b524b41ebe966a3b5144c302c2abc5ec97 SHA512 4c68902f7c92ff44116bf891cb1ab672b0290a62b4b9c9317c40da1582866999d5fb1918911baa70aa64b8f308dc9453845ff8d4daf2a2184cb9f8fdd583698f WHIRLPOOL b25715aa3730c277515877e4163c11a9dd3123df33e2ea35a501e336c546a4230810d092384b72fe991704ba8b184c75324d94e5536c511612fc474fed73f7e8
+EBUILD godis-0.1.ebuild 1236 SHA256 99d037a2f538edd0e34a5514eed9a25ee1d6cbdb4170f98fd21da05ec18b989c SHA512 86fc80a780dbd428b961fe27875e910a260a4bf33fd4610e2c803431f057281679b9ed0893998d55d77f9f28ce4aa0edea023807cb76476d04f92558dfe7bf6a WHIRLPOOL 6d8ee78ad7e893855f18669347d987e7b69235ff1b81170dd53e949f89e5501d45d46d86c630aa0c58518bc6e0517ac0e6940620a44a896b90c2d31179b273ed
diff --git a/dev-go/godis/godis-0.1.ebuild b/dev-go/godis/godis-0.1.ebuild
new file mode 100644
index 0000000..d26020f
--- /dev/null
+++ b/dev-go/godis/godis-0.1.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=4
+REV="109ffb8"
+
+inherit multilib
+
+DESCRIPTION="Redis client for Go."
+HOMEPAGE="https://github.com/simonz05/godis"
+SRC_URI="https://github.com/simonz05/godis/tarball/${REV} -> ${P}.tar.gz"
+
+LICENSE="as-is"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="examples"
+
+DEPEND=">=dev-lang/go-1.0.2"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/simonz05-${PN}-${REV}"
+
+src_prepare() {
+
+ if use examples; then
+ pushd "${S}/redis/examples" 2> /dev/null
+
+ for src in $(find . -name \*.go)
+ do
+ sed -r "s/github.com\/simonz05\///" -i ${src}
+ done
+
+ popd 2> /dev/null
+ fi
+}
+
+src_compile() {
+
+ if use examples; then
+
+ go_examples_compile() {
+
+ local build_dir gopath
+
+ build_dir="${D}/build"
+ gopath="${build_dir}/src/${PN}"
+
+ mkdir -p $gopath
+ ln -s ${S}/$1 $gopath
+
+ pushd $2 >/dev/null
+
+ GOPATH="${build_dir}:" emake
+
+ popd >/dev/null
+
+ rm -rf $build_dir
+ }
+
+ go_examples_compile redis redis/example
+ fi
+}
+
+src_install() {
+
+ if use examples; then
+ insinto "/usr/share/docs/${PF}/examples"
+ doins redis/example/*
+
+ rm -rf redis/example
+ fi
+
+ insinto "/usr/$(get_libdir)/go/src/pkg/${PN}"
+ doins -r redis
+
+}