diff --git a/net-wireless/blue_hydra/Manifest b/net-wireless/blue_hydra/Manifest index b512e1f38..11e7ed2ce 100644 --- a/net-wireless/blue_hydra/Manifest +++ b/net-wireless/blue_hydra/Manifest @@ -1 +1,2 @@ DIST blue_hydra-1.7.28.tar.gz 78857 SHA256 414cb962198b180f726c0ebfbdb32cb3876aabdd7c89188e88bed406b7520962 SHA512 1493c0c8cc5833bc29b1327f50623ffcb4ec49c0f8157501b6d48278e32e1cdb2719a5e1637713527d217241ae2c422edde63fa80780900a90c566ea0e592c4d WHIRLPOOL e958d78ee15af427396dd58134d90841d3eeec07971d81362fc949a107f72d51190e159e8d98c2a3c0bd8364886e8a1ed86d3db5b59461eb1c506ad28d7b969e +DIST blue_hydra-1.8.7.tar.gz 190540 SHA256 f71f6f98136539af772f589e7c4e6657a341edbdda8599d6cbdb693f8857c41c SHA512 6cbd8cae5a7ecd805be8acf01f99e4da00ec266b212b6047b8e6ecd3b9756bc76e82400fda5954fa1f3743e550ac84f45541bf4c1819f089111e3925ae1014e2 WHIRLPOOL 13774b847172ea67d3df3b339c35b1cc5fc03555cee41cd5f9618e427d93aa49ecc83a8469be6ed2262cc7b30e5da79fff850b9ed27d7ef1a2f71fed2eb69bfa diff --git a/net-wireless/blue_hydra/blue_hydra-1.8.7.ebuild b/net-wireless/blue_hydra/blue_hydra-1.8.7.ebuild new file mode 100644 index 000000000..27dc887b7 --- /dev/null +++ b/net-wireless/blue_hydra/blue_hydra-1.8.7.ebuild @@ -0,0 +1,103 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DESCRIPTION="bluetooth discovery service built on top of bluez" +HOMEPAGE="https://github.com/pwnieexpress/blue_hydra" +SRC_URI="" + +LICENSE="BSD-4" +SLOT="0" +USE_RUBY="ruby21 ruby22 ruby23 ruby24" +inherit ruby-ng + +if [[ ${PV} == "9999" ]] ; then + inherit git-r3 + KEYWORDS="" + EGIT_REPO_URI="https://github.com/pwnieexpress/blue_hydra.git" + EGIT_CHECKOUT_DIR="${WORKDIR}"/all +else + KEYWORDS="amd64 x86 arm" + #strictly speaking this isn't a blue_hydra version number but the Pwnie Express software release number + #but close enough for pushing out stable releases + SRC_URI="https://github.com/pwnieexpress/blue_hydra/archive/${PV}.tar.gz -> ${P}.tar.gz" +fi + +IUSE="development ubertooth" + +DEPEND="" +PDEPEND="dev-python/dbus-python + net-wireless/bluez[test-programs] + ubertooth? ( net-wireless/ubertooth )" + +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 + dev-ruby/dm-validations + dev-ruby/louis + development? ( dev-ruby/pry + ${test_deps} )" + +#RUBY_S="${WORKDIR}/${P}" + +all_ruby_unpack () { + if [[ ${PV} == "9999" ]]; then + git-r3_src_unpack + else + default_src_unpack + fi +} + +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 :test, :development 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-ng_rspec || die +} + +each_ruby_install() { + dodir /usr/share/doc/${PF} + cp -R {README.md,TODO} "${ED}"/usr/share/doc/${PF} || die + + rm -r spec || die + if [ -f Gemfile.lock ]; then + rm Gemfile.lock || die + fi + + dodir /usr/$(get_libdir)/${PN} + cp -R * "${ED}"/usr/$(get_libdir)/${PN} + fowners -R root:0 / + + dodir /usr/sbin + cat <<-EOF > "${ED}"/usr/sbin/blue_hydra + #! /bin/sh + cd /usr/$(get_libdir)/${PN} + exec ${RUBY} -S ./bin/blue_hydra \$@ + EOF + fperms +x /usr/sbin/blue_hydra + + #touch these files so we know who owns them + touch blue_hydra.yml blue_hydra_rssi.log blue_hydra.log +} diff --git a/net-wireless/blue_hydra/blue_hydra-9999.ebuild b/net-wireless/blue_hydra/blue_hydra-9999.ebuild index a01bf8b3a..27dc887b7 100644 --- a/net-wireless/blue_hydra/blue_hydra-9999.ebuild +++ b/net-wireless/blue_hydra/blue_hydra-9999.ebuild @@ -1,8 +1,7 @@ -# Copyright 1999-2016 Gentoo Foundation +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Id$ -EAPI=5 +EAPI=6 DESCRIPTION="bluetooth discovery service built on top of bluez" HOMEPAGE="https://github.com/pwnieexpress/blue_hydra" @@ -10,7 +9,7 @@ SRC_URI="" LICENSE="BSD-4" SLOT="0" -USE_RUBY="ruby21" +USE_RUBY="ruby21 ruby22 ruby23 ruby24" inherit ruby-ng if [[ ${PV} == "9999" ]] ; then