commit 6af1ec9cea94a9a1652a0be0215fe9dfdc80a37d Author: askiiart Date: Mon Mar 10 12:58:41 2025 -0500 initial commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/fjord-launcher-unlocked.spec b/fjord-launcher-unlocked.spec new file mode 100644 index 0000000..05eff47 --- /dev/null +++ b/fjord-launcher-unlocked.spec @@ -0,0 +1,39 @@ +Name: fjord-launcher-unlocked +Version: 6.6.6 +Release: %autorelease +Summary: Prism Launcher fork with support for alternative auth servers (unlocked) + +License: GPL-3.0-only +URL: https://github.com/hero-persson/FjordLauncherUnlocked + +BuildRequires: tar zstd + +%description +A Prism Launcher fork with support for alternative auth servers (unlocked) + +%prep +program_name="fjord-launcher-unlocked" +tar --zstd -xf ${COMPILED_DIR:-/compiled}/$program_name/$program_name.tar.zst --one-top-level + +%install +cd ./$program_name/ +mkdir -p %{buildroot}%{_bindir} +mkdir -p %{buildroot}%{_datadir} +cp ./usr/bin/fjordlauncher %{buildroot}%{_bindir}/cavif +cp -r ./usr/share/* %{buildroot}%{_datadir} + +%files +%{_datadir}/FjordLauncher/qtlogging.ini +%{_datadir}/FjordLauncher/NewLaunchLegacy.jar +%{_datadir}/FjordLauncher/NewLaunch.jar +%{_datadir}/FjordLauncher/JavaCheck.jar +%{_datadir}/applications/org.unmojang.FjordLauncher.desktop +%{_datadir}/mime/packages/modrinth-mrpack-mime.xml +%{_datadir}/qlogging-categories6/fjordlauncher.categories +%{_datadir}/metainfo/org.unmojang.FjordLauncher.metainfo.xml +%{_datadir}/icons/hicolor/scalable/apps/org.unmojang.FjordLauncher.svg +%{_bindir}/fjordlauncher + +%changelog +* Mon Mar 10 2025 askiiart +- Initial version \ No newline at end of file diff --git a/run.sh b/run.sh new file mode 100644 index 0000000..4dcca0a --- /dev/null +++ b/run.sh @@ -0,0 +1,42 @@ +#!/usr/bin/env bash +set -euo pipefail + +program_name="fjord-launcher-unlocked" + +built_dir=${COMPILED_DIR:-/compiled}/cavif +version=$(cat $built_dir/version) +repo_dir=${REPO_DIR:-/repo} + +# skip if already up-to-date +# TODO: use the repo instead and check the version with dnf +# yeah this is bad; see also the cavif-aaaaaa thing below +touch $repo_dir/$program_name-tmp +if $(ls $repo_dir/$program_name-* | grep -q "$version"); then + rm $repo_dir/$program_name-tmp + echo "package is already up to date, exiting" + exit +fi +rm $repo_dir/$program_name-tmp + +# prep +dnf install fedora-packager rpmdevtools createrepo_c -y +rpmdev-setuptree + +sed -i "s/Version:.*/Version: $version/g" $program_name.spec + +# build package and move to the repo +rpmbuild -bb cavif.spec +mv ~/rpmbuild/RPMS/x86_64/cavif-$version-* $repo_dir/ + +# remove old versions +cd $repo_dir +# this is the easiest way to make sure it doesn't just fail because no fjord-launcher-unlocked-* exists +# (which only happens on first run) +touch $program_name-0.rpm +rm $(ls $program_name-*.rpm | sort --version-sort | sed '$d') +rm $program_name-0.rpm || true + +# update repo +createrepo_c . + +echo "package is at $repo_dir/$(ls $repo_dir/$program_name-*.rpm)" \ No newline at end of file