summaryrefslogtreecommitdiff
path: root/g_cran
diff options
context:
space:
mode:
authorAuke Booij (tulcod) <auke@tulcod.com>2010-06-26 12:34:34 +0200
committerAuke Booij (tulcod) <auke@tulcod.com>2010-06-26 12:34:34 +0200
commit44322d85803ab96342d1bba74363a0fa8b8884e7 (patch)
tree661067c7ea23ad3027dd87c14c9bda5b7c6b7109 /g_cran
parentFix python script name (diff)
downloadg-cran-44322d85803ab96342d1bba74363a0fa8b8884e7.tar.gz
g-cran-44322d85803ab96342d1bba74363a0fa8b8884e7.tar.bz2
g-cran-44322d85803ab96342d1bba74363a0fa8b8884e7.zip
Should install correctly with distutils now. The g-cran script ends up in /usr/bin.
Diffstat (limited to 'g_cran')
-rwxr-xr-xg_cran/cran.ebuild29
1 files changed, 29 insertions, 0 deletions
diff --git a/g_cran/cran.ebuild b/g_cran/cran.ebuild
new file mode 100755
index 0000000..ecdc5a0
--- /dev/null
+++ b/g_cran/cran.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+argv0=${BASH_ARGV[0]}
+this_file=$argv0
+this_dirname=$(/bin/dirname $this_file)
+this_repo="${this_dirname}/../../"
+
+#discover category, package name and version
+cat_pn_pvr=$(echo $this_file|/bin/sed -r 's$.+?/([A-Za-z0-9+_.-]+)/([A-Za-z0-9+_-]+)/\2-([0-9]+(\.[0-9]+)*[a-z]?((_alpha|_beta|_pre|_rc|_p)[0-9]*)*(-r[0-9]*)?)\.ebuild$\1/\2 \3$')
+
+
+#this reads in metadata from g-cran
+{ while read -r line
+do
+ export "$line"
+done
+} < <(/usr/bin/g-cran $this_repo package $cat_pn_pvr || die);
+
+for phase in $GCOMMON_PHASES
+do
+ eval "$(printf '%q() { exec_phase %q; }' "$phase" "$phase")"
+done
+
+function exec_phase() {
+ /usr/bin/g-cran $this_repo $1 || die
+}
+