diff --git a/profiles/pentoo/base/package.accept_keywords/dev-util b/profiles/pentoo/base/package.accept_keywords/dev-util index 449888291..d57b33b45 100644 --- a/profiles/pentoo/base/package.accept_keywords/dev-util +++ b/profiles/pentoo/base/package.accept_keywords/dev-util @@ -46,3 +46,5 @@ dev-util/gn amd64 ~dev-util/objection-1.4.1 dev-util/appmon + +~dev-util/electron-packager-13.0.1 diff --git a/profiles/pentoo/base/package.accept_keywords/misc b/profiles/pentoo/base/package.accept_keywords/misc index 9c1a73358..b47a624d8 100644 --- a/profiles/pentoo/base/package.accept_keywords/misc +++ b/profiles/pentoo/base/package.accept_keywords/misc @@ -35,3 +35,5 @@ www-apps/Tiredful-API ~app-officeext/languagetool-4.3 =app-dicts/seclists-2018* + +www-apps/BloodHound diff --git a/www-apps/BloodHound/BloodHound-2.0.4.ebuild b/www-apps/BloodHound/BloodHound-2.0.4.ebuild new file mode 100644 index 000000000..389f190aa --- /dev/null +++ b/www-apps/BloodHound/BloodHound-2.0.4.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit eutils + +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 + https://dev.pentoo.ch/~blshkv/distfiles/BloodHound-2.0.4-node_modules.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~arm ~ia32" +IUSE="" + +DEPEND="net-libs/nodejs[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}/singlearch.patch" + eapply_user +} + +src_compile(){ + #npm shrinkwrap + #we provide node_modules, there is no need to install + #npm install \ + + if use amd64; then + npm run linuxbuild_64 + BLOODHOUND_BINDIR="BloodHound-linux-x64" + elif use ia32; then + npm run linuxbuild_32 + BLOODHOUND_BINDIR="BloodHound-linux-ia32" + elif use arm; then + npm run linuxbuild_arm + BLOODHOUND_BINDIR="BloodHound-linux-armv7l" + 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/lib/${PN} + LD_LIBRARY_PATH=. exec ./${PN} "\${@}" + EOF +} diff --git a/www-apps/BloodHound/Manifest b/www-apps/BloodHound/Manifest new file mode 100644 index 000000000..395580fda --- /dev/null +++ b/www-apps/BloodHound/Manifest @@ -0,0 +1,2 @@ +DIST BloodHound-2.0.4-node_modules.tar.gz 73424243 BLAKE2B e0f0d1aff4ec12e56262c6e27bb2b059e18233eea65263d301ec6548c11ee90a79394f8fd8d649f45f8c9ec64055342a6975ce81c877f5cf49fd17652b946315 SHA512 1eaa6c36fa5e42e93f1c69f9ef0bcf293b35a2c7fc7ac4b91b8fbf1700bba286729ec6a402785f3f1b0e587e56d2078408544a56a2bfd7c3593e9dbfc887bd01 +DIST BloodHound-2.0.4.tar.gz 8400766 BLAKE2B a02116aaaa7fac8ac3677a309e72185c31eacc7d7d2aa1ae9cf1456918c9e10a424a66b38fb6bffcade7c9b66fd67f1e2f2391065a03e98f987809f9910c31a5 SHA512 f1b64eb6a40d12395fd10befac205762ff3aa2b21b530171812dc6789aadec63d023dd96c36a7192e95f36870893f8a64675b17bbaa2ff9cfc5c21b035c80375 diff --git a/www-apps/BloodHound/files/singlearch.patch b/www-apps/BloodHound/files/singlearch.patch new file mode 100644 index 000000000..56fd5e698 --- /dev/null +++ b/www-apps/BloodHound/files/singlearch.patch @@ -0,0 +1,13 @@ +--- src/BloodHound/package.json 2017-08-29 17:21:40.983333337 +0200 ++++ package.json 2017-08-29 17:38:59.786666670 +0200 +@@ -24,7 +24,9 @@ + "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.graphdb --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.graphdb --ignore=node_modules/\\.bin --icon=src/img/icon.icns", +- "linuxbuild": "webpack --config webpack.config.production.js && electron-packager . BloodHound --platform=linux --arch=all --overwrite --prune --ignore=./*.zip --ignore=./BloodHound.* --ignore=BloodHoundExampleDB.graphdb --ignore=node_modules/\\.bin" ++ "linuxbuild_32": "webpack --config webpack.config.production.js && electron-packager . BloodHound --platform=linux --arch=ia32 --overwrite --prune --ignore=./*.zip --ignore=./BloodHound.* --ignore=BloodHoundExampleDB.graphdb --ignore=node_modules/\\.bin", ++ "linuxbuild_64": "webpack --config webpack.config.production.js && electron-packager . BloodHound --platform=linux --arch=x64 --overwrite --prune --ignore=./*.zip --ignore=./BloodHound.* --ignore=BloodHoundExampleDB.graphdb --ignore=node_modules/\\.bin", ++ "linuxbuild_arm": "webpack --config webpack.config.production.js && electron-packager . BloodHound --platform=linux --arch=armv7l --overwrite --prune --ignore=./*.zip --ignore=./BloodHound.* --ignore=BloodHoundExampleDB.graphdb --ignore=node_modules/\\.bin" + }, + "babel": { + "presets": [