summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUltrabug <ultrabug@gentoo.org>2012-01-06 13:27:50 (GMT)
committerUltrabug <ultrabug@gentoo.org>2012-01-06 13:27:50 (GMT)
commit0cbf9258db765f2f2cdee240d16640d2404ca044 (patch)
treecb990d766d3a5b145de42789ba76970c7f495c4c
parentuasparser for python ebuild (diff)
downloadultrabug-0cbf9258.zip
ultrabug-0cbf9258.tar.gz
ultrabug-0cbf9258.tar.bz2
riak ebuild work
-rw-r--r--dev-db/riak/Manifest5
-rw-r--r--dev-db/riak/files/riak-1.0.2-rel.patch37
-rw-r--r--dev-db/riak/riak-1.0.2.ebuild43
3 files changed, 72 insertions, 13 deletions
diff --git a/dev-db/riak/Manifest b/dev-db/riak/Manifest
index 3d62448..bbcb42c 100644
--- a/dev-db/riak/Manifest
+++ b/dev-db/riak/Manifest
@@ -1,4 +1,3 @@
-AUX riak-1.0.2-erlang_js.patch 581 RMD160 cc31d209ba1a14e87ec5d945183cf224920af276 SHA1 5f821bda9da962d1c3ec85cb097ed5c1632909e5 SHA256 59018feac43be01b6c2bf66c11572891e4a991cf34265909dff2f96970e36d50
+AUX riak-1.0.2-rel.patch 1227 RMD160 7b4e6702238174100a23fbbff80f3f819398cb51 SHA1 72207a71ac674754833ef5a6e88b269ffa851c7d SHA256 f33af8ab023f5892bed670619cd4cecda968181761ad37ee17dfebfbbdef8ed2
DIST riak-1.0.2.tar.gz 9151355 RMD160 a5f96575cf5665a99e10fb36c9a2587ae408bfb2 SHA1 252ab9a198816c892ba98a66d91e629778624e23 SHA256 0b386ae7a4477ccc29ef9ba195bd84be88049202544572b0c1b42bd589177d58
-EBUILD riak-1.0.2.ebuild 1141 RMD160 bc48fcdde0d540feb352ff230e8b0faa3d39ae69 SHA1 f77018d260775605c2d8cf12df64412c4f03d467 SHA256 f5637031eb6189ac4013db9988999c280397faf9c87e2a22733b5e6a1383e971
-MISC riak-1.0.2.tar.gz 9151355 RMD160 a5f96575cf5665a99e10fb36c9a2587ae408bfb2 SHA1 252ab9a198816c892ba98a66d91e629778624e23 SHA256 0b386ae7a4477ccc29ef9ba195bd84be88049202544572b0c1b42bd589177d58
+EBUILD riak-1.0.2.ebuild 1484 RMD160 72a6f770a08860d7146658c1a62f2f806c7b8ac4 SHA1 df5c41b977e6fe11facfd35a1fb8bea3a84e2321 SHA256 e20ea079e53e58d5111dec3257813b7ef88cd9e880b7c30e4c7c400186d30ac0
diff --git a/dev-db/riak/files/riak-1.0.2-rel.patch b/dev-db/riak/files/riak-1.0.2-rel.patch
new file mode 100644
index 0000000..c0e735c
--- /dev/null
+++ b/dev-db/riak/files/riak-1.0.2-rel.patch
@@ -0,0 +1,37 @@
+--- a/rel/vars.config 2011-11-17 21:17:47.000000000 +0100
++++ b/rel/vars.config 2012-01-06 12:59:28.321049744 +0100
+@@ -1,12 +1,12 @@
+ %% -*- tab-width: 4;erlang-indent-level: 4;indent-tabs-mode: nil -*-
+ %% ex: ts=4 sw=4 et
+
+-%% Platform-specific installation paths
+-{platform_bin_dir, "./bin"}.
+-{platform_data_dir, "./data"}.
+-{platform_etc_dir, "./etc"}.
+-{platform_lib_dir, "./lib"}.
+-{platform_log_dir, "./log"}.
++% Platform-specific installation paths
++{platform_bin_dir, "/usr/sbin"}.
++{platform_data_dir, "/var/lib/riak"}.
++{platform_etc_dir, "/etc/riak"}.
++{platform_lib_dir, "/usr/lib/riak"}.
++{platform_log_dir, "/var/log/riak"}.
+
+ %%
+ %% etc/app.config
+@@ -43,9 +43,9 @@
+ %%
+ %% bin/riak
+ %%
+-{runner_script_dir, "$(cd ${0%/*} && pwd)"}.
+-{runner_base_dir, "${RUNNER_SCRIPT_DIR%/*}"}.
+-{runner_etc_dir, "$RUNNER_BASE_DIR/etc"}.
+-{runner_log_dir, "$RUNNER_BASE_DIR/log"}.
+-{pipe_dir, "/tmp/$RUNNER_BASE_DIR/"}.
+-{runner_user, ""}.
++{runner_script_dir, "/usr/sbin"}.
++{runner_base_dir, "{{platform_lib_dir}}"}.
++{runner_etc_dir, "{{platform_etc_dir}}"}.
++{runner_log_dir, "{{platform_log_dir}}"}.
++{pipe_dir, "/tmp/riak/"}.
++{runner_user, "riak"}.
diff --git a/dev-db/riak/riak-1.0.2.ebuild b/dev-db/riak/riak-1.0.2.ebuild
index 60effb4..2a80f6d 100644
--- a/dev-db/riak/riak-1.0.2.ebuild
+++ b/dev-db/riak/riak-1.0.2.ebuild
@@ -4,7 +4,7 @@
EAPI=4
-inherit eutils versionator
+inherit versionator
MAJ_PV="$(get_major_version)"
MED_PV="$(get_version_component_range 2)"
@@ -22,21 +22,44 @@ IUSE=""
RDEPEND="dev-lang/erlang"
DEPEND="${RDEPEND}"
-PATCHES=()
+pkg_setup() {
+ enewgroup riak
+ enewuser riak -1 -1 /var/lib/${PN} riak
+}
src_prepare() {
-# epatch "${FILESDIR}/riak-1.0.2-erlang_js.patch"
- sed -i -e 's/R14B0\[23\]/R14B0\[234\]/g' -e "s@compile generate@compile generate --target_dir=${D}@g" rebar.config || die
+ epatch "${FILESDIR}/riak-1.0.2-rel.patch"
+ sed -i -e 's/R14B0\[23\]/R14B0\[234\]/g' rebar.config || die
sed -i -e 's/XLDFLAGS="$(LDFLAGS)"//g' -e 's/ $(CFLAGS)//g' deps/erlang_js/c_src/Makefile || die
}
+src_compile() {
+ emake rel
+}
+
src_install() {
- emake DESTDIR="${D}" rel
+ # install /usr/lib stuff
+ insinto /usr/lib/${PN}
+ cp -R rel/riak/lib "${D}"/usr/lib/riak
+ cp -R rel/riak/releases "${D}"/usr/lib/riak
+ cp -R rel/riak/erts* "${D}"/usr/lib/riak
+ chmod 0755 "${D}"/usr/lib/riak/erts*/bin/*
+
+ # install /usr/sbin stuff
+ dosbin rel/riak/bin/*
+
+ # install /etc/riak stuff
+ insinto /etc/${PN}
+ doins rel/riak/etc/*
+
+ # create neccessary directories
+ keepdir /var/lib/${PN}/{bitcask,ring}
+ keepdir /var/log/${PN}/sasl
+ keepdir /var/run/${PN}
- mkdir -p ${D}/{usr/sbin,etc,var/lib/${PN}}
+ # create docs
+ doman doc/man/man1/*
+ dodoc doc/*.txt
- cp -a rel/riak/bin/ "${D}"/usr/sbin
- cp -a rel/riak/etc/ "${D}"/etc
- cp -a rel/riak/lib/* "${D}"/var/lib/${PN}
- cp -a rel/riak/data/* "${D}"/var/lib/${PN}
+ # TODO: init.d / conf.d files
}