summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLucas Melo2021-01-20 16:24:41 -0300
committerLucas Melo2021-01-20 16:24:41 -0300
commitaf639fe98c626cd00dafdb69c6e1756e04f949ee (patch)
tree727e6ca69a7384f8f610a9e37def36a9ed245489
downloadaur-af639fe98c626cd00dafdb69c6e1756e04f949ee.tar.gz
First commit.
-rw-r--r--.SRCINFO23
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD39
-rwxr-xr-xsoniccd-launcher26
-rw-r--r--soniccd.desktop6
-rw-r--r--soniccd.install5
6 files changed, 103 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..cc83fca56ba7
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,23 @@
+pkgbase = soniccd-git
+ pkgdesc = A full decompilation of Sonic CD 2011, based on the PC remake with improvements & tweaks from the mobile remakes.
+ pkgver = r143.e0b421d
+ pkgrel = 1
+ url = https://github.com/Rubberduckycooly/Sonic-CD-11-Decompilation
+ install = soniccd.install
+ arch = any
+ license = reverse-engineered and unlicensed
+ makedepends = git
+ depends = sdl2
+ depends = libogg
+ depends = libtheora
+ depends = libvorbis
+ provides = soniccd
+ source = git+https://github.com/Rubberduckycooly/Sonic-CD-11-Decompilation.git
+ source = soniccd-launcher
+ source = soniccd.desktop
+ sha256sums = SKIP
+ sha256sums = 55621606d74d3fa04d7ae0046ac88623648c587dae2b6addd1e081a587f6fe6d
+ sha256sums = 5ef3e25f5391707fdc461a8c25817ddde38a1d34d125dc5b3c43f706b889ed8a
+
+pkgname = soniccd-git
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..b5e38c5129ce
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+/pkg/
+/src/
+/Sonic-CD-11-Decompilation/
+/*.tar.zst
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..c2e906a98735
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,39 @@
+# Maintainer: Lucas Melo <luluco250 at gmail dot com>
+
+pkgname=soniccd-git
+pkgver=r143.e0b421d
+pkgrel=1
+pkgdesc='A full decompilation of Sonic CD 2011, based on the PC remake with
+improvements & tweaks from the mobile remakes.'
+arch=('any')
+url='https://github.com/Rubberduckycooly/Sonic-CD-11-Decompilation'
+license=('reverse-engineered and unlicensed')
+makedepends=('git')
+depends=('sdl2' 'libogg' 'libtheora' 'libvorbis')
+provides=(soniccd)
+source=(
+ "git+${url}.git"
+ 'soniccd-launcher'
+ 'soniccd.desktop')
+sha256sums=(
+ 'SKIP'
+ '55621606d74d3fa04d7ae0046ac88623648c587dae2b6addd1e081a587f6fe6d'
+ '5ef3e25f5391707fdc461a8c25817ddde38a1d34d125dc5b3c43f706b889ed8a')
+install=soniccd.install
+
+pkgver() {
+ cd "$srcdir/Sonic-CD-11-Decompilation"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+build() {
+ cd "$srcdir/Sonic-CD-11-Decompilation"
+ make ${MAKEFLAGS:--j$(nproc)}
+}
+
+package() {
+ install -Dm755 soniccd-launcher "$pkgdir/usr/bin/soniccd-launcher"
+ install -Dm644 soniccd.desktop "$pkgdir/usr/share/applications/soniccd.desktop"
+ cd "$srcdir/Sonic-CD-11-Decompilation"
+ install -Dm755 soniccd "$pkgdir/usr/bin/soniccd"
+}
diff --git a/soniccd-launcher b/soniccd-launcher
new file mode 100755
index 000000000000..1f41fc85e9fd
--- /dev/null
+++ b/soniccd-launcher
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+# Get the XDG data home or default if not set, then append a 'soniccd' folder.
+data_folder="${XDG_DATA_HOME:-${HOME}/.local/share}/soniccd"
+
+# Check if it exists, if not, create it and exit with error code 1.
+if [[ ! -d "$data_folder" ]]; then
+ mkdir -p "$data_folder"
+ echo "Created data folder in '$data_folder', please copy the game's data" \
+"files there and run this launcher again."
+ exit 1
+fi
+
+# Check if the user forgot to copy data files, if not exit with error code 1.
+#
+# If we don't do this check, the game will still create the settings and save
+# files, but not run (nor set an error code), which can be confusing to the
+# end user.
+if [[ -z "$(ls -A $data_folder)" ]]; then
+ echo "Data folder appears to be empty, please copy the game's data files" \
+"and run this launcher again."
+ exit 1
+fi
+
+cd "$data_folder"
+/usr/bin/soniccd
diff --git a/soniccd.desktop b/soniccd.desktop
new file mode 100644
index 000000000000..7a1798cd8170
--- /dev/null
+++ b/soniccd.desktop
@@ -0,0 +1,6 @@
+[Desktop Entry]
+Name=Sonic CD
+Exec=soniccd-launcher
+Icon=applications-games
+Type=Application
+Categories=Game
diff --git a/soniccd.install b/soniccd.install
new file mode 100644
index 000000000000..0789c2159a62
--- /dev/null
+++ b/soniccd.install
@@ -0,0 +1,5 @@
+post_install() {
+ echo 'Use soniccd-launcher to create the data folder inside your home '\
+"folder, copy the game's data files to it and then run it again to launch the "\
+'game.'
+}