www-apps/BloodHound - 4.3.1 (pentoo)

Search

Install

Install this version:

emerge -a =www-apps/BloodHound-4.3.1

If this version is masked, you can unmask it using the autounmask tool or standard emerge options:

autounmask =www-apps/BloodHound-4.3.1

Or alternatively:

emerge --autounmask-write -a =www-apps/BloodHound-4.3.1

Package Information

Description:
Six Degrees of Domain Admin
Homepage:
https://github.com/BloodHoundAD/BloodHound
License:
GPL-3

Ebuild Details

Version EAPI Keywords Slot
4.3.1 8 ~amd64 ~arm ~arm64 0
View Raw Ebuild
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

#package.json: "electron": "^11.5.0"
ELECTRON_PV="11.5.0"
ELECTRON_P="electron-v${ELECTRON_PV}"
ELECTRON_URL="github.com/electron/electron/releases/download/v${ELECTRON_PV}"

DESCRIPTION="Six Degrees of Domain Admin"
HOMEPAGE="https://github.com/BloodHoundAD/BloodHound"
SRC_URI="https://github.com/BloodHoundAD/BloodHound/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
	amd64? ( https://${ELECTRON_URL}/${ELECTRON_P}-linux-x64.zip )
	arm? (   https://${ELECTRON_URL}/${ELECTRON_P}-linux-armv7l.zip )
	arm64? ( https://${ELECTRON_URL}/${ELECTRON_P}-linux-arm64.zip )
	x86? (   https://${ELECTRON_URL}/${ELECTRON_P}-linux-ia32.zip )
	https://dev.pentoo.ch/~blshkv/distfiles/${PN}-4.2.0-node_modules.tar.gz"
#create modules using "npm install"

S="${WORKDIR}/${PN}-Legacy-${PV}"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64"

DEPEND=">=net-libs/nodejs-12.10.0[npm]"
#	dev-util/electron-packager"
RDEPEND="${DEPEND}"
#	gnome-base/gconf"
BDEPEND="app-arch/unzip"

BLOODHOUND_BINDIR="FAILED_TO_DETECT_ARCH"
QA_FLAGS_IGNORED="usr/lib.*/BloodHound/.*\.so"

src_prepare() {
	eapply "${FILESDIR}/4.2.0-singlearch.patch"
	mv "${WORKDIR}/node_modules" "${S}"
	eapply_user
}

src_compile() {
	#npm shrinkwrap
	#we  provide node_modules, there is no need to install
	#npm install \

	addpredict /etc/npm
#	npm run-script webbuild || die "Webbuild failed to compile"
	export NODE_OPTIONS=--openssl-legacy-provider
	npm run-script compile || die "Webbuild failed to compile"

	if use amd64; then
		npm run-script package:linux_64 || die "Failed to compile"
		BLOODHOUND_BINDIR="BloodHound-linux-x64"
#	elif use x86; then
#		npm run-script linuxbuild_32 || die "Failed to compile"
#		BLOODHOUND_BINDIR="BloodHound-linux-ia32"
	elif use arm; then
		npm run-script package:linux_arm || die "Failed to compile"
		BLOODHOUND_BINDIR="BloodHound-linux-armv7l"
	elif use arm64; then
		npm run-script package:linux_arm64 || die "Failed to compile"
		BLOODHOUND_BINDIR="BloodHound-linux-arm64"
	fi
}

src_install() {
	dodir /usr/$(get_libdir)/${PN}
	cp -R ${BLOODHOUND_BINDIR}/* "${ED}"/usr/$(get_libdir)/${PN} || die "Copy files failed"

	newbin - ${PN} <<-EOF
	#!/bin/sh
	cd /usr/$(get_libdir)/${PN}
	LD_LIBRARY_PATH=. exec ./${PN} "\${@}"
	EOF
}

pkg_postinst() {
	einfo "Run with --disable-gpu-sandbox if you see \"GPU process isn't usable\" message"
}

Dependencies

DEPEND

>=net-libs/nodejs-12.10.0[npm]

RDEPEND

>=net-libs/nodejs-12.10.0[npm]

BDEPEND

app-arch/unzip

Manifest for 4.3.1

Type File Size Source URLs
DIST BloodHound-4.2.0-node_modules.tar.gz 108394684 bytes https://dev.pentoo.ch/~blshkv/distfiles/BloodHound-4.2.0-node_modules.tar.gz
DIST BloodHound-4.3.1.tar.gz 122488102 bytes https://github.com/BloodHoundAD/BloodHound/archive/refs/tags/v4.3.1.tar.gz
DIST electron-v11.5.0-linux-arm64.zip 81228358 bytes https://github.com/electron/electron/releases/download/v11.5.0/electron-v11.5.0-linux-arm64.zip
DIST electron-v11.5.0-linux-armv7l.zip 66162421 bytes https://github.com/electron/electron/releases/download/v11.5.0/electron-v11.5.0-linux-armv7l.zip
DIST electron-v11.5.0-linux-ia32.zip 73996597 bytes https://github.com/electron/electron/releases/download/v11.5.0/electron-v11.5.0-linux-ia32.zip
DIST electron-v11.5.0-linux-x64.zip 76139311 bytes https://github.com/electron/electron/releases/download/v11.5.0/electron-v11.5.0-linux-x64.zip