abinfo "Building YesPlayMusic  ..."
yarn electron:build --dir

abinfo "Installing YesPlayMusic ..."
if ab_match_arch arm64 ; then
    ELECTRONDIR="$SRCDIR"/dist_electron/linux-arm64-unpacked
else
    ELECTRONDIR="$SRCDIR"/dist_electron/linux-unpacked
fi
mkdir -pv "$PKGDIR"/usr/lib/yesplaymusic
cp -av "$ELECTRONDIR"/* "$PKGDIR"/usr/lib/yesplaymusic
chmod -v 755 "$PKGDIR"/usr/lib/yesplaymusic/yesplaymusic
install -Dvm644 "$ELECTRONDIR"/*LICENSE* \
    -t "$PKGDIR"/usr/share/doc/yesplaymusic/

abinfo "Marking shared libraries as executable ..."
find "$PKGDIR" \
    -name '*.so.*' \
    -exec chmod -v 0755 {} \;
