# Copyright 1999-2018 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=5 SLOT=0 USE_RUBY="ruby18 ruby19" [[ "$PV" == *999 ]] && unp="git-r3" inherit flag-o-matic $unp ruby-fakegem versionator LICENSE="GPL-2" DESCRIPTION="HA Web Konsole (Hawk). A web-based GUI for managing and monitoring Pacemaker HA clusters." HOMEPAGE="http://clusterlabs.org/wiki/Hawk" KEYWORDS="" case "$PV" in 9999) EGIT_REPO_URI="git://github.com/ClusterLabs/hawk.git https://github.com/ClusterLabs/hawk.git" SRC_URI="" ;; *) KEYWORDS="~amd64" SRC_URI="https://github.com/ClusterLabs/$PN/archive/$PN-$PV.tar.gz" ;; esac KEYWORDS="~amd64" IUSE="fcgi" DEPEND="sys-cluster/pacemaker sys-cluster/crmsh sys-libs/pam dev-libs/glib dev-libs/libxml2 www-servers/lighttpd fcgi? ( dev-ruby/fcgi app-misc/fdupes ) " # =dev-ruby/gettext_i18n_rails-1.0.5 ( =dev-ruby/rails-3.2 dev-ruby/fast_gettext dev-ruby/gettext_i18n_rails virtual/ruby-threads " # =dev-ruby/rails-4.0.0'; then sed -i -e "s:gem 'rails', '~> 3\.2':gem 'rails', '>= 3.2'\ngem 'activeresource', '>= 4.0.0':" "${S}"/hawk/Gemfile sed -i -e 's%^\( *match .*\)$%\1, :via => [:get]%' "$S/hawk/config/routes.rb" fi } _make(){ emake WWW_BASE="${base}" INIT_STYLE=gentoo DESTDIR="${D}" "${@}" || die } each_ruby_compile() { _make } each_ruby_install() { rm -f "${D}${base}/${PN}"/public/monitor _make install # use fcgi || rm "${D}"/srv/www/hawk/config/lighttpd.conf } each_ruby_test() { _make test }