net-misc/bee: rename net-misc/bee-node

Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
This commit is contained in:
Alessandro Barbieri
2022-05-08 03:01:00 +02:00
parent 09133402c7
commit 04582b117f
7 changed files with 64 additions and 8 deletions

View File

@@ -416,7 +416,7 @@ CRATES="
LLVM_MAX_SLOT=14 LLVM_MAX_SLOT=14
QA_FLAGS_IGNORED="usr/bin/bee" QA_FLAGS_IGNORED="usr/bin/bee"
inherit cargo llvm inherit cargo llvm systemd
DESCRIPTION="IOTA node written in rust" DESCRIPTION="IOTA node written in rust"
HOMEPAGE="https://github.com/iotaledger/bee" HOMEPAGE="https://github.com/iotaledger/bee"
@@ -425,7 +425,7 @@ SRC_URI="
https://github.com/iotaledger/bee/archive/${BEE_COMMIT}.tar.gz -> bee-${BEE_COMMIT}.tar.gz https://github.com/iotaledger/bee/archive/${BEE_COMMIT}.tar.gz -> bee-${BEE_COMMIT}.tar.gz
$(cargo_crate_uris) $(cargo_crate_uris)
" "
S="${WORKDIR}/bee-${PV}/${PN}" S="${WORKDIR}/${P}/bee-node"
LICENSE=" LICENSE="
|| ( Apache-2.0 Apache-2.0-with-LLVM-exceptions MIT ) || ( Apache-2.0 Apache-2.0-with-LLVM-exceptions MIT )
@@ -484,4 +484,5 @@ src_install() {
cargo_src_install cargo_src_install
insinto "/etc/${PN}" insinto "/etc/${PN}"
doins config*.toml doins config*.toml
systemd_newunit "${FILESDIR}/bee-mainnet.service" "bee.service"
} }

View File

@@ -436,7 +436,7 @@ LLVM_MAX_SLOT=14
MYPV="${PV/_alpha/-alpha.}" MYPV="${PV/_alpha/-alpha.}"
QA_FLAGS_IGNORED="usr/bin/bee" QA_FLAGS_IGNORED="usr/bin/bee"
inherit cargo llvm inherit cargo llvm systemd
DESCRIPTION="IOTA node written in rust" DESCRIPTION="IOTA node written in rust"
HOMEPAGE="https://github.com/iotaledger/bee" HOMEPAGE="https://github.com/iotaledger/bee"
@@ -448,7 +448,6 @@ SRC_URI="
" "
S="${WORKDIR}/bee-${MYPV}" S="${WORKDIR}/bee-${MYPV}"
# TODO: find out licenses from the bundled dashboard
LICENSE=" LICENSE="
|| ( Apache-2.0 Apache-2.0-with-LLVM-exceptions MIT ) || ( Apache-2.0 Apache-2.0-with-LLVM-exceptions MIT )
|| ( Apache-2.0 BSD MIT ) || ( Apache-2.0 BSD MIT )
@@ -468,6 +467,19 @@ LICENSE="
MIT MIT
MPL-2.0 MPL-2.0
openssl openssl
dashboard? (
|| ( Apache-2.0 MPL-1.1 )
|| ( BSD GPL-2 )
|| ( GPL-3+ MIT )
|| ( MIT CC0-1.0 )
|| ( WTFPL MIT )
CC-BY-3.0
CC-BY-4.0
ZLIB
ODC-By-1.0
Unlicense
)
" "
SLOT="0" SLOT="0"
KEYWORDS="~amd64" KEYWORDS="~amd64"
@@ -500,12 +512,12 @@ pkg_setup() {
src_unpack() { src_unpack() {
cargo_src_unpack cargo_src_unpack
if use dashboard; then if use dashboard; then
cp "${DISTDIR}/node-dashboard-bee-${DASHBOARD_VERSION}" "${S}/${PN}/bee-plugin/bee-plugin-dashboard/node-dashboard-bee-${DASHBOARD_VERSION}.zip" || die cp "${DISTDIR}/node-dashboard-bee-${DASHBOARD_VERSION}" "${S}/bee-node/bee-plugin/bee-plugin-dashboard/node-dashboard-bee-${DASHBOARD_VERSION}.zip" || die
fi fi
} }
src_configure() { src_configure() {
pushd "${S}/${PN}/${PN}" || die pushd "${S}/bee-node/bee-node" || die
local myfeatures=( local myfeatures=(
$(usev dashboard) $(usev dashboard)
$(usev rocksdb) $(usev rocksdb)
@@ -515,13 +527,14 @@ src_configure() {
} }
src_compile() { src_compile() {
pushd "${S}/${PN}/${PN}" || die pushd "${S}/bee-node/bee-node" || die
LIBCLANG_PATH="$(get_llvm_prefix)/$(get_libdir)" cargo_src_compile LIBCLANG_PATH="$(get_llvm_prefix)/$(get_libdir)" cargo_src_compile
} }
src_install() { src_install() {
pushd "${S}/${PN}/${PN}" || die pushd "${S}/bee-node/bee-node" || die
cargo_src_install cargo_src_install
insinto "/etc/${PN}" insinto "/etc/${PN}"
doins config*.toml doins config*.toml
systemd_newunit "${FILESDIR}/bee-alphanet.service" bee.service
} }

View File

@@ -0,0 +1,21 @@
[Unit]
Description=bee
Wants=network-online.target
After=network-online.target
[Service]
LimitNOFILE=4096
SyslogIdentifier=bee
PrivateDevices=yes
PrivateTmp=yes
ProtectSystem=full
ProtectHome=yes
User=bee
WorkingDirectory=/var/lib/bee
TimeoutSec=1200
Restart=always
ExecStart=/usr/bin/bee -c "/etc/bee/config.alphanet.toml"
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,21 @@
[Unit]
Description=bee
Wants=network-online.target
After=network-online.target
[Service]
LimitNOFILE=4096
SyslogIdentifier=bee
PrivateDevices=yes
PrivateTmp=yes
ProtectSystem=full
ProtectHome=yes
User=bee
WorkingDirectory=/var/lib/bee
TimeoutSec=1200
Restart=always
ExecStart=/usr/bin/bee -c "/etc/bee/config.chrysalis-mainnet.toml"
[Install]
WantedBy=multi-user.target