mirror of
https://github.com/pentoo/pentoo-overlay
synced 2026-05-02 03:30:48 +02:00
blue_hydra: nearly correct ebuild, deps are missing a bit but specified better
This commit is contained in:
parent
92a6355d97
commit
c26a37a582
1 changed files with 31 additions and 14 deletions
|
|
@ -8,7 +8,7 @@ DESCRIPTION="bluetooth discovery service built on top of bluez"
|
|||
HOMEPAGE="https://github.com/pwnieexpress/blue_hydra"
|
||||
SRC_URI=""
|
||||
|
||||
LICENSE="BSD-3"
|
||||
LICENSE="BSD-4"
|
||||
SLOT="0"
|
||||
USE_RUBY="ruby21"
|
||||
inherit git-r3 ruby-ng
|
||||
|
|
@ -16,16 +16,21 @@ inherit git-r3 ruby-ng
|
|||
KEYWORDS=""
|
||||
EGIT_REPO_URI="https://github.com/pwnieexpress/blue_hydra.git"
|
||||
EGIT_CHECKOUT_DIR="${WORKDIR}"/all
|
||||
IUSE="ubertooth"
|
||||
IUSE="development ubertooth"
|
||||
|
||||
DEPEND=""
|
||||
PDEPEND="dev-python/dbus-python
|
||||
net-wireless/bluez[test-programs]
|
||||
ubertooth? ( net-wireless/ubertooth )"
|
||||
|
||||
ruby_add_bdepend "dev-ruby/bundler"
|
||||
ruby_add_rdepend "dev-ruby/dm-core
|
||||
dev-ruby/dm-sqlite-adapter"
|
||||
test_deps="dev-ruby/rake dev-ruby/rspec:*"
|
||||
ruby_add_bdepend "dev-ruby/bundler
|
||||
test? ( ${test_deps} )"
|
||||
ruby_add_rdepend "dev-ruby/dm-migrations
|
||||
dev-ruby/dm-sqlite-adapter
|
||||
dev-ruby/dm-timestamps
|
||||
development? ( dev-ruby/pry
|
||||
${test_deps} )"
|
||||
|
||||
#RUBY_S="${WORKDIR}/${P}"
|
||||
|
||||
|
|
@ -37,11 +42,26 @@ all_ruby_unpack () {
|
|||
fi
|
||||
}
|
||||
|
||||
#each_ruby_prepare() {
|
||||
# sed -e \
|
||||
# "1s:^#![[:space:]]*\([^[:space:]]*/usr/bin/env[[:space:]]\)\?[[:space:]]*\([^[:space:]]*/\)\?ruby\([[:digit:]]\+\(\.[[:digit:]]\+\)\?\)\?\(\$\|[[:space:]].*\):#!\1\2${RUBY}:" \
|
||||
# -i "bin/blue_hydra" || die "Conversion of shebang in 'bin/blue_hydra' failed"
|
||||
#}
|
||||
all_ruby_prepare() {
|
||||
[ -f Gemfile.lock ] && rm Gemfile.lock
|
||||
if ! use development; then
|
||||
sed -i -e "/^group :development do/,/^end$/d" Gemfile || die
|
||||
fi
|
||||
if ! use test; then
|
||||
sed -i -e "/^group :test do/,/^end$/d" Gemfile || die
|
||||
fi
|
||||
if ! use test && ! use development; then
|
||||
sed -i -e "/^group :development, :test do/,/^end$/d" Gemfile || die
|
||||
fi
|
||||
}
|
||||
|
||||
each_ruby_prepare() {
|
||||
if [ -f Gemfile ]
|
||||
then
|
||||
BUNDLE_GEMFILE=Gemfile ${RUBY} -S bundle install --local || die
|
||||
BUNDLE_GEMFILE=Gemfile ${RUBY} -S bundle check || die
|
||||
fi
|
||||
}
|
||||
|
||||
each_ruby_test() {
|
||||
${RUBY} -S rspec || die
|
||||
|
|
@ -64,10 +84,7 @@ each_ruby_install() {
|
|||
cat <<-EOF > "${ED}"/usr/sbin/blue_hydra
|
||||
#! /bin/sh
|
||||
cd /usr/$(get_libdir)/${PN}
|
||||
if [ -f Gemfile.lock ]; then
|
||||
rm Gemfile.lock
|
||||
fi
|
||||
${RUBY} -S bundle exec ./bin/blue_hydra \$@
|
||||
exec ${RUBY} -S ./bin/blue_hydra \$@
|
||||
EOF
|
||||
fperms +x /usr/sbin/blue_hydra
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue