commit:     fb14f2c0cb943eceedfbf62af4dd037661f66d38
Author:     Manuel Rüger <mrueg <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 29 01:04:33 2015 +0000
Commit:     Manuel Rüger <mrueg <AT> gentoo <DOT> org>
CommitDate: Mon Jun 29 01:04:33 2015 +0000
URL:        https://gitweb.gentoo.org/dev/mrueg.git/commit/?id=fb14f2c0

[www-apps/redmine_git_hosting] Version bump.

Package-Manager: portage-2.2.20

 www-apps/redmine_git_hosting/Manifest              |  1 +
 .../redmine_git_hosting-1.1.0.ebuild               | 83 ++++++++++++++++++++++
 2 files changed, 84 insertions(+)

diff --git a/www-apps/redmine_git_hosting/Manifest 
b/www-apps/redmine_git_hosting/Manifest
index d084190..1665e6a 100644
--- a/www-apps/redmine_git_hosting/Manifest
+++ b/www-apps/redmine_git_hosting/Manifest
@@ -1 +1,2 @@
 DIST redmine_git_hosting-0.7.10.tar.gz 507430 SHA256 
071156f0d453b7d42c17aa760a05a0dc814bd65eaefe22a0f572566f39c4e6a9 SHA512 
84f0fda4444f2fc4fd9891ae388b7234fd61e45abf044289bb1667ef143b883b2a2b7c5b9c17862c7d4a5614872fb1c68fe860f1dc017f281ef2f81d6291789d
 WHIRLPOOL 
c2e2fdd9e2adeb25d3bce9dc7d179d3dc6e1cc20f01338385244d9f27e77b546a6fe4668791bdc18d60640f25ce8f1c6f578923e1ce9143767e19f7418ebc604
+DIST redmine_git_hosting-1.1.0.tar.gz 185993 SHA256 
fe08b1ac21d3f5e679f9548fb1429461bde9887728064d952d9e24278558f1d3 SHA512 
b5e7abab4517a49de8968b58600a60729726f751327934af6ee8488cbabb996c27f255fbc40a5e82c06a473faf6c49caa6e4b7f9924df7b3acb164f2ada6fe68
 WHIRLPOOL 
44b107c136cf661b77306cf799841e18566ae3b41e528db41e3451187ceec4143de0db5253b74f15285bac54f95ee2b55c4e7e710aacf3ac7cd9c7ecd769df8d

diff --git a/www-apps/redmine_git_hosting/redmine_git_hosting-1.1.0.ebuild 
b/www-apps/redmine_git_hosting/redmine_git_hosting-1.1.0.ebuild
new file mode 100644
index 0000000..6c59629
--- /dev/null
+++ b/www-apps/redmine_git_hosting/redmine_git_hosting-1.1.0.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+USE_RUBY="ruby20"
+inherit ruby-ng user
+
+DESCRIPTION="A Redmine plugin which makes configuring your own Git hosting 
easy"
+HOMEPAGE="https://github.com/jbox-web/redmine_git_hosting";
+SRC_URI="https://github.com/jbox-web/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+ruby_add_rdepend "dev-ruby/asciidoctor
+       dev-ruby/creole
+       dev-ruby/github-markup
+       >=dev-ruby/gitolite-rugged-1.2.0
+       dev-ruby/gitlab-grack
+       dev-ruby/org-ruby
+       dev-ruby/asciidoctor
+       >=dev-ruby/redcarpet-3.1.2
+       dev-ruby/redcloth
+       dev-ruby/wikicloth
+       dev-ruby/haml-rails
+       >=www-apps/redmine-3"
+
+ruby_add_bdepend ">=www-apps/redmine-3"
+
+REDMINE_DIR="/var/lib/redmine"
+
+pkg_setup() {
+       enewgroup redmine
+       enewuser redmine -1 -1 "${REDMINE_DIR}" redmine
+}
+
+all_ruby_install() {
+       dodoc README.md
+       rm .gitignore README.md LICENSE || die
+       dodir "${REDMINE_DIR}"/plugins/${PN}
+       insinto "${REDMINE_DIR}"/plugins/${PN}
+       doins -r .
+       fowners -R redmine:redmine "${REDMINE_DIR}"/plugins/${PN}
+}
+
+pkg_postinst() {
+       einfo
+       elog "Please run emerge --config =${PF}"
+       elog "Further information:"
+       elog 
"https://github.com/jbox-web/redmine_git_hosting/wiki/Step-by-step-installation-instructions";
+       einfo
+}
+
+pkg_config() {
+       local RAILS_ENV=${RAILS_ENV:-production}
+       if [ ! -L /usr/bin/ruby ]; then
+               eerror "/usr/bin/ruby is not a valid symlink to any ruby 
implementation."
+               eerror "Please update it via `eselect ruby`"
+               die
+       fi
+       if [[ $RUBY_TARGETS != *$( eselect ruby show | awk 'NR==2' | tr  -d ' ' 
 )* ]]; then
+               eerror "/usr/bin/ruby is currently not included in redmine's 
ruby targets: ${RUBY_TARGETS}."
+               eerror "Please update it via `eselect ruby`"
+               die
+       fi
+
+       local RUBY=${RUBY:-ruby}
+       einfo "Upgrading the plugin migrations."
+       cd "${EPREFIX}${REDMINE_DIR}" || die
+       RAILS_ENV="${RAILS_ENV}" ${RUBY} -S rake redmine:plugins:migrate || die
+       if [ ! -e 
"${EPREFIX}${REDMINE_DIR}"/plugins/redmine_git_hosting/ssh_keys/redmine_gitolite_admin_id_rsa
 ]; then
+               einfo "Generating SSH-Keypair for Redmine user"
+               ssh-keygen -N '' -f 
"${EPREFIX}${REDMINE_DIR}"/plugins/redmine_git_hosting/ssh_keys/redmine_gitolite_admin_id_rsa
 || die
+               chown redmine:redmine 
"${EPREFIX}${REDMINE_DIR}"/plugins/redmine_git_hosting/ssh_keys/redmine_gitolite_admin_id_rsa\
+                        
"${EPREFIX}${REDMINE_DIR}"/plugins/redmine_git_hosting/ssh_keys/redmine_gitolite_admin_id_rsa.pub
 || die
+               touch "${EPREFIX}${REDMINE_DIR}"/log/git_hosting.log
+               chown redmine:redmine 
"${EPREFIX}${REDMINE_DIR}"/log/git_hosting.log || die
+       fi
+}

Reply via email to