From 5ada9ddbf1d2ad4b87f410a5fcff7a1dd27680cb Mon Sep 17 00:00:00 2001 From: Apaczer <94932128+Apaczer@users.noreply.github.com> Date: Mon, 19 Aug 2024 22:44:18 +0200 Subject: [PATCH] Makefile: add gm2xpkg rule Create pkg.cfg --- Makefile.miyoo | 9 ++++-- README.md | 8 +---- opkg_assets/CONTROL/control | 7 +++-- opkg_assets/CONTROL/postinst | 2 ++ opkg_assets/CONTROL/preinst | 2 ++ opkg_assets/aliases.txt | 0 opkg_assets/uae4all.lnk | 5 --- pkg.cfg | 61 ++++++++++++++++++++++++++++++++++++ uae4all.lnk | 5 +++ 9 files changed, 83 insertions(+), 16 deletions(-) create mode 100644 opkg_assets/CONTROL/postinst create mode 100644 opkg_assets/CONTROL/preinst delete mode 100644 opkg_assets/aliases.txt delete mode 100644 opkg_assets/uae4all.lnk create mode 100644 pkg.cfg create mode 100644 uae4all.lnk diff --git a/Makefile.miyoo b/Makefile.miyoo index 5ef4ea1..cb0fef2 100644 --- a/Makefile.miyoo +++ b/Makefile.miyoo @@ -33,7 +33,9 @@ all: $(PROG) # Possible values : 0, YES, APPLY PROFILE = 0 +## either FAME or UAE #FAME_CORE=1 +## use 7z savestate compression for *.asf files #LIB7Z=1 HOME_DIR=1 @@ -225,8 +227,8 @@ package: $(PROG) @mkdir -p $(RELEASEDIR)/mnt/gmenu2x/sections/$(SECTION) @mv $(RELEASEDIR)/*$(TARGET) $(RELEASEDIR)/mnt/$(DESTDIR)/$(TARGET)/ @cp -r $(ASSETSDIR)/* $(RELEASEDIR)/mnt/$(DESTDIR)/$(TARGET) - @cp $(OPKG_ASSETSDIR)/$(LINK) $(RELEASEDIR)/mnt/gmenu2x/sections/$(SECTION) - @cp $(OPKG_ASSETSDIR)/$(ALIASES) $(RELEASEDIR)/mnt/$(DESTDIR)/$(TARGET) + @cp $(LINK) $(RELEASEDIR)/mnt/gmenu2x/sections/$(SECTION) + -@cp $(OPKG_ASSETSDIR)/$(ALIASES) $(RELEASEDIR)/mnt/$(DESTDIR)/$(TARGET) zip: package @cd $(RELEASEDIR) && zip -rq $(TARGET)$(VERSION).zip ./* && mv *.zip .. @@ -243,6 +245,9 @@ ipk: package @ar r $(TARGET).ipk $(RELEASEDIR)/control.tar.gz $(RELEASEDIR)/data.tar.gz $(RELEASEDIR)/debian-binary @rm -rf $(RELEASEDIR) +gm2xpkg-ipk: $(PROG) + gm2xpkg -i pkg.cfg + opk: $(PROG) mkdir -p $(RELEASEDIR) cp $(PROG) $(RELEASEDIR) diff --git a/README.md b/README.md index 194e6a8..af3a034 100644 --- a/README.md +++ b/README.md @@ -26,13 +26,7 @@ This revision replaces FAME m68k emulation library with UAE core. Major advantag - compatibility increase (revert from FAME m68k library to UAE core, may introduce slight performance drawback) speed) ## Compiling instructions -1. Set up your environment with @steward-fu toolchain (preferably in Debian 9 distro): -``` -$ cd -$ wget https://github.com/steward-fu/miyoo/releases/download/v1.0/toolchain.7z -$ 7za x toolchain.7z -$ sudo cp -a miyoo /opt/ -``` +1. Set up your environment with current MiyooCFW toolchain (preferably in Debian 9 distro) 2. Copy this repo & compile ``` git clone https://github.com/Apaczer/uae4all diff --git a/opkg_assets/CONTROL/control b/opkg_assets/CONTROL/control index 8b510fa..98f7aee 100644 --- a/opkg_assets/CONTROL/control +++ b/opkg_assets/CONTROL/control @@ -1,7 +1,10 @@ Package: uae4all -Version: 1.1 +Version: rev1.1a +Depends: +Source: https://github.com/Apaczer/uae4all +License: GPL-2.0 Description: AMIGA 500 OCS 1MB emulator Section: emulators Priority: optional -Maintainer: Apacz +Maintainer: Apaczer Architecture: arm diff --git a/opkg_assets/CONTROL/postinst b/opkg_assets/CONTROL/postinst new file mode 100644 index 0000000..26c8253 --- /dev/null +++ b/opkg_assets/CONTROL/postinst @@ -0,0 +1,2 @@ +#!/bin/sh +sync; echo 'Installation finished.'; echo 'Restarting uae4all..'; sleep 1; killall uae4all; exit 0 diff --git a/opkg_assets/CONTROL/preinst b/opkg_assets/CONTROL/preinst new file mode 100644 index 0000000..fab8277 --- /dev/null +++ b/opkg_assets/CONTROL/preinst @@ -0,0 +1,2 @@ +#!/bin/sh +sync; echo 'Installing new uae4all..'; rm /var/lib/opkg/info/uae4all.list; exit 0 diff --git a/opkg_assets/aliases.txt b/opkg_assets/aliases.txt deleted file mode 100644 index e69de29..0000000 diff --git a/opkg_assets/uae4all.lnk b/opkg_assets/uae4all.lnk deleted file mode 100644 index c0985e0..0000000 --- a/opkg_assets/uae4all.lnk +++ /dev/null @@ -1,5 +0,0 @@ -title=AMIGA -description=COMMODORE AMIGA-500 OCS/1MB Emulator -exec=/mnt/emus/uae4all/uae4all -selectordir=/mnt/roms/AMIGA -selectorfilter=.adf diff --git a/pkg.cfg b/pkg.cfg new file mode 100644 index 0000000..3eae040 --- /dev/null +++ b/pkg.cfg @@ -0,0 +1,61 @@ +# NOTES: +## All variable values should be enclosed within double quotes: "" +## CONFIGURATION FILE for `gm2xpkg` script version: +PKGVER="0.7" + +# EXEC commands (set to "1" anyone for desired outcome), you can instead use [OPTIONS] of `gm2xpkg`: +PACKAGE="" +ZIP="" +IPK="" +CLEAN="" + +# VERBOSE mode (insert "yes" to have more info) +VERBOSE="" + +# ENV VAR. +## Specific (mandatory to provide!) +TARGET="uae4all" # [fullpath], replace with target's binary fullpath (/) +VERSION="rev1.1a" # [string], replace with correct release version if exist of target + +## Generic - common to all apps (better to not modify) +HOMEPATH="" # [path], target device home directory for installation process +RELEASEDIR="" # [path], host package output directory, specified with [-p] option +ASSETSDIR="" # [path], host dir containg all the necessary assets for a target +OPKG_ASSETSDIR="" # [path], host dir containg the ./CONTROL directory with [control, preinst, postinst] files, auto-generated if not provided (warning: it may be removed with CLEAN=1) +LINK="" # [fullpath], host path to gm2x link, modify if exec binary name may be different from target name (warning: it may be removed with CLEAN=1) +ALIASES="" # [fullpath], host path to *.txt file holding new names for selector e.g. old_title=new_title +MANUAL="opk_data/readme.man.txt" # [fullpath], host path to *.man.txt file holding usage description of target app + +## Link entries (better modify if no .lnk file provided) +### Primary +TITLE="UAE4All" # [string], program title +DESCRI="AMIGA 500 OCS 1MB emulator" # [string], short description +DESTDIR="emus" # [string], (default="apps") installation pathname in target device $HOMEPATH directory - not a link entry +SECTION="emulators" # [string], (default="applications") section in menu +### Additional +SELDIR="/mnt/roms/AMIGA/" # [path], target device search directory (activates selector, don't append path with "/" to use AUTO selectorelement mode) +SELBROWSER="" # [bool], (default="true") don't show directories in selector browser with "false" - aka "Show Folders" option +SELFILTER=".adf,.adh,.zip" # [string], activates FileFilter in selector e.g. =".gba,.zip" +SELSCREENS="" # [path], target Boxarts' directory in selector +ICON="" # [fullpath], target path to icon being used in menu (instead of default) +BACKDROP="" # [fullpath], target path to backdrop being displayed under icon in menu (default="" thus OFF) +PARAMS="" # [string], parameters (options; args) being passed to execution cmd +### HW Specific +CLOCK="" # [int], CPU frequency in MHz +LAYOUT="" # [int], SDL Keyboard (face buttons) layout +TEFIX="" # [int], Tearing FIX method + +## Custom entries (if needed then modify) +TARGET_DIR="" # [path], target device install directory $HOMEPATH/$DESTDIR/$TARGET_DIR of executable binary (default TARGET_DIR=$(basename $TARGET)) +TARGET_EXEC="" # [string], the executable that's being used by frontend when running an app, for e.g. may be a custom script (default TARGET_EXEC=$(basename $TARGET)) +DOCS=("docs/CREDITS" "docs/COPYING") # [array] of fullpaths to extra text files e.g. =("docs/LICENSE" "CHANGELOG" "CONTRIBUTORS") which will be copied & converted to *.txt files for ease of use by frontend and placed in $TARGET_DIR + +## IPK control entries (if needed then modify) +PRIORITY="" +MAINTAINER="Apaczer" +CONFFILES="" +ARCH="" # default=arm - do not modify for ARM chips +# CONTROL= # automated output of *.ipk control config file +DEPENDS="" # list of dependency packages e.g. ="sdl, libpng" or ="sdl (>= 2.9.2), sdl_mixer (= ed76d39cda0735d26c14a3e4f4da996e420f6478)" provide only for shared libs build, otherwise ignored (run "readelf -d $TARGET | grep NEEDED" to bisect) +SOURCE="https://github.com/Apaczer/uae4all" +LICENSE="GPL-2.0" diff --git a/uae4all.lnk b/uae4all.lnk new file mode 100644 index 0000000..c711009 --- /dev/null +++ b/uae4all.lnk @@ -0,0 +1,5 @@ +title=UAE4All +description=AMIGA 500 OCS 1MB emulator +exec=/mnt/emus/uae4all/uae4all +selectordir=/mnt/roms/AMIGA/ +selectorfilter=.adf,.adh,.zip