diff --git a/.github/workflows/flatpak.yml b/.github/workflows/flatpak.yml index a86dd08..8c608c7 100644 --- a/.github/workflows/flatpak.yml +++ b/.github/workflows/flatpak.yml @@ -1,27 +1,9 @@ name: Flatpak on: - push: - branches: [main] - paths: - - '.github/workflows/flatpak.yml' - - '.gitmodules' - - 'CMakeLists.txt' - - 'LICENSE' - - 'assets/screenshots/**' - - 'cmake/**' - - 'config/**' - - 'include/**' - - 'packaging/flatpak/**' - - 'packaging/discord-join.html' - - 'packaging/icons/**' - - 'packaging/space.bigrat.mocktail.desktop' - - 'packaging/space.bigrat.mocktail.metainfo.xml' - - 'packaging/space.bigrat.mocktail.svg' - - 'scripts/assemble_flatpak_pages.sh' - - 'src/**' - - 'stubs/**' - - 'third_party/**' + workflow_run: + workflows: [Native packages] + types: [completed] pull_request: paths: - '.github/workflows/flatpak.yml' @@ -39,30 +21,69 @@ on: - 'packaging/space.bigrat.mocktail.metainfo.xml' - 'packaging/space.bigrat.mocktail.svg' - 'scripts/assemble_flatpak_pages.sh' + - 'scripts/assemble_native_repositories.sh' + - 'site/**' - 'src/**' - 'stubs/**' - 'third_party/**' workflow_dispatch: permissions: + actions: read contents: read concurrency: - group: flatpak-${{ github.ref }} + group: flatpak-${{ github.event.workflow_run.head_sha || github.ref }} cancel-in-progress: true jobs: flatpak: name: Flatpak build + if: >- + github.event_name != 'workflow_run' || + (github.event.workflow_run.conclusion == 'success' && + github.event.workflow_run.event != 'pull_request' && + github.event.workflow_run.head_branch == 'main') runs-on: ubuntu-24.04 timeout-minutes: 120 + env: + MOCKTAIL_PUBLISH: ${{ (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event != 'pull_request' && github.event.workflow_run.head_branch == 'main') || (github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main') }} + MOCKTAIL_SOURCE_SHA: ${{ github.event.workflow_run.head_sha || github.sha }} steps: - name: Check out source uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 + ref: ${{ github.event.workflow_run.head_sha || github.sha }} submodules: recursive + - name: Download package repositories + if: env.MOCKTAIL_PUBLISH == 'true' + shell: bash + env: + GH_TOKEN: ${{ github.token }} + run: | + set -Eeuo pipefail + run_id="${{ github.event.workflow_run.id }}" + if [[ -z "$run_id" ]]; then + run_id="$(gh run list \ + --workflow packages.yml \ + --branch main \ + --event push \ + --status success \ + --limit 1 \ + --json databaseId \ + --jq '.[0].databaseId')" + fi + [[ -n "$run_id" ]] + gh run download "$run_id" \ + --name Mocktail-native-repositories \ + --dir native-repositories + [[ -d native-repositories/apt && \ + -d native-repositories/rpm && \ + -d native-repositories/downloads && \ + -s native-repositories/mocktail-packages.gpg ]] + - name: Install Flatpak builder shell: bash run: | @@ -78,13 +99,10 @@ jobs: FLATPAK_GPG_KEY_ID: ${{ secrets.FLATPAK_GPG_KEY_ID }} run: | set -Eeuo pipefail - git update-ref refs/heads/main "$GITHUB_SHA" + git update-ref refs/heads/main "$MOCKTAIL_SOURCE_SHA" builder_signing=() bundle_keys=() - publish=false - if [[ "$GITHUB_REF" == refs/heads/main && \ - "$GITHUB_EVENT_NAME" != pull_request ]]; then - publish=true + if [[ "$MOCKTAIL_PUBLISH" == true ]]; then [[ -n "$FLATPAK_GPG_PRIVATE_KEY" && \ -n "$FLATPAK_GPG_KEY_ID" ]] install -d -m 0700 "$RUNNER_TEMP/mocktail-gnupg" @@ -110,7 +128,7 @@ jobs: "${builder_signing[@]}" \ build-flatpak-ci \ packaging/flatpak/space.bigrat.mocktail.json - if [[ "$publish" == true ]]; then + if [[ "$MOCKTAIL_PUBLISH" == true ]]; then flatpak build-update-repo \ --generate-static-deltas \ --static-delta-jobs=2 \ @@ -126,9 +144,10 @@ jobs: Mocktail-x86_64.flatpak \ space.bigrat.mocktail \ stable - if [[ "$publish" == true ]]; then + if [[ "$MOCKTAIL_PUBLISH" == true ]]; then ./scripts/assemble_flatpak_pages.sh \ - repo Mocktail-x86_64.flatpak mocktail-flatpak.gpg public + repo Mocktail-x86_64.flatpak mocktail-flatpak.gpg \ + public native-repositories fi - name: Upload Flatpak @@ -140,18 +159,24 @@ jobs: retention-days: 14 - name: Configure GitHub Pages - if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request' + if: env.MOCKTAIL_PUBLISH == 'true' uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0 - name: Upload GitHub Pages repository - if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request' + if: env.MOCKTAIL_PUBLISH == 'true' uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0 with: path: public deploy-pages: name: Publish Flatpak repository - if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request' + if: >- + (github.event_name == 'workflow_run' && + github.event.workflow_run.conclusion == 'success' && + github.event.workflow_run.event != 'pull_request' && + github.event.workflow_run.head_branch == 'main') || + (github.event_name == 'workflow_dispatch' && + github.ref == 'refs/heads/main') needs: flatpak runs-on: ubuntu-24.04 timeout-minutes: 10 diff --git a/.github/workflows/packages.yml b/.github/workflows/packages.yml index 89018d1..e01c6ee 100644 --- a/.github/workflows/packages.yml +++ b/.github/workflows/packages.yml @@ -5,27 +5,21 @@ on: branches: [main] paths-ignore: - '.github/workflows/ci.yml' - - '.github/workflows/flatpak.yml' - '.gitignore' - 'README.md' - 'assets/screenshots/**' - 'docs/**' - 'packaging/aur/**' - - 'packaging/flatpak/**' - - 'scripts/assemble_flatpak_pages.sh' - 'scripts/build_flatpak.sh' - 'tests/**' pull_request: paths-ignore: - '.github/workflows/ci.yml' - - '.github/workflows/flatpak.yml' - '.gitignore' - 'README.md' - 'assets/screenshots/**' - 'docs/**' - 'packaging/aur/**' - - 'packaging/flatpak/**' - - 'scripts/assemble_flatpak_pages.sh' - 'scripts/build_flatpak.sh' - 'tests/**' workflow_dispatch: @@ -121,9 +115,11 @@ jobs: - name: Build DEB shell: bash run: | + nightly_suffix=".nightly.$(git show -s --format=%cd --date=format:%Y%m%d%H%M%S "$GITHUB_SHA").g${GITHUB_SHA:0:8}" docker run --rm \ --volume "$GITHUB_WORKSPACE:/workspace" \ --workdir /workspace \ + --env MOCKTAIL_PACKAGE_VERSION_SUFFIX="$nightly_suffix" \ ubuntu:26.04 bash -Eeuo pipefail -c ' export DEBIAN_FRONTEND=noninteractive apt-get update @@ -138,6 +134,8 @@ jobs: cmake -S . -B build-deb -G Ninja \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/usr \ + -DMOCKTAIL_PACKAGE_NAME=mocktail-nightly \ + -DMOCKTAIL_PACKAGE_VERSION_SUFFIX="$MOCKTAIL_PACKAGE_VERSION_SUFFIX" \ -DBUILD_TESTING=OFF cmake --build build-deb --parallel 4 cpack --config build-deb/CPackConfig.cmake \ @@ -167,9 +165,11 @@ jobs: - name: Build RPM shell: bash run: | + nightly_suffix=".nightly.$(git show -s --format=%cd --date=format:%Y%m%d%H%M%S "$GITHUB_SHA").g${GITHUB_SHA:0:8}" docker run --rm \ --volume "$GITHUB_WORKSPACE:/workspace" \ --workdir /workspace \ + --env MOCKTAIL_PACKAGE_VERSION_SUFFIX="$nightly_suffix" \ fedora:44 bash -Eeuo pipefail -c ' dnf install --assumeyes \ gcc-c++ cmake git ninja-build pkgconf-pkg-config rpm-build \ @@ -182,6 +182,8 @@ jobs: cmake -S . -B build-rpm -G Ninja \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/usr \ + -DMOCKTAIL_PACKAGE_NAME=mocktail-nightly \ + -DMOCKTAIL_PACKAGE_VERSION_SUFFIX="$MOCKTAIL_PACKAGE_VERSION_SUFFIX" \ -DBUILD_TESTING=OFF cmake --build build-rpm --parallel 4 cpack --config build-rpm/CPackConfig.cmake \ @@ -243,7 +245,7 @@ jobs: if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request' needs: [appimage, deb, rpm, arch] runs-on: ubuntu-24.04 - timeout-minutes: 15 + timeout-minutes: 30 permissions: contents: write steps: @@ -259,10 +261,8 @@ jobs: path: release merge-multiple: true - - name: Update continuous release + - name: Prepare continuous packages shell: bash - env: - GH_TOKEN: ${{ github.token }} run: | set -Eeuo pipefail mv -- release/*.AppImage release/mocktail-nightly.AppImage @@ -270,6 +270,43 @@ jobs: mv -- release/*.rpm release/mocktail-nightly.rpm mv -- release/*.pkg.tar.zst release/mocktail-nightly.pkg.tar.zst find release -maxdepth 1 -type f -print + + - name: Build package repositories + shell: bash + env: + GH_TOKEN: ${{ github.token }} + FLATPAK_GPG_PRIVATE_KEY: ${{ secrets.FLATPAK_GPG_PRIVATE_KEY }} + FLATPAK_GPG_KEY_ID: ${{ secrets.FLATPAK_GPG_KEY_ID }} + run: | + set -Eeuo pipefail + [[ -n "$FLATPAK_GPG_PRIVATE_KEY" && -n "$FLATPAK_GPG_KEY_ID" ]] + sudo apt-get update + sudo apt-get install --yes --no-install-recommends \ + apt-utils createrepo-c gnupg rpm + install -d stable/deb stable/rpm + stable_tag="$(gh api "repos/$GITHUB_REPOSITORY/releases/latest" --jq .tag_name)" + gh release download "$stable_tag" --pattern '*.deb' --dir stable/deb + gh release download "$stable_tag" --pattern '*.rpm' --dir stable/rpm + mapfile -t stable_debs < <(find stable/deb -maxdepth 1 -type f -name '*.deb' -print) + mapfile -t stable_rpms < <(find stable/rpm -maxdepth 1 -type f -name '*.rpm' -print) + [[ "${#stable_debs[@]}" -eq 1 && "${#stable_rpms[@]}" -eq 1 ]] + install -d -m 0700 "$RUNNER_TEMP/mocktail-native-gnupg" + printf '%s' "$FLATPAK_GPG_PRIVATE_KEY" | \ + gpg --batch --homedir "$RUNNER_TEMP/mocktail-native-gnupg" --import + gpg --batch --homedir "$RUNNER_TEMP/mocktail-native-gnupg" \ + --export "$FLATPAK_GPG_KEY_ID" >mocktail-packages.gpg + ./scripts/assemble_native_repositories.sh \ + "${stable_debs[0]}" release/mocktail-nightly.deb \ + "${stable_rpms[0]}" release/mocktail-nightly.rpm \ + mocktail-packages.gpg "$FLATPAK_GPG_KEY_ID" \ + "$RUNNER_TEMP/mocktail-native-gnupg" native-repositories + + - name: Update continuous release + shell: bash + env: + GH_TOKEN: ${{ github.token }} + run: | + set -Eeuo pipefail git config user.name komaruworld git config user.email rtysus228@gmail.com git tag --force continuous "$GITHUB_SHA" @@ -290,3 +327,11 @@ jobs: ;; esac done < <(gh release view continuous --json assets --jq '.assets[].name') + + - name: Upload package repositories + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: Mocktail-native-repositories + path: native-repositories + if-no-files-found: error + retention-days: 14 diff --git a/CMakeLists.txt b/CMakeLists.txt index b1682a1..e18f27c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -717,7 +717,20 @@ install(CODE " endif() ") -set(CPACK_PACKAGE_NAME "mocktail") +set(MOCKTAIL_PACKAGE_NAME "mocktail" CACHE STRING + "Native package name" +) +set(MOCKTAIL_PACKAGE_VERSION_SUFFIX "" CACHE STRING + "Native package version suffix" +) +if(NOT MOCKTAIL_PACKAGE_NAME STREQUAL "mocktail" AND + NOT MOCKTAIL_PACKAGE_NAME STREQUAL "mocktail-nightly") + message(FATAL_ERROR + "MOCKTAIL_PACKAGE_NAME must be mocktail or mocktail-nightly") +endif() + +set(CPACK_PACKAGE_NAME "${MOCKTAIL_PACKAGE_NAME}") +set(CPACK_PACKAGE_VERSION "${PROJECT_VERSION}${MOCKTAIL_PACKAGE_VERSION_SUFFIX}") set(CPACK_PACKAGE_VENDOR "Mocktail Project") set(CPACK_PACKAGE_CONTACT "komaruworld ") set(CPACK_PACKAGE_HOMEPAGE_URL "https://github.com/komaruworld/mocktail") @@ -739,6 +752,16 @@ set(CPACK_RPM_FILE_NAME RPM-DEFAULT) set(CPACK_RPM_PACKAGE_LICENSE "Apache-2.0") set(CPACK_RPM_PACKAGE_GROUP "Amusements/Games") set(CPACK_RPM_PACKAGE_AUTOREQPROV ON) + +if(MOCKTAIL_PACKAGE_NAME STREQUAL "mocktail-nightly") + set(CPACK_DEBIAN_PACKAGE_CONFLICTS "mocktail") + set(CPACK_DEBIAN_PACKAGE_REPLACES "mocktail") + set(CPACK_RPM_PACKAGE_CONFLICTS "mocktail") +else() + set(CPACK_DEBIAN_PACKAGE_CONFLICTS "mocktail-nightly") + set(CPACK_DEBIAN_PACKAGE_REPLACES "mocktail-nightly") + set(CPACK_RPM_PACKAGE_CONFLICTS "mocktail-nightly") +endif() include(CPack) add_dependencies(mocktail all_stubs) diff --git a/README.md b/README.md index e87fda0..77e633d 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,15 @@ an update fails. ## Install with Flatpak +Install the stable release from Flathub: + +```bash +flatpak install flathub space.bigrat.mocktail +flatpak run space.bigrat.mocktail +``` + +Nightly builds are produced automatically from the latest `main` branch: + ```bash flatpak install --user https://mocktail.bigrat.space/mocktail.flatpakref flatpak run space.bigrat.mocktail @@ -44,6 +53,42 @@ Use `mocktail` instead of `mocktail-git` to build the pinned release from source, or install the stable prebuilt package with `paru -S mocktail-bin` or `yay -S mocktail-bin`. +## Install with DNF + +Fedora 44 users can install either the stable `mocktail` package or the +`mocktail-nightly` package built from `main`: + +```bash +sudo curl -fsSL https://mocktail.bigrat.space/rpm/mocktail.repo \ + -o /etc/yum.repos.d/mocktail.repo +sudo dnf install mocktail +# or +sudo dnf install mocktail-nightly +``` + +## Install with APT + +Ubuntu 26.04 users can install either the stable `mocktail` package or the +`mocktail-nightly` package built from `main`: + +```bash +sudo install -d -m 0755 /etc/apt/keyrings +sudo curl -fsSL https://mocktail.bigrat.space/mocktail-packages.gpg \ + -o /etc/apt/keyrings/mocktail.gpg +echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/mocktail.gpg] https://mocktail.bigrat.space/apt mocktail main" | \ + sudo tee /etc/apt/sources.list.d/mocktail.list >/dev/null +sudo apt update +sudo apt install mocktail +# or +sudo apt install mocktail-nightly +``` + +## Direct downloads + +Direct AppImage, DEB, and RPM downloads are available from the +[Website](https://mocktail.bigrat.space/) and +[GitHub Releases](https://github.com/komaruworld/mocktail/releases). +
Screenshots @@ -55,26 +100,6 @@ source, or install the stable prebuilt package with `paru -S mocktail-bin` or
-## Other Linux packages - -The latest AppImage, DEB, RPM, and Arch packages are attached to the -[continuous release](https://github.com/komaruworld/mocktail/releases/tag/continuous). - -```bash -# AppImage -chmod +x Mocktail-x86_64.AppImage -./Mocktail-x86_64.AppImage - -# Ubuntu/Debian -sudo apt install ./mocktail_*_amd64.deb - -# Fedora -sudo dnf install ./mocktail-*.x86_64.rpm - -# Arch Linux -sudo pacman -U ./mocktail-*-x86_64.pkg.tar.zst -``` - ## Building Only Linux `x86_64` is supported. Building requires CMake 3.20+, Git, diff --git a/scripts/assemble_flatpak_pages.sh b/scripts/assemble_flatpak_pages.sh index c314d80..1cc2b82 100755 --- a/scripts/assemble_flatpak_pages.sh +++ b/scripts/assemble_flatpak_pages.sh @@ -9,7 +9,10 @@ readonly REPOSITORY="${1:?Flatpak repository path is required}" readonly BUNDLE="${2:?Flatpak bundle path is required}" readonly PUBLIC_KEY="${3:?GPG public key path is required}" readonly OUTPUT="${4:?Pages output path is required}" +readonly NATIVE_REPOSITORIES="${5:?Native repositories path is required}" readonly BASE_URL="https://mocktail.bigrat.space" +readonly SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)" +readonly PROJECT_DIR="$(dirname -- "${SCRIPT_DIR}")" [[ -d "${REPOSITORY}" && ! -L "${REPOSITORY}" ]] || { printf 'Flatpak repository is missing or unsafe: %s\n' "${REPOSITORY}" >&2 @@ -23,6 +26,13 @@ readonly BASE_URL="https://mocktail.bigrat.space" printf 'Flatpak public key is missing or unsafe: %s\n' "${PUBLIC_KEY}" >&2 exit 1 } +[[ -d "${NATIVE_REPOSITORIES}/apt" && + -d "${NATIVE_REPOSITORIES}/rpm" && + -d "${NATIVE_REPOSITORIES}/downloads" && + -s "${NATIVE_REPOSITORIES}/mocktail-packages.gpg" ]] || { + printf 'Native repositories are missing: %s\n' "${NATIVE_REPOSITORIES}" >&2 + exit 1 +} [[ ! -e "${OUTPUT}" ]] || { printf 'Pages output already exists: %s\n' "${OUTPUT}" >&2 exit 1 @@ -33,70 +43,47 @@ cp -a -- "${REPOSITORY}" "${OUTPUT}/repo" install -m 0644 -- "${BUNDLE}" "${OUTPUT}/Mocktail-x86_64.flatpak" install -m 0644 -- "${PUBLIC_KEY}" "${OUTPUT}/mocktail-flatpak.gpg" install -m 0644 -- \ - "$(dirname -- "${BASH_SOURCE[0]}")/../packaging/space.bigrat.mocktail.svg" \ + "${PROJECT_DIR}/packaging/space.bigrat.mocktail.svg" \ "${OUTPUT}/mocktail.svg" install -m 0644 -- \ - "$(dirname -- "${BASH_SOURCE[0]}")/../packaging/discord-join.html" \ + "${PROJECT_DIR}/packaging/discord-join.html" \ "${OUTPUT}/join.html" +install -m 0644 -- "${PROJECT_DIR}/site/index.html" "${OUTPUT}/index.html" +install -m 0644 -- "${PROJECT_DIR}/site/styles.css" "${OUTPUT}/styles.css" +install -d -- "${OUTPUT}/packaging" +install -m 0644 -- \ + "${PROJECT_DIR}/packaging/space.bigrat.mocktail.svg" \ + "${OUTPUT}/packaging/space.bigrat.mocktail.svg" +cp -a -- "${NATIVE_REPOSITORIES}/apt" "${OUTPUT}/apt" +cp -a -- "${NATIVE_REPOSITORIES}/rpm" "${OUTPUT}/rpm" +cp -a -- "${NATIVE_REPOSITORIES}/downloads" "${OUTPUT}/downloads" +install -m 0644 -- \ + "${NATIVE_REPOSITORIES}/mocktail-packages.gpg" \ + "${OUTPUT}/mocktail-packages.gpg" readonly GPG_KEY="$(base64 --wrap=0 "${PUBLIC_KEY}")" cat >"${OUTPUT}/mocktail.flatpakrepo" <"${OUTPUT}/mocktail.flatpakref" <"${OUTPUT}/index.html" <<'EOF' - - - - - - - Mocktail for Linux - - -
- Mocktail logo -

Mocktail

-

Signed development Flatpak builds for Linux x86_64.

- Install with Flatpak - Source - flatpak install --user https://mocktail.bigrat.space/mocktail.flatpakref -

Mocktail is an independent community project and is not affiliated with Roblox Corporation.

-
- -EOF diff --git a/scripts/assemble_native_repositories.sh b/scripts/assemble_native_repositories.sh new file mode 100755 index 0000000..eebe44a --- /dev/null +++ b/scripts/assemble_native_repositories.sh @@ -0,0 +1,110 @@ +#!/usr/bin/env bash +# Copyright 2026 Mocktail Project Authors +# SPDX-License-Identifier: Apache-2.0 + +set -Eeuo pipefail +umask 022 + +readonly STABLE_DEB="${1:?Stable DEB path is required}" +readonly NIGHTLY_DEB="${2:?Nightly DEB path is required}" +readonly STABLE_RPM="${3:?Stable RPM path is required}" +readonly NIGHTLY_RPM="${4:?Nightly RPM path is required}" +readonly PUBLIC_KEY="${5:?GPG public key path is required}" +readonly GPG_KEY_ID="${6:?GPG key ID is required}" +readonly GPG_HOME="${7:?GPG home path is required}" +readonly OUTPUT="${8:?Repository output path is required}" +readonly BASE_URL="https://mocktail.bigrat.space" + +for command in apt-ftparchive createrepo_c dpkg-deb gpg gzip rpm rpmsign; do + command -v "${command}" >/dev/null || { + printf 'Required command is missing: %s\n' "${command}" >&2 + exit 1 + } +done + +for package in "${STABLE_DEB}" "${NIGHTLY_DEB}" \ + "${STABLE_RPM}" "${NIGHTLY_RPM}"; do + [[ -s "${package}" && ! -L "${package}" ]] || { + printf 'Package is missing or unsafe: %s\n' "${package}" >&2 + exit 1 + } +done + +[[ -s "${PUBLIC_KEY}" && ! -L "${PUBLIC_KEY}" ]] || { + printf 'GPG public key is missing or unsafe: %s\n' "${PUBLIC_KEY}" >&2 + exit 1 +} +[[ -d "${GPG_HOME}" && ! -L "${GPG_HOME}" ]] || { + printf 'GPG home is missing or unsafe: %s\n' "${GPG_HOME}" >&2 + exit 1 +} +[[ ! -e "${OUTPUT}" ]] || { + printf 'Repository output already exists: %s\n' "${OUTPUT}" >&2 + exit 1 +} + +[[ "$(dpkg-deb --field "${STABLE_DEB}" Package)" == mocktail ]] +[[ "$(dpkg-deb --field "${NIGHTLY_DEB}" Package)" == mocktail-nightly ]] +[[ "$(rpm --query --package --queryformat '%{NAME}' "${STABLE_RPM}")" == mocktail ]] +[[ "$(rpm --query --package --queryformat '%{NAME}' "${NIGHTLY_RPM}")" == mocktail-nightly ]] + +readonly APT_ROOT="${OUTPUT}/apt" +readonly APT_POOL="${APT_ROOT}/pool/main/m/mocktail" +readonly APT_DIST="${APT_ROOT}/dists/mocktail" +readonly RPM_ROOT="${OUTPUT}/rpm/x86_64" +readonly DOWNLOADS="${OUTPUT}/downloads" + +install -d -- \ + "${APT_POOL}" "${APT_DIST}/main/binary-amd64" "${RPM_ROOT}" "${DOWNLOADS}" +install -m 0644 -- "${STABLE_DEB}" "${APT_POOL}/$(basename -- "${STABLE_DEB}")" +install -m 0644 -- "${NIGHTLY_DEB}" "${APT_POOL}/$(basename -- "${NIGHTLY_DEB}")" +install -m 0644 -- "${STABLE_RPM}" "${RPM_ROOT}/$(basename -- "${STABLE_RPM}")" +install -m 0644 -- "${NIGHTLY_RPM}" "${RPM_ROOT}/$(basename -- "${NIGHTLY_RPM}")" +install -m 0644 -- "${STABLE_DEB}" "${DOWNLOADS}/mocktail.deb" +install -m 0644 -- "${STABLE_RPM}" "${DOWNLOADS}/mocktail.rpm" +install -m 0644 -- "${PUBLIC_KEY}" "${OUTPUT}/mocktail-packages.gpg" + +( + cd -- "${APT_ROOT}" + apt-ftparchive packages pool/main >dists/mocktail/main/binary-amd64/Packages + gzip -9n -c dists/mocktail/main/binary-amd64/Packages \ + >dists/mocktail/main/binary-amd64/Packages.gz + apt-ftparchive \ + -o APT::FTPArchive::Release::Origin=Mocktail \ + -o APT::FTPArchive::Release::Label=Mocktail \ + -o APT::FTPArchive::Release::Suite=mocktail \ + -o APT::FTPArchive::Release::Codename=mocktail \ + -o APT::FTPArchive::Release::Architectures=amd64 \ + -o APT::FTPArchive::Release::Components=main \ + release dists/mocktail >dists/mocktail/Release +) + +gpg --batch --yes --homedir "${GPG_HOME}" --local-user "${GPG_KEY_ID}" \ + --digest-algo SHA256 --clearsign \ + --output "${APT_DIST}/InRelease" "${APT_DIST}/Release" +gpg --batch --yes --homedir "${GPG_HOME}" --local-user "${GPG_KEY_ID}" \ + --digest-algo SHA256 --armor --detach-sign \ + --output "${APT_DIST}/Release.gpg" "${APT_DIST}/Release" + +for package in "${RPM_ROOT}"/*.rpm; do + GNUPGHOME="${GPG_HOME}" rpmsign --addsign \ + --define "_gpg_name ${GPG_KEY_ID}" \ + --define "_gpg_path ${GPG_HOME}" \ + "${package}" +done + +createrepo_c "${RPM_ROOT}" +gpg --batch --yes --homedir "${GPG_HOME}" --local-user "${GPG_KEY_ID}" \ + --digest-algo SHA256 --armor --detach-sign \ + --output "${RPM_ROOT}/repodata/repomd.xml.asc" \ + "${RPM_ROOT}/repodata/repomd.xml" + +cat >"${OUTPUT}/rpm/mocktail.repo" < + + + + + + Mocktail for Linux + + +
+ Mocktail logo +

Mocktail

+

Play Roblox on Linux. Use the stable Flathub release, or try the latest nightly build from main.

+ Stable on Flathub + Nightly build +
+

Stable

+ flatpak install flathub space.bigrat.mocktail +

Nightly

+ flatpak install --user https://mocktail.bigrat.space/mocktail.flatpakref +
+

AUR packages

+

Available from the AUR. Choose one package:

+ + yay -S mocktail +yay -S mocktail-bin +yay -S mocktail-git +

DNF repository

+

Stable and nightly packages for Fedora 44. Choose one package.

+ sudo curl -fsSL https://mocktail.bigrat.space/rpm/mocktail.repo -o /etc/yum.repos.d/mocktail.repo +
+

Stable

+ sudo dnf install mocktail +

Nightly

+ sudo dnf install mocktail-nightly +
+

APT repository

+

Stable and nightly packages for Ubuntu 26.04. Choose one package.

+ sudo install -d -m 0755 /etc/apt/keyrings +sudo curl -fsSL https://mocktail.bigrat.space/mocktail-packages.gpg -o /etc/apt/keyrings/mocktail.gpg +echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/mocktail.gpg] https://mocktail.bigrat.space/apt mocktail main" | sudo tee /etc/apt/sources.list.d/mocktail.list >/dev/null +sudo apt update +
+

Stable

+ sudo apt install mocktail +

Nightly

+ sudo apt install mocktail-nightly +
+

Direct downloads

+

Prebuilt packages for Linux x86_64.

+

Stable

+ +

Nightly

+ +

Source code

+

Mocktail is an independent community project and is not affiliated with Roblox Corporation.

+
+ diff --git a/site/styles.css b/site/styles.css new file mode 100644 index 0000000..2d55c8d --- /dev/null +++ b/site/styles.css @@ -0,0 +1,88 @@ +:root { + font: 17px/1.55 system-ui, sans-serif; + color-scheme: dark; +} + +body { + margin: 0; + background: #0d1117; + color: #e6edf3; +} + +main { + max-width: 680px; + margin: 12vh auto; + padding: 32px; +} + +img { + width: 88px; + height: 88px; +} + +h1 { + margin: .2rem 0; + font-size: clamp(2.5rem, 8vw, 4.5rem); +} + +h2 { + margin: 32px 0 0; + font-size: 1.15rem; +} + +p { + color: #9da7b3; +} + +a.button { + display: inline-block; + margin: 16px 8px 16px 0; + padding: 12px 18px; + border-radius: 9px; + background: #238636; + color: white; + font-weight: 700; + text-decoration: none; +} + +a.secondary { + background: #21262d; +} + +.commands { + margin-top: 10px; +} + +.commands p, +.download-label { + margin: 14px 0 5px; + color: #e6edf3; + font-size: .82rem; + font-weight: 700; + letter-spacing: .04em; + text-transform: uppercase; +} + +code { + display: block; + padding: 14px; + overflow-wrap: anywhere; + border: 1px solid #30363d; + border-radius: 6px; + background: #161b22; + white-space: pre-wrap; +} + +.links { + margin: 10px 0 14px; +} + +.links a { + display: inline-block; + margin: 0 14px 6px 0; + color: #e6edf3; +} + +a.source { + color: #e6edf3; +}