diff --git a/net-im/armcord/Manifest b/net-im/armcord/Manifest index 490010e..6b44113 100644 --- a/net-im/armcord/Manifest +++ b/net-im/armcord/Manifest @@ -1 +1,2 @@ -DIST armcord-3.2.7.tar.gz 1162149 BLAKE2B 65063f9d1cab24113c74c9eb07e6225d5e850b5970540c6abb3f366380a70a4dcb5a0d292ac6156cd5513737d18ca3e0df2cd9b5ddc0e5e7f395f52cff3d125e SHA512 b97a84215ba6c706ec1b0c55282bd4789cfe922def376774f735787092e601682b5c3fa890cdcda44c4896dc10dc1159cde654b4fc6b82fed04eeceaffc521e5 +DIST ArmCord-3.2.7-arm64.tar.gz 101285607 BLAKE2B d56085b7453c3b2525027956c9fcc056a33d5435ddd1f4c4e277846ce31793638be76eef551243efb183b81f1b6d3cb59bead60474bffa80fe8692051154d096 SHA512 96bfe80d9909528fd3f78a91dcafe57ed89136407da563dc5ecb830d2fdff2b05f755a59f7b5bbc1d931576d05fdcfb0efc807f4887126598ae4d232318a2420 +DIST ArmCord-3.2.7.tar.gz 101167833 BLAKE2B f9a02e34e72bd5ae678b6234691631d4c4cf0d19fba9c035f2fbd638f7c1eae238baa51bb0ccabcd749c8af7f191585319d89e0c899f9a51a36f0827582c9664 SHA512 0ab6efa870284a7140d98dd5a26420dcc8fd187c04d942e84b23af1285cbe4eb95d3759934faeb88303cc59085f60c2a6c51cffbea24b4039dffe95993741bdc diff --git a/net-im/armcord/armcord-3.2.7.ebuild b/net-im/armcord/armcord-3.2.7.ebuild index a19b9c6..ffd2bd1 100644 --- a/net-im/armcord/armcord-3.2.7.ebuild +++ b/net-im/armcord/armcord-3.2.7.ebuild @@ -3,51 +3,79 @@ EAPI=8 -inherit desktop xdg +MY_PN="${PN/-bin/}" +MY_PV="${PV/-r*/}" + +CHROMIUM_LANGS=" + af am ar bg bn ca cs da de el en-GB en-US es es-419 et fa fi fil fr gu he hi + hr hu id it ja kn ko lt lv ml mr ms nb nl pl pt-BR pt-PT ro ru sk sl sr sv + sw ta te th tr uk ur vi zh-CN zh-TW +" + +inherit chromium-2 desktop linux-info optfeature unpacker 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" +SRC_URI=" + amd64? ( https://github.com/ArmCord/ArmCord/releases/download/v${PV}/ArmCord-${PV}.tar.gz ) + arm64? ( https://github.com/ArmCord/ArmCord/releases/download/v${PV}/ArmCord-${PV}-arm64.tar.gz ) +" +IUSE="appindicator +seccomp wayland" LICENSE="OSL-3.0" SLOT="0" -KEYWORDS="amd64 arm64 x86" +KEYWORDS="amd64 arm64" -# network-sandbox because node :( -RESTRICT="network-sandbox bindist mirror strip" +RESTRICT="bindist mirror strip test" -BDEPEND="net-libs/nodejs[npm]" +QA_PREBUILT="*" +DESTDIR="/opt/${MY_PN}" +CONFIG_CHECK="~USER_NS" -QA_PREBUILT="usr/bin/${PN}" -S="${WORKDIR}" +src_unpack() { + unpacker_src_unpack + ls -alg "${WORKDIR}" -src_compile() { - cd "${S}/ArmCord-${PV}" || die + # Use the first directory found in the unpacked tarball. + S=$(find "${WORKDIR}" -maxdepth 1 -mindepth 1 -type d -print) +} - 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@8 - pnpm config set store-dir "${S}/.pnpm_store" - pnpm config set cache-dir "${S}/.pnpm_cache" - pnpm config set link-workspace-packages true - - pnpm install - pnpm run build - npx electron-builder --config.linux.target=dir +src_configure() { + default + chromium_suid_sandbox_check_kernel_config } src_install() { - SRC_DIR="${S}/ArmCord-${PV}" + doicon -s 256 "${FILESDIR}/icon.png" - mkdir -p "${D}/usr/lib" - cp -ar "${SRC_DIR}/dist/linux-"*/ "${D}/usr/lib/${PN}/" - fperms 4711 "/usr/lib/${PN}/chrome-sandbox" + exeinto "${DESTDIR}" + doexe "${MY_PN}" chrome-sandbox libEGL.so libffmpeg.so libGLESv2.so libvk_swiftshader.so - dosym "/usr/lib/${PN}/${PN}" "/usr/bin/${PN}" + insinto "${DESTDIR}" + doins chrome_100_percent.pak chrome_200_percent.pak icudtl.dat resources.pak snapshot_blob.bin v8_context_snapshot.bin + insopts -m0755 + doins -r locales resources - newicon "${SRC_DIR}/build/icon.png" "${PN}.png" - make_desktop_entry "${PN}" "ArmCord" "${PN}" "Network;InstantMessaging;" + # Chrome-sandbox requires the setuid bit to be specifically set. + # see https://github.com/electron/electron/issues/17972 + fowners root "${DESTDIR}/chrome-sandbox" + fperms 4711 "${DESTDIR}/chrome-sandbox" + [[ -x chrome_crashpad_handler ]] && doins chrome_crashpad_handler + + dosym "${DESTDIR}/${MY_PN}" "/usr/bin/${MY_PN}" + + executable="${PN}" + if use wayland; then + executable="${PN} --ozone-platform-hint=auto" + fi + make_desktop_entry "$executable" "ArmCord" "${PN}" "Network;InstantMessaging;" +} + +pkg_postinst() { + xdg_pkg_postinst + + optfeature_header "Install the following packages for additional support:" + optfeature "sound support" \ + media-sound/pulseaudio media-sound/apulse[sdk] media-video/pipewire + optfeature "emoji support" media-fonts/noto-emoji } diff --git a/net-im/armcord/files/icon.png b/net-im/armcord/files/icon.png new file mode 100644 index 0000000..940c594 Binary files /dev/null and b/net-im/armcord/files/icon.png differ