Skip to content

Commit

Permalink
Makefile: add gm2xpkg rule
Browse files Browse the repository at this point in the history
Create pkg.cfg
  • Loading branch information
Apaczer committed Aug 19, 2024
1 parent 220e60b commit 5ada9dd
Show file tree
Hide file tree
Showing 9 changed files with 83 additions and 16 deletions.
9 changes: 7 additions & 2 deletions Makefile.miyoo
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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 ..
Expand All @@ -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)
Expand Down
8 changes: 1 addition & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 5 additions & 2 deletions opkg_assets/CONTROL/control
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions opkg_assets/CONTROL/postinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
sync; echo 'Installation finished.'; echo 'Restarting uae4all..'; sleep 1; killall uae4all; exit 0
2 changes: 2 additions & 0 deletions opkg_assets/CONTROL/preinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
sync; echo 'Installing new uae4all..'; rm /var/lib/opkg/info/uae4all.list; exit 0
Empty file removed opkg_assets/aliases.txt
Empty file.
5 changes: 0 additions & 5 deletions opkg_assets/uae4all.lnk

This file was deleted.

61 changes: 61 additions & 0 deletions pkg.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# NOTES:
## All variable values should be enclosed within double quotes: "<value>"
## 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 (<path>/<file_name>)
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 <target_name>.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 <file_name> 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"
5 changes: 5 additions & 0 deletions uae4all.lnk
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 5ada9dd

Please sign in to comment.