BloodHound-3.0.5.ebuild

This commit is contained in:
blshkv 2020-07-24 16:30:47 +08:00
parent 96c5ca59d3
commit f8af040eda
No known key found for this signature in database
GPG key ID: 32BDCED870788F04
3 changed files with 89 additions and 0 deletions

View file

@ -0,0 +1,73 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit eutils
ELECTRON_PV="6.0.11"
DESCRIPTION="Six Degrees of Domain Admin"
HOMEPAGE="https://github.com/BloodHoundAD/BloodHound"
SRC_URI="https://github.com/BloodHoundAD/BloodHound/archive/${PV}.tar.gz -> ${P}.tar.gz
amd64? ( https://github.com/electron/electron/releases/download/v${ELECTRON_PV}/electron-v${ELECTRON_PV}-linux-x64.zip )
arm? ( https://github.com/electron/electron/releases/download/v${ELECTRON_PV}/electron-v${ELECTRON_PV}-linux-armv7l.zip )
arm64? ( https://github.com/electron/electron/releases/download/v${ELECTRON_PV}/electron-v${ELECTRON_PV}-linux-arm64.zip )
x86? ( https://github.com/electron/electron/releases/download/v${ELECTRON_PV}/electron-v${ELECTRON_PV}-linux-ia32.zip )
https://dev.pentoo.ch/~blshkv/distfiles/${PN}-3.0.3-node_modules.tar.gz"
#create modules using "npm install"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
IUSE=""
DEPEND=">=net-libs/nodejs-12.10.0[npm]"
# dev-util/electron-packager"
RDEPEND="${DEPEND}"
# gnome-base/gconf"
BLOODHOUND_BINDIR="FAIL_TO_DETECT_ARCH"
QA_FLAGS_IGNORED="usr/lib.*/BloodHound/.*\.so"
src_prepare() {
epatch "${FILESDIR}/3.0.5-singlearch.patch"
#https://github.com/electron/electron-packager/issues/187
# epatch "${FILESDIR}/3.0.3-packager_14_2_1.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"
if use amd64; then
npm run-script linuxbuild_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 linuxbuild_arm || die "Failed to compile"
BLOODHOUND_BINDIR="BloodHound-linux-armv7l"
elif use arm64; then
npm run-script linuxbuild_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
}

View file

@ -1,5 +1,6 @@
DIST BloodHound-3.0.3-node_modules.tar.gz 97799744 BLAKE2B c9541b8f57104369a8deb4ca62ad80858b64babe19729255c4119b159e5ae204404ab7f5fa4d99db6c9c5adde6a091efbba1660e20939fb1b44a016db716d82a SHA512 553793e1fcb44601aaf506e89a9563aaa98d95d43f1a4050af53e0a0ccde26d3eff4f4302287ffe26758b5b654bb48b99448cf596fe3273a941e5e027adb9a87
DIST BloodHound-3.0.4.tar.gz 4919834 BLAKE2B da1a8b17adec5a666d81bb0075f1ce51f20af4784cee7469e51933442021c73a80a566f91d3b18956166dd5f4e9b0583583a289eb099a059b0385d9549982e92 SHA512 e4a80bcc848d22cab17bede355e5c785c95d53c821f4bebbfc2f0c7bfebd558af03c0eec05060965cabb5f1843ec7fbc6b1846b985930d1e47a4504d59d61531
DIST BloodHound-3.0.5.tar.gz 120081909 BLAKE2B dce722adb7997065d0e99db4ca5199e4232573cd1a548fbd9cc14ee08d62e10aca2ef1c43a4de1cb05a5e5483dbb505e88dd6c65cf963cdf07566bbfbe8ef66a SHA512 1e4f91e87355eff8047f99cb420d3709d8f1989c1596ff756cd718861b075dde1dc0a4a2304c337fcb0c2c32678e89451896454a42cbbcaa9291123ba9252676
DIST electron-v6.0.11-linux-arm64.zip 62651275 BLAKE2B d848754f2181f87ed218333252c32e7af3ca782acb4fa6fdfd36d7043feffb301ba1f8cbdb654d8b613602e7d1d6a932c47381a0f3c735811017e7463e5912c0 SHA512 1f7ed8608db90f7d0eba36b8a4ab590d857ab1db0d469d625f3395a9a78b881dfa4877e7e2ced0a98e1eb56b9ac947d220d790393ee63152e50b8497f8446c33
DIST electron-v6.0.11-linux-armv7l.zip 54838319 BLAKE2B bfc0f69a510f329b96a34f11254604a2dad906ea57f8ff303e15f2b841fda9cb889ac6d3b0a4ec8e94a8eeced39d8010ec15117ede17bdb79c94b57de8793305 SHA512 6ea01bbcd929265459fa4cba4316335a971b84a3f2c177146eb850c93de1c61ec0ebb978ed9d200232469e6da3ac4119b94c16f0f200f4b74d8ecb090f144910
DIST electron-v6.0.11-linux-ia32.zip 63263712 BLAKE2B 50a90211e77b968534049b381da8b983ee100de507ce6db1bf086cb9831dc53c7e48d514e8a011abf6140686ef5bddc1ed685109f1a3540ac9e8f93a06e8a383 SHA512 9face6b7c41ff74c654a722a90ae183fe8399d30613e9e810780098894e12c1e3c292e8305bd67795c9be5cd6098ad21a21852835ccb20f88122c5351168fbef

View file

@ -0,0 +1,15 @@
--- package.json.orig 2020-07-22 11:53:36.000000000 +0800
+++ package.json 2020-07-24 15:25:42.033798486 +0800
@@ -31,7 +31,11 @@
"dev": "concurrently -k \"babel-node server.js\" \"npm start\"",
"winbuild": "webpack --config webpack.config.production.js && electron-packager . BloodHound --platform=win32 --arch=all --overwrite --prune --ignore=./*.zip --ignore=./BloodHound.* --ignore=BloodHoundExampleDB.db --ignore=docs --ignore=Ingestors --ignore=node_modules/\\.bin --icon=src/img/icon.ico",
"macbuild": "webpack --config webpack.config.production.js && electron-packager . BloodHound --platform=darwin --arch=all --overwrite --prune --ignore=./*.zip --ignore=./BloodHound.* --ignore=BloodHoundExampleDB.db --ignore=docs --ignore=Ingestors --ignore=node_modules/\\.bin --icon=src/img/icon.icns",
- "linuxbuild": "webpack --config webpack.config.production.js && electron-packager . BloodHound --platform=linux --overwrite --prune --ignore=./*.zip --ignore=./BloodHound.* --ignore=BloodHoundExampleDB.db --ignore=docs --ignore=Ingestors --ignore=node_modules/\\.bin && electron-packager . BloodHound --platform=linux --ignore=docs --overwrite --arch=armv7l --prune --ignore=./*.zip --ignore=./BloodHound.* --ignore=BloodHoundExampleDB.graphdb --ignore=Ingestors --ignore=node_modules/\\.bin && electron-packager . BloodHound --platform=linux --ignore=docs --arch=arm64 --overwrite --prune --ignore=./*.zip --ignore=./BloodHound.* --ignore=BloodHoundExampleDB.graphdb --ignore=Ingestors --ignore=node_modules/\\.bin"
+ "webbuild": "webpack --config webpack.config.production.js",
+ "linuxbuild_32": "electron-packager . BloodHound --platform=linux --arch=ia32 --electronZipDir=../../distdir",
+ "linuxbuild_64": "electron-packager . BloodHound --platform=linux --arch=x64 --electronZipDir=../../distdir",
+ "linuxbuild_arm": "electron-packager . BloodHound --platform=linux --arch=armv71 --electronZipDir=../../distdir",
+ "linuxbuild_arm64": "electron-packager . BloodHound --platform=linux --arch=arm64 --electronZipDir=../../distdir"
},
"babel": {
"presets": [