net-im/armcord: initial package
Super hacky network-sandbox restricted package for armcord that uses `electron-builder` to build the program. Eventually, I might make this better. Might.
This commit is contained in:
parent
1d60cc0501
commit
d55e257a9f
2 changed files with 54 additions and 0 deletions
1
net-im/armcord/Manifest
Normal file
1
net-im/armcord/Manifest
Normal file
|
@ -0,0 +1 @@
|
|||
DIST armcord-3.2.6.tar.gz 2037117 BLAKE2B 0258d3c46391e4324e92d2aeb6e150f5ffbac783c874a54deccdc8633e39742591e5de76a75c57c594c51c204e2555afd8a63c42a427e59aa077bb6ed80271ba SHA512 83780c32172423fe0af562170fa30eefa5020fb9cf50d5cdbf9dfc43c4cace68d2a3ca2ac131ff7615564a5e61126d1942dcfe78b2776cf63ff335d61b5c797b
|
53
net-im/armcord/armcord-3.2.6.ebuild
Normal file
53
net-im/armcord/armcord-3.2.6.ebuild
Normal file
|
@ -0,0 +1,53 @@
|
|||
# Copyright 2020-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit desktop xdg
|
||||
|
||||
DESCRIPTION="ArmCord is a custom client designed to enhance your Discord experience while keeping everything lightweight"
|
||||
HOMEPAGE="https://github.com/ArmCord/ArmCord"
|
||||
SRC_URI="https://github.com/ArmCord/ArmCord/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="OSL-3.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 arm64 x86"
|
||||
|
||||
# network-sandbox because node :(
|
||||
RESTRICT="network-sandbox bindist mirror"
|
||||
|
||||
BDEPEND="net-libs/nodejs[npm]"
|
||||
|
||||
QA_PREBUILT="usr/bin/${PN}"
|
||||
S="${WORKDIR}"
|
||||
|
||||
src_compile() {
|
||||
cd "${S}/ArmCord-${PV}" || die
|
||||
|
||||
export npm_config_build_from_source=true
|
||||
export HOME="${S}/.electron-gyp"
|
||||
export PATH="${S}/.npm/bin:${PATH}"
|
||||
|
||||
# Install and configure pnpm.
|
||||
npm --prefix "${S}/.npm" install -g pnpm
|
||||
pnpm config set store-dir "${S}/.pnpm_store"
|
||||
pnpm config set cache-dir "${S}/.pnpm_cache"
|
||||
pnpm config set link-workspace-packages true
|
||||
|
||||
sed '/deb/d;/tar.gz/d;/rpm/d;s/AppImage/zip/' -i package.json
|
||||
pnpm install
|
||||
pnpm run build
|
||||
npx electron-builder --config.linux.target=dir
|
||||
}
|
||||
|
||||
src_install() {
|
||||
SRC_DIR="${S}/ArmCord-${PV}"
|
||||
|
||||
mkdir -p "${D}/usr/lib"
|
||||
cp -ar "${SRC_DIR}/dist/linux-"*/ "${D}/usr/lib/${PN}/"
|
||||
|
||||
dosym "/usr/lib/${PN}/${PN}" "/usr/bin/${PN}"
|
||||
|
||||
newicon "${SRC_DIR}/build/icon.png" "${PN}.png"
|
||||
make_desktop_entry "${PN}" "ArmCord" "${PN}" "Network;InstantMessaging;"
|
||||
}
|
Loading…
Add table
Reference in a new issue