-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ec51ed8
commit 25b106f
Showing
6 changed files
with
208 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
#!/usr/bin/env bash | ||
set -x | ||
#-------------------------------------------------------# | ||
#Sanity Checks | ||
if [ "${BUILD}" != "YES" ] || \ | ||
[ -z "${BINDIR}" ] || \ | ||
[ -z "${GIT_TERMINAL_PROMPT}" ] || \ | ||
[ -z "${GIT_ASKPASS}" ] || \ | ||
[ -z "${GITHUB_TOKEN}" ] || \ | ||
[ -z "${GITLAB_TOKEN}" ] || \ | ||
[ -z "${HF_REPO_DL}" ] || \ | ||
[ -z "${SYSTMP}" ] || \ | ||
[ -z "${TMPDIRS}" ]; then | ||
#exit | ||
echo -e "\n[+]Skipping Builds...\n" | ||
exit 1 | ||
fi | ||
#-------------------------------------------------------# | ||
|
||
#-------------------------------------------------------# | ||
##Main | ||
export SKIP_BUILD="NO" | ||
#86box : Emulator of x86-based machines. and freedom | ||
export BIN="86box" | ||
export SOURCE_URL="https://github.com/86Box/86Box" | ||
if [ "$SKIP_BUILD" == "NO" ]; then | ||
echo -e "\n\n [+] (Building | Fetching) ${BIN} :: ${SOURCE_URL}\n" | ||
#-------------------------------------------------------# | ||
##Fetch | ||
pushd "$($TMPDIRS)" >/dev/null 2>&1 | ||
OWD="$(realpath .)" && export OWD="${OWD}" | ||
export APP="86box" | ||
export PKG_NAME="${APP}.AppImage" | ||
RELEASE_TAG="$(gh release list --repo "${SOURCE_URL}" --order "desc" --exclude-drafts --exclude-pre-releases --json "tagName" | jq -r '.[0].tagName | gsub("\\s+"; "")' | tr -d '[:space:]')" && export RELEASE_TAG="${RELEASE_TAG}" | ||
timeout 1m eget "${SOURCE_URL}" --asset "Linux" --asset "arm64" --asset "AppImage" "^.zsync" --to "${OWD}/${PKG_NAME}" | ||
#HouseKeeping | ||
if [[ -f "${OWD}/${PKG_NAME}" ]] && [[ $(stat -c%s "${OWD}/${PKG_NAME}") -gt 1024 ]]; then | ||
#Version | ||
PKG_VERSION="$(echo ${RELEASE_TAG})" && export PKG_VERSION="${PKG_VERSION}" | ||
echo "${PKG_VERSION}" > "${BINDIR}/${PKG_NAME}.version" | ||
#Extract | ||
APPIMAGE="${OWD}/${PKG_NAME}" && export APPIMAGE="${APPIMAGE}" && chmod +x "${APPIMAGE}" | ||
"${APPIMAGE}" --appimage-extract >/dev/null && rm -f "${APPIMAGE}" | ||
APPIMAGE_EXTRACT="$(realpath "${OWD}/squashfs-root")" && export APPIMAGE_EXTRACT="${APPIMAGE_EXTRACT}" | ||
#Repack | ||
if [ -d "${APPIMAGE_EXTRACT}" ] && [ "$(find "${APPIMAGE_EXTRACT}" -mindepth 1 -print -quit 2>/dev/null)" ]; then | ||
#Fix Media & Copy | ||
find "${APPIMAGE_EXTRACT}" -maxdepth 1 -type f -iname "*.png" -exec mv -f {} "${APPIMAGE_EXTRACT}/${APP}.png" \; | ||
rsync -achL "${APPIMAGE_EXTRACT}/${APP}.png" "${APPIMAGE_EXTRACT}/.DirIcon" | ||
rsync -achL "${APPIMAGE_EXTRACT}/${APP}.png" "${BINDIR}/${BIN}.icon.png" | ||
rsync -achL "${APPIMAGE_EXTRACT}/.DirIcon" "${BINDIR}/${BIN}.DirIcon" | ||
find "${APPIMAGE_EXTRACT}" -maxdepth 1 -type f -iname "*.desktop" -exec mv -f {} "${APPIMAGE_EXTRACT}/${APP}.desktop" \; | ||
sed "s/Icon=[^ ]*/Icon=${APP}/" -i "${APPIMAGE_EXTRACT}/${APP}.desktop" | ||
rsync -achL "${APPIMAGE_EXTRACT}/${APP}.desktop" "${BINDIR}/${BIN}.desktop" | ||
find "${APPIMAGE_EXTRACT}" -maxdepth 1 -type f -exec chmod "u=rx,go=rx" {} + | ||
ls -lah "${APPIMAGE_EXTRACT}" | ||
#Pack | ||
find "${APPIMAGE_EXTRACT}" -type f -iname "*${APP}*appdata.xml" -delete | ||
cd "${OWD}" && ARCH="$(uname -m)" appimagetool --comp "zstd" \ | ||
--mksquashfs-opt -root-owned \ | ||
--mksquashfs-opt -no-xattrs \ | ||
--mksquashfs-opt -noappend \ | ||
--mksquashfs-opt -b --mksquashfs-opt "1M" \ | ||
--mksquashfs-opt -mkfs-time --mksquashfs-opt "0" \ | ||
--mksquashfs-opt -Xcompression-level --mksquashfs-opt "22" \ | ||
--updateinformation "zsync|${HF_REPO_DL}/${PKG_NAME}.zsync" \ | ||
"${APPIMAGE_EXTRACT}" "${BINDIR}/${PKG_NAME}" | ||
find "${OWD}" -maxdepth 1 -name "*.zsync" -exec rsync -achL "{}" "${BINDIR}" \; | ||
rm -rf "${OWD}" && popd >/dev/null 2>&1 | ||
fi | ||
#Info | ||
find "${BINDIR}" -type f -iname "*${APP}*" -print | xargs -I {} sh -c 'file {}; b3sum {}; sha256sum {}; du -sh {}' | ||
unset APPIMAGE APPIMAGE_EXTRACT OFFSET OWD PKG_NAME RELEASE_TAG SHARE_DIR | ||
fi | ||
fi | ||
LOG_PATH="${BINDIR}/${BIN}.log" && export LOG_PATH="${LOG_PATH}" | ||
#-------------------------------------------------------# | ||
|
||
#-------------------------------------------------------# | ||
##Cleanup | ||
unset APP APPIMAGE APPIMAGE_EXTRACT BUILD_NIX_APPIMAGE DOWNLOAD_URL OFFSET OWD PKG_NAME RELEASE_TAG SHARE_DIR | ||
unset SKIP_BUILD ; export BUILT="YES" | ||
#In case of zig polluted env | ||
unset AR CC CFLAGS CXX CPPFLAGS CXXFLAGS DLLTOOL HOST_CC HOST_CXX LDFLAGS LIBS OBJCOPY RANLIB | ||
#In case of go polluted env | ||
unset GOARCH GOOS CGO_ENABLED CGO_CFLAGS | ||
#PKG Config | ||
unset PKG_CONFIG_PATH PKG_CONFIG_LIBDIR PKG_CONFIG_SYSROOT_DIR PKG_CONFIG_SYSTEM_INCLUDE_PATH PKG_CONFIG_SYSTEM_LIBRARY_PATH | ||
set +x | ||
#-------------------------------------------------------# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#https://github.com/ivan-hc/AM/blob/main/programs/aarch64/86box | ||
name: "86box" | ||
bin_name: "86box" | ||
bins: | ||
- "86box.AppImage" | ||
category: | ||
- "emulator" | ||
- "hypervisor" | ||
description: "Emulator of x86-based machines (AppImage)" | ||
note: "(CI_VERIFIED: https://github.com/86Box/86Box/actions)" | ||
web_url: "https://86box.readthedocs.io" | ||
path: "/" | ||
src_url: "https://github.com/86Box/86Box" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
#!/usr/bin/env bash | ||
set -x | ||
#-------------------------------------------------------# | ||
#Sanity Checks | ||
if [ "${BUILD}" != "YES" ] || \ | ||
[ -z "${BINDIR}" ] || \ | ||
[ -z "${GIT_TERMINAL_PROMPT}" ] || \ | ||
[ -z "${GIT_ASKPASS}" ] || \ | ||
[ -z "${GITHUB_TOKEN}" ] || \ | ||
[ -z "${GITLAB_TOKEN}" ] || \ | ||
[ -z "${HF_REPO_DL}" ] || \ | ||
[ -z "${SYSTMP}" ] || \ | ||
[ -z "${TMPDIRS}" ]; then | ||
#exit | ||
echo -e "\n[+]Skipping Builds...\n" | ||
exit 1 | ||
fi | ||
#-------------------------------------------------------# | ||
|
||
#-------------------------------------------------------# | ||
##Main | ||
export SKIP_BUILD="NO" | ||
#86box : Emulator of x86-based machines. and freedom | ||
export BIN="86box" | ||
export SOURCE_URL="https://github.com/86Box/86Box" | ||
if [ "$SKIP_BUILD" == "NO" ]; then | ||
echo -e "\n\n [+] (Building | Fetching) ${BIN} :: ${SOURCE_URL}\n" | ||
#-------------------------------------------------------# | ||
##Fetch | ||
pushd "$($TMPDIRS)" >/dev/null 2>&1 | ||
OWD="$(realpath .)" && export OWD="${OWD}" | ||
export APP="86box" | ||
export PKG_NAME="${APP}.AppImage" | ||
RELEASE_TAG="$(gh release list --repo "${SOURCE_URL}" --order "desc" --exclude-drafts --exclude-pre-releases --json "tagName" | jq -r '.[0].tagName | gsub("\\s+"; "")' | tr -d '[:space:]')" && export RELEASE_TAG="${RELEASE_TAG}" | ||
timeout 1m eget "${SOURCE_URL}" --asset "Linux" --asset "x86_64" --asset "AppImage" "^.zsync" --to "${OWD}/${PKG_NAME}" | ||
#HouseKeeping | ||
if [[ -f "${OWD}/${PKG_NAME}" ]] && [[ $(stat -c%s "${OWD}/${PKG_NAME}") -gt 1024 ]]; then | ||
#Version | ||
PKG_VERSION="$(echo ${RELEASE_TAG})" && export PKG_VERSION="${PKG_VERSION}" | ||
echo "${PKG_VERSION}" > "${BINDIR}/${PKG_NAME}.version" | ||
#Extract | ||
APPIMAGE="${OWD}/${PKG_NAME}" && export APPIMAGE="${APPIMAGE}" && chmod +x "${APPIMAGE}" | ||
"${APPIMAGE}" --appimage-extract >/dev/null && rm -f "${APPIMAGE}" | ||
APPIMAGE_EXTRACT="$(realpath "${OWD}/squashfs-root")" && export APPIMAGE_EXTRACT="${APPIMAGE_EXTRACT}" | ||
#Repack | ||
if [ -d "${APPIMAGE_EXTRACT}" ] && [ "$(find "${APPIMAGE_EXTRACT}" -mindepth 1 -print -quit 2>/dev/null)" ]; then | ||
#Fix Media & Copy | ||
find "${APPIMAGE_EXTRACT}" -maxdepth 1 -type f -iname "*.png" -exec mv -f {} "${APPIMAGE_EXTRACT}/${APP}.png" \; | ||
rsync -achL "${APPIMAGE_EXTRACT}/${APP}.png" "${APPIMAGE_EXTRACT}/.DirIcon" | ||
rsync -achL "${APPIMAGE_EXTRACT}/${APP}.png" "${BINDIR}/${BIN}.icon.png" | ||
rsync -achL "${APPIMAGE_EXTRACT}/.DirIcon" "${BINDIR}/${BIN}.DirIcon" | ||
find "${APPIMAGE_EXTRACT}" -maxdepth 1 -type f -iname "*.desktop" -exec mv -f {} "${APPIMAGE_EXTRACT}/${APP}.desktop" \; | ||
sed "s/Icon=[^ ]*/Icon=${APP}/" -i "${APPIMAGE_EXTRACT}/${APP}.desktop" | ||
rsync -achL "${APPIMAGE_EXTRACT}/${APP}.desktop" "${BINDIR}/${BIN}.desktop" | ||
find "${APPIMAGE_EXTRACT}" -maxdepth 1 -type f -exec chmod "u=rx,go=rx" {} + | ||
ls -lah "${APPIMAGE_EXTRACT}" | ||
#Pack | ||
find "${APPIMAGE_EXTRACT}" -type f -iname "*${APP}*appdata.xml" -delete | ||
cd "${OWD}" && ARCH="$(uname -m)" appimagetool --comp "zstd" \ | ||
--mksquashfs-opt -root-owned \ | ||
--mksquashfs-opt -no-xattrs \ | ||
--mksquashfs-opt -noappend \ | ||
--mksquashfs-opt -b --mksquashfs-opt "1M" \ | ||
--mksquashfs-opt -mkfs-time --mksquashfs-opt "0" \ | ||
--mksquashfs-opt -Xcompression-level --mksquashfs-opt "22" \ | ||
--updateinformation "zsync|${HF_REPO_DL}/${PKG_NAME}.zsync" \ | ||
"${APPIMAGE_EXTRACT}" "${BINDIR}/${PKG_NAME}" | ||
find "${OWD}" -maxdepth 1 -name "*.zsync" -exec rsync -achL "{}" "${BINDIR}" \; | ||
rm -rf "${OWD}" && popd >/dev/null 2>&1 | ||
fi | ||
#Info | ||
find "${BINDIR}" -type f -iname "*${APP}*" -print | xargs -I {} sh -c 'file {}; b3sum {}; sha256sum {}; du -sh {}' | ||
unset APPIMAGE APPIMAGE_EXTRACT OFFSET OWD PKG_NAME RELEASE_TAG SHARE_DIR | ||
fi | ||
fi | ||
LOG_PATH="${BINDIR}/${BIN}.log" && export LOG_PATH="${LOG_PATH}" | ||
#-------------------------------------------------------# | ||
|
||
#-------------------------------------------------------# | ||
##Cleanup | ||
unset APP APPIMAGE APPIMAGE_EXTRACT BUILD_NIX_APPIMAGE DOWNLOAD_URL OFFSET OWD PKG_NAME RELEASE_TAG SHARE_DIR | ||
unset SKIP_BUILD ; export BUILT="YES" | ||
#In case of zig polluted env | ||
unset AR CC CFLAGS CXX CPPFLAGS CXXFLAGS DLLTOOL HOST_CC HOST_CXX LDFLAGS LIBS OBJCOPY RANLIB | ||
#In case of go polluted env | ||
unset GOARCH GOOS CGO_ENABLED CGO_CFLAGS | ||
#PKG Config | ||
unset PKG_CONFIG_PATH PKG_CONFIG_LIBDIR PKG_CONFIG_SYSROOT_DIR PKG_CONFIG_SYSTEM_INCLUDE_PATH PKG_CONFIG_SYSTEM_LIBRARY_PATH | ||
set +x | ||
#-------------------------------------------------------# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#https://github.com/ivan-hc/AM/blob/main/programs/x86_64/86box | ||
name: "86box" | ||
bin_name: "86box" | ||
bins: | ||
- "86box.AppImage" | ||
category: | ||
- "emulator" | ||
- "hypervisor" | ||
description: "Emulator of x86-based machines (AppImage)" | ||
note: "(CI_VERIFIED: https://github.com/86Box/86Box/actions)" | ||
web_url: "https://86box.readthedocs.io" | ||
path: "/" | ||
src_url: "https://github.com/86Box/86Box" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters