diff --git a/.github/scripts/aarch64-Linux/pkgs/inkscape.sh b/.github/scripts/aarch64-Linux/pkgs/inkscape.sh index a1c937cb..df11c72f 100644 --- a/.github/scripts/aarch64-Linux/pkgs/inkscape.sh +++ b/.github/scripts/aarch64-Linux/pkgs/inkscape.sh @@ -188,6 +188,7 @@ if [ "${SKIP_BUILD}" == "NO" ]; then rsync -achL "${APPIMAGE_EXTRACT}/.DirIcon" "${BINDIR}/${BIN}.DirIcon" rsync -achL "${APPIMAGE_EXTRACT}/${APP}.desktop" "${BINDIR}/${BIN}.desktop" #Create (+Zsync) + 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 \ diff --git a/.github/scripts/aarch64-Linux/pkgs/obs-studio.sh b/.github/scripts/aarch64-Linux/pkgs/obs-studio.sh new file mode 100644 index 00000000..6a624e14 --- /dev/null +++ b/.github/scripts/aarch64-Linux/pkgs/obs-studio.sh @@ -0,0 +1,186 @@ +#!/usr/bin/env bash +#self: source +# source <(curl -qfsSL "https://raw.githubusercontent.com/Azathothas/Toolpacks-Extras/main/.github/scripts/${HOST_TRIPLET}/pkgs/obs-studio.sh") +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="YES" #no aarch64 builds +#obs-studio : FOSS cross-platform screencasting and streaming app +export BIN="obs-studio" +export SOURCE_URL="https://gitlab.com/obs-studio/obs-studio" +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="obs-studio" + export PKG_NAME="${APP}.AppImage" + RELEASE_TAG="$(curl -qfsSL "https://gitlab.archlinux.org/archlinux/packaging/packages/obs-studio/-/raw/main/PKGBUILD" | sed -n 's/^pkgver=//p' | tr -d '[:space:]')" && export RELEASE_TAG="${RELEASE_TAG}" + timeout 1m eget "https://github.com/ivan-hc/OBS-Studio-appimage" --tag "continuous" --asset "$(uname -m)" --asset ".AppImage" --asset "^.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 -o -type l \) -iname "*.png" -exec rsync -achL "{}" "${APPIMAGE_EXTRACT}/${APP}.png" \; + if [[ ! -f "${APPIMAGE_EXTRACT}/${APP}.png" || $(stat -c%s "${APPIMAGE_EXTRACT}/${APP}.png") -le 3 ]]; then + find "${APPIMAGE_EXTRACT}" \( -path "*/128x128/apps/*${APP}*.png" -o -path "*/256x256/*${APP}*.png" \) -printf "%s %p\n" -quit | sort -n | awk 'NR==1 {print $2}' | xargs -I {} convert {} -resize "128x128" -verbose "${APPIMAGE_EXTRACT}/${APP}.png" + fi + 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 -o -type l \) -iname "*.desktop" -exec rsync -achL "{}" "${APPIMAGE_EXTRACT}/${APP}.desktop" \; + if [[ ! -f "${APPIMAGE_EXTRACT}/${APP}.desktop" || $(stat -c%s "${APPIMAGE_EXTRACT}/${APP}.desktop") -le 3 ]]; then + find "${APPIMAGE_EXTRACT}" -path "*${APP}*.desktop" -printf "%s %p\n" -quit | sort -n | awk 'NR==1 {print $2}' | xargs -I "{}" sh -c 'rsync -achL "{}" "${APPIMAGE_EXTRACT}/${APP}.desktop"' + fi + 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 + #-------------------------------------------------------# + export BUILD_NIX_APPIMAGE="NO" #egl issues + if [ "${BUILD_NIX_APPIMAGE}" == "YES" ]; then + ##Create NixAppImage + pushd "$($TMPDIRS)" >/dev/null 2>&1 + OWD="$(realpath .)" && export OWD="${OWD}" + export APP="obs" + export PKG_NAME="${APP}-studio.NixAppImage" + nix bundle --bundler "github:ralismark/nix-appimage" "nixpkgs#${APP}-studio" --log-format bar-with-logs + #Copy + sudo rsync -achL "${OWD}/${APP}.AppImage" "${OWD}/${PKG_NAME}.tmp" + sudo chown -R "$(whoami):$(whoami)" "${OWD}/${PKG_NAME}.tmp" && chmod -R 755 "${OWD}/${PKG_NAME}.tmp" + du -sh "${OWD}/${PKG_NAME}.tmp" && file "${OWD}/${PKG_NAME}.tmp" + #HouseKeeping + if [[ -f "${OWD}/${PKG_NAME}.tmp" ]] && [[ $(stat -c%s "${OWD}/${PKG_NAME}.tmp") -gt 1024 ]]; then + #Version + PKG_VERSION="$(nix derivation show "nixpkgs#${APP}-studio" 2>&1 | grep '"version"' | awk -F': ' '{print $2}' | tr -d '"')" && export PKG_VERSION="${PKG_VERSION}" + echo "${PKG_VERSION}" > "${BINDIR}/${PKG_NAME}.version" + #Extract + APPIMAGE="${OWD}/${PKG_NAME}.tmp" && 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 + #Get Media + cd "${APPIMAGE_EXTRACT}" + mkdir -p "${APPIMAGE_EXTRACT}/usr/share/applications" && mkdir -p "${APPIMAGE_EXTRACT}/usr/share/metainfo" + SHARE_DIR="$(find "${APPIMAGE_EXTRACT}" -path "*share/*applications*${APP}*" -print -quit | sed 's|/share/applications.*||')/share" && export SHARE_DIR="${SHARE_DIR}" + #usr/{applications,bash-completion,icons,metainfo,zsh} + rsync -av --copy-links \ + --include="*/" \ + --include="*.desktop" \ + --include="*.png" \ + --include="*.svg" \ + --include="*.xml" \ + --exclude="*" \ + "${SHARE_DIR}/" "./usr/share/" && ls "./usr/share/" + #Icon + find "${APPIMAGE_EXTRACT}" -maxdepth 1 -type f,l \( -iname "*.[pP][nN][gG]" -o -iname "*.[sS][vV][gG]" \) -printf "%s %p\n" -quit | sort -n | awk 'NR==1 {print $2}' | xargs -I {} convert {} -resize "128x128" -verbose "${APPIMAGE_EXTRACT}/${APP}.png" + if [[ ! -f "${APPIMAGE_EXTRACT}/${APP}.png" || $(stat -c%s "${APPIMAGE_EXTRACT}/${APP}.png") -le 3 ]]; then + find "${APPIMAGE_EXTRACT}" -regex ".*\(128x128/apps\|256x256\)/.*${APP}.*\.\(png\|svg\)" -printf "%s %p\n" -quit | sort -n | awk 'NR==1 {print $2}' | xargs -I {} convert {} -resize "128x128" -verbose "${APPIMAGE_EXTRACT}/${APP}.png" + fi + rsync -achL "${APPIMAGE_EXTRACT}/${APP}.png" "${APPIMAGE_EXTRACT}/.DirIcon" + #Desktop + find "${APPIMAGE_EXTRACT}" -path "*${APP}*.desktop" -printf "%s %p\n" -quit | sort -n | awk 'NR==1 {print $2}' | xargs -I {} sh -c 'rsync -achL "{}" "${APPIMAGE_EXTRACT}/${APP}.desktop"' + sed "s/Icon=[^ ]*/Icon=${APP}/" -i "${APPIMAGE_EXTRACT}/${APP}.desktop" + #Perms + find "${APPIMAGE_EXTRACT}" -maxdepth 1 -type f -exec chmod "u=rx,go=rx" {} + + #Purge Bloatware + echo -e "\n[+] Purging Bloatware...\n" + O_SIZE="$(du -sh "${APPIMAGE_EXTRACT}" 2>/dev/null | awk '{print $1}' 2>/dev/null)" && export "O_SIZE=${O_SIZE}" + #Headers + find "${APPIMAGE_EXTRACT}" -type d -path "*/include*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null + #docs & manpages + find "${APPIMAGE_EXTRACT}" -type d -path "*doc/share*" ! -name "*${APP}*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null + find "${APPIMAGE_EXTRACT}" -type d -path "*/share/docs*" ! -name "*${APP}*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null + find "${APPIMAGE_EXTRACT}" -type d -path "*/share/man*" ! -name "*${APP}*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null + #static libs + find "${APPIMAGE_EXTRACT}" -type f -name "*.a" -print -exec rm -f {} 2>/dev/null \; 2>/dev/null + #systemd (need .so) + find "${APPIMAGE_EXTRACT}" -type d -name "*systemd*" -exec find {} -type f ! -name "*.so*" -delete \; + P_SIZE="$(du -sh "${APPIMAGE_EXTRACT}" 2>/dev/null | awk '{print $1}' 2>/dev/null)" && export "P_SIZE=${P_SIZE}" + echo -e "\n[+] Shaved off ${O_SIZE} --> ${P_SIZE}\n" + #Copy Media + rsync -achL "${APPIMAGE_EXTRACT}/${APP}.png" "${BINDIR}/${BIN}.icon.png" + rsync -achL "${APPIMAGE_EXTRACT}/.DirIcon" "${BINDIR}/${BIN}.DirIcon" + rsync -achL "${APPIMAGE_EXTRACT}/${APP}.desktop" "${BINDIR}/${BIN}.desktop" + #Create (+Zsync) + 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 + #End + popd >/dev/null 2>&1 + 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 +#-------------------------------------------------------# \ No newline at end of file diff --git a/.github/scripts/aarch64-Linux/pkgs/obs-studio.yaml b/.github/scripts/aarch64-Linux/pkgs/obs-studio.yaml new file mode 100644 index 00000000..02f2d264 --- /dev/null +++ b/.github/scripts/aarch64-Linux/pkgs/obs-studio.yaml @@ -0,0 +1,15 @@ +#https://github.com/ivan-hc/AM/blob/main/programs/x86_64/obs-studio +name: "obs-studio" +bin_name: "obs-studio" +bins: + - "obs-studio.AppImage" + - "obs-studio.NixAppImage" +category: + - "multimedia" + - "screenrecording" + - "video" +description: "FOSS cross-platform screencasting and streaming app (AppImage|NixAppImage)" +note: "This PKG has Multiple Formats (CI_VERIFIED: https://github.com/obsproject/obs-studio/actions)" +web_url: "https://obsproject.com" +path: "/" +src_url: "https://github.com/obsproject/obs-studio" \ No newline at end of file diff --git a/.github/scripts/aarch64-Linux/pkgs/puddletag.sh b/.github/scripts/aarch64-Linux/pkgs/puddletag.sh index ffeadda1..c0ee5922 100644 --- a/.github/scripts/aarch64-Linux/pkgs/puddletag.sh +++ b/.github/scripts/aarch64-Linux/pkgs/puddletag.sh @@ -95,6 +95,7 @@ if [ "${SKIP_BUILD}" == "NO" ]; then rsync -achL "${APPIMAGE_EXTRACT}/.DirIcon" "${BINDIR}/${BIN}.DirIcon" rsync -achL "${APPIMAGE_EXTRACT}/${APP}.desktop" "${BINDIR}/${BIN}.desktop" #Create (+Zsync) + 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 \ diff --git a/.github/scripts/x86_64-Linux/pkgs/i3.sh b/.github/scripts/x86_64-Linux/pkgs/i3.sh new file mode 100644 index 00000000..5fc9eaa4 --- /dev/null +++ b/.github/scripts/x86_64-Linux/pkgs/i3.sh @@ -0,0 +1,188 @@ +#!/usr/bin/env bash +#self: source +# source <(curl -qfsSL "https://raw.githubusercontent.com/Azathothas/Toolpacks-Extras/main/.github/scripts/${HOST_TRIPLET}/pkgs/i3.sh") +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" +#i3 : Powerful, simple, audio tag editor for GNU/Linux +export BIN="i3" +export SOURCE_URL="https://github.com/i3/i3" +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="i3" + export PKG_NAME="${APP}.AppImage" + RELEASE_TAG="$(git ls-remote --tags "${SOURCE_URL}" | awk -F/ '/tags/ && !/{}$/ {print $NF}' | tr -d "[:alpha:]" | sed 's/^[^0-9]*//; s/[^0-9]*$//' | sort --version-sort | tail -n 1 | tr -d '[:space:]')" && export RELEASE_TAG="${RELEASE_TAG}" + timeout 1m eget "https://github.com/Samueru-sama/i3-AppImage" --tag "continuous" --asset "x86_64" --asset ".AppImage" --asset "^patched" --asset "^.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 + curl -A "${USER_AGENT}" -qfsSL "https://upload.wikimedia.org/wikipedia/commons/2/27/I3_window_manager_logo.svg?download" -o "${APPIMAGE_EXTRACT}/${APP}.svg" + find "${APPIMAGE_EXTRACT}" -maxdepth 1 -type f,l \( -iname "*.[pP][nN][gG]" -o -iname "*.[sS][vV][gG]" \) -printf "%s %p\n" -quit | sort -n | awk 'NR==1 {print $2}' | xargs -I {} convert {} -resize "128x128" -verbose "${APPIMAGE_EXTRACT}/${APP}.png" + if [[ ! -f "${APPIMAGE_EXTRACT}/${APP}.png" || $(stat -c%s "${APPIMAGE_EXTRACT}/${APP}.png") -le 3 ]]; then + find "${APPIMAGE_EXTRACT}" -regex ".*\(128x128/apps\|256x256\)/.*${APP}.*\.\(png\|svg\)" -printf "%s %p\n" -quit | sort -n | awk 'NR==1 {print $2}' | xargs -I {} convert {} -resize "128x128" -verbose "${APPIMAGE_EXTRACT}/${APP}.png" + fi + 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" + sudo chmod +xwr "${APPIMAGE_EXTRACT}/${APP}.desktop" + echo -e "[Desktop Entry]\nType=Application\nName=i3\nIcon=i3\nNoDisplay=true\nGenericName=A dynamic tiling window manager\nComment=improved dynamic tiling window manager\nExec=i3\nX-GNOME-WMName=i3\nX-GNOME-Autostart-Phase=WindowManager\nX-GNOME-Provides=windowmanager\nX-GNOME-Autostart-Notify=false\nCategories=System" > "${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 + #-------------------------------------------------------# + export BUILD_NIX_APPIMAGE="YES" #This needs export PATH + if [ "${BUILD_NIX_APPIMAGE}" == "YES" ]; then + ##Create NixAppImage + pushd "$($TMPDIRS)" >/dev/null 2>&1 + OWD="$(realpath .)" && export OWD="${OWD}" + export APP="i3" + export PKG_NAME="${APP}.NixAppImage" + nix bundle --bundler "github:ralismark/nix-appimage" "nixpkgs#${APP}" --log-format bar-with-logs + #Copy + sudo rsync -achL "${OWD}/${APP}.AppImage" "${OWD}/${PKG_NAME}.tmp" + sudo chown -R "$(whoami):$(whoami)" "${OWD}/${PKG_NAME}.tmp" && chmod -R 755 "${OWD}/${PKG_NAME}.tmp" + du -sh "${OWD}/${PKG_NAME}.tmp" && file "${OWD}/${PKG_NAME}.tmp" + #HouseKeeping + if [[ -f "${OWD}/${PKG_NAME}.tmp" ]] && [[ $(stat -c%s "${OWD}/${PKG_NAME}.tmp") -gt 1024 ]]; then + #Version + PKG_VERSION="$(nix derivation show "nixpkgs#${APP}" 2>&1 | grep '"version"' | awk -F': ' '{print $2}' | tr -d '"')" && export PKG_VERSION="${PKG_VERSION}" + echo "${PKG_VERSION}" > "${BINDIR}/${PKG_NAME}.version" + #Extract + APPIMAGE="${OWD}/${PKG_NAME}.tmp" && 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 + #Get Media + cd "${APPIMAGE_EXTRACT}" + mkdir -p "${APPIMAGE_EXTRACT}/usr/share/applications" && mkdir -p "${APPIMAGE_EXTRACT}/usr/share/metainfo" + SHARE_DIR="$(find "${APPIMAGE_EXTRACT}" -path "*share/*applications*${APP}*" -print -quit | sed 's|/share/applications.*||')/share" && export SHARE_DIR="${SHARE_DIR}" + #usr/{applications,bash-completion,icons,metainfo,zsh} + rsync -av --copy-links \ + --include="*/" \ + --include="*.desktop" \ + --include="*.png" \ + --include="*.svg" \ + --include="*.xml" \ + --exclude="*" \ + "${SHARE_DIR}/" "./usr/share/" && ls "./usr/share/" + #Icon + curl -A "${USER_AGENT}" -qfsSL "https://upload.wikimedia.org/wikipedia/commons/2/27/I3_window_manager_logo.svg?download" -o "${APP}.svg" + find "${APPIMAGE_EXTRACT}" -maxdepth 1 -type f,l \( -iname "*.[pP][nN][gG]" -o -iname "*.[sS][vV][gG]" \) -printf "%s %p\n" -quit | sort -n | awk 'NR==1 {print $2}' | xargs -I {} convert {} -resize "128x128" -verbose "${APPIMAGE_EXTRACT}/${APP}.png" + if [[ ! -f "${APPIMAGE_EXTRACT}/${APP}.png" || $(stat -c%s "${APPIMAGE_EXTRACT}/${APP}.png") -le 3 ]]; then + find "${APPIMAGE_EXTRACT}" -regex ".*\(128x128/apps\|256x256\)/.*${APP}.*\.\(png\|svg\)" -printf "%s %p\n" -quit | sort -n | awk 'NR==1 {print $2}' | xargs -I {} convert {} -resize "128x128" -verbose "${APPIMAGE_EXTRACT}/${APP}.png" + fi + rsync -achL "${APPIMAGE_EXTRACT}/${APP}.png" "${APPIMAGE_EXTRACT}/.DirIcon" + #Desktop + find "${APPIMAGE_EXTRACT}" -path "*${APP}*.desktop" -printf "%s %p\n" -quit | sort -n | awk 'NR==1 {print $2}' | xargs -I {} sh -c 'rsync -achL "{}" "${APPIMAGE_EXTRACT}/${APP}.desktop"' + sudo chmod +xwr "${APPIMAGE_EXTRACT}/${APP}.desktop" + echo -e "[Desktop Entry]\nType=Application\nName=i3\nIcon=i3\nNoDisplay=true\nGenericName=A dynamic tiling window manager\nComment=improved dynamic tiling window manager\nExec=i3\nX-GNOME-WMName=i3\nX-GNOME-Autostart-Phase=WindowManager\nX-GNOME-Provides=windowmanager\nX-GNOME-Autostart-Notify=false\nCategories=System" > "${APPIMAGE_EXTRACT}/${APP}.desktop" + sed "s/Icon=[^ ]*/Icon=${APP}/" -i "${APPIMAGE_EXTRACT}/${APP}.desktop" + #Perms + find "${APPIMAGE_EXTRACT}" -maxdepth 1 -type f -exec chmod "u=rx,go=rx" {} + + #Purge Bloatware + echo -e "\n[+] Purging Bloatware...\n" + O_SIZE="$(du -sh "${APPIMAGE_EXTRACT}" 2>/dev/null | awk '{print $1}' 2>/dev/null)" && export "O_SIZE=${O_SIZE}" + #Headers + find "${APPIMAGE_EXTRACT}" -type d -path "*/include*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null + #docs & manpages + find "${APPIMAGE_EXTRACT}" -type d -path "*doc/share*" ! -name "*${APP}*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null + find "${APPIMAGE_EXTRACT}" -type d -path "*/share/docs*" ! -name "*${APP}*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null + find "${APPIMAGE_EXTRACT}" -type d -path "*/share/man*" ! -name "*${APP}*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null + #static libs + find "${APPIMAGE_EXTRACT}" -type f -name "*.a" -print -exec rm -f {} 2>/dev/null \; 2>/dev/null + #systemd (need .so) + find "${APPIMAGE_EXTRACT}" -type d -name "*systemd*" -exec find {} -type f ! -name "*.so*" -delete \; + P_SIZE="$(du -sh "${APPIMAGE_EXTRACT}" 2>/dev/null | awk '{print $1}' 2>/dev/null)" && export "P_SIZE=${P_SIZE}" + echo -e "\n[+] Shaved off ${O_SIZE} --> ${P_SIZE}\n" + #Copy Media + rsync -achL "${APPIMAGE_EXTRACT}/${APP}.png" "${BINDIR}/${BIN}.icon.png" + rsync -achL "${APPIMAGE_EXTRACT}/.DirIcon" "${BINDIR}/${BIN}.DirIcon" + rsync -achL "${APPIMAGE_EXTRACT}/${APP}.desktop" "${BINDIR}/${BIN}.desktop" + #Create (+Zsync) + 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 + #End + popd >/dev/null 2>&1 + 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 +#-------------------------------------------------------# \ No newline at end of file diff --git a/.github/scripts/x86_64-Linux/pkgs/i3.yaml b/.github/scripts/x86_64-Linux/pkgs/i3.yaml new file mode 100644 index 00000000..986f04de --- /dev/null +++ b/.github/scripts/x86_64-Linux/pkgs/i3.yaml @@ -0,0 +1,15 @@ +#https://github.com/ivan-hc/AM/blob/main/programs/x86_64/i3 +name: "i3" +bin_name: "i3" +bins: + - "i3.AppImage" + - "i3.NixAppImage" +category: + - "window" + - "window-manager" + - "wm" +description: "A Tiling Window Manager (AppImage|NixAppImage)" +note: "This PKG has Multiple Formats
(CI_VERIFIED: https://github.com/i3/i3/actions)" +web_url: "https://i3wm.org" +path: "/" +src_url: "https://github.com/i3/i3" \ No newline at end of file diff --git a/.github/scripts/x86_64-Linux/pkgs/inkscape.sh b/.github/scripts/x86_64-Linux/pkgs/inkscape.sh index 28ce0560..5788bea9 100644 --- a/.github/scripts/x86_64-Linux/pkgs/inkscape.sh +++ b/.github/scripts/x86_64-Linux/pkgs/inkscape.sh @@ -190,6 +190,7 @@ if [ "${SKIP_BUILD}" == "NO" ]; then rsync -achL "${APPIMAGE_EXTRACT}/.DirIcon" "${BINDIR}/${BIN}.DirIcon" rsync -achL "${APPIMAGE_EXTRACT}/${APP}.desktop" "${BINDIR}/${BIN}.desktop" #Create (+Zsync) + 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 \ diff --git a/.github/scripts/x86_64-Linux/pkgs/obs-studio.sh b/.github/scripts/x86_64-Linux/pkgs/obs-studio.sh new file mode 100644 index 00000000..504a4731 --- /dev/null +++ b/.github/scripts/x86_64-Linux/pkgs/obs-studio.sh @@ -0,0 +1,186 @@ +#!/usr/bin/env bash +#self: source +# source <(curl -qfsSL "https://raw.githubusercontent.com/Azathothas/Toolpacks-Extras/main/.github/scripts/${HOST_TRIPLET}/pkgs/obs-studio.sh") +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" +#obs-studio : FOSS cross-platform screencasting and streaming app +export BIN="obs-studio" +export SOURCE_URL="https://github.com/obsproject/obs-studio" +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="obs-studio" + export PKG_NAME="${APP}.AppImage" + RELEASE_TAG="$(curl -qfsSL "https://gitlab.archlinux.org/archlinux/packaging/packages/obs-studio/-/raw/main/PKGBUILD" | sed -n 's/^pkgver=//p' | tr -d '[:space:]')" && export RELEASE_TAG="${RELEASE_TAG}" + timeout 1m eget "https://github.com/ivan-hc/OBS-Studio-appimage" --tag "continuous" --asset "$(uname -m)" --asset ".AppImage" --asset "^.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 -o -type l \) -iname "*.png" -exec rsync -achL "{}" "${APPIMAGE_EXTRACT}/${APP}.png" \; + if [[ ! -f "${APPIMAGE_EXTRACT}/${APP}.png" || $(stat -c%s "${APPIMAGE_EXTRACT}/${APP}.png") -le 3 ]]; then + find "${APPIMAGE_EXTRACT}" \( -path "*/128x128/apps/*${APP}*.png" -o -path "*/256x256/*${APP}*.png" \) -printf "%s %p\n" -quit | sort -n | awk 'NR==1 {print $2}' | xargs -I {} convert {} -resize "128x128" -verbose "${APPIMAGE_EXTRACT}/${APP}.png" + fi + 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 -o -type l \) -iname "*.desktop" -exec rsync -achL "{}" "${APPIMAGE_EXTRACT}/${APP}.desktop" \; + if [[ ! -f "${APPIMAGE_EXTRACT}/${APP}.desktop" || $(stat -c%s "${APPIMAGE_EXTRACT}/${APP}.desktop") -le 3 ]]; then + find "${APPIMAGE_EXTRACT}" -path "*${APP}*.desktop" -printf "%s %p\n" -quit | sort -n | awk 'NR==1 {print $2}' | xargs -I "{}" sh -c 'rsync -achL "{}" "${APPIMAGE_EXTRACT}/${APP}.desktop"' + fi + 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 + #-------------------------------------------------------# + export BUILD_NIX_APPIMAGE="NO" #egl issues + if [ "${BUILD_NIX_APPIMAGE}" == "YES" ]; then + ##Create NixAppImage + pushd "$($TMPDIRS)" >/dev/null 2>&1 + OWD="$(realpath .)" && export OWD="${OWD}" + export APP="obs" + export PKG_NAME="${APP}-studio.NixAppImage" + nix bundle --bundler "github:ralismark/nix-appimage" "nixpkgs#${APP}-studio" --log-format bar-with-logs + #Copy + sudo rsync -achL "${OWD}/${APP}.AppImage" "${OWD}/${PKG_NAME}.tmp" + sudo chown -R "$(whoami):$(whoami)" "${OWD}/${PKG_NAME}.tmp" && chmod -R 755 "${OWD}/${PKG_NAME}.tmp" + du -sh "${OWD}/${PKG_NAME}.tmp" && file "${OWD}/${PKG_NAME}.tmp" + #HouseKeeping + if [[ -f "${OWD}/${PKG_NAME}.tmp" ]] && [[ $(stat -c%s "${OWD}/${PKG_NAME}.tmp") -gt 1024 ]]; then + #Version + PKG_VERSION="$(nix derivation show "nixpkgs#${APP}-studio" 2>&1 | grep '"version"' | awk -F': ' '{print $2}' | tr -d '"')" && export PKG_VERSION="${PKG_VERSION}" + echo "${PKG_VERSION}" > "${BINDIR}/${PKG_NAME}.version" + #Extract + APPIMAGE="${OWD}/${PKG_NAME}.tmp" && 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 + #Get Media + cd "${APPIMAGE_EXTRACT}" + mkdir -p "${APPIMAGE_EXTRACT}/usr/share/applications" && mkdir -p "${APPIMAGE_EXTRACT}/usr/share/metainfo" + SHARE_DIR="$(find "${APPIMAGE_EXTRACT}" -path "*share/*applications*${APP}*" -print -quit | sed 's|/share/applications.*||')/share" && export SHARE_DIR="${SHARE_DIR}" + #usr/{applications,bash-completion,icons,metainfo,zsh} + rsync -av --copy-links \ + --include="*/" \ + --include="*.desktop" \ + --include="*.png" \ + --include="*.svg" \ + --include="*.xml" \ + --exclude="*" \ + "${SHARE_DIR}/" "./usr/share/" && ls "./usr/share/" + #Icon + find "${APPIMAGE_EXTRACT}" -maxdepth 1 -type f,l \( -iname "*.[pP][nN][gG]" -o -iname "*.[sS][vV][gG]" \) -printf "%s %p\n" -quit | sort -n | awk 'NR==1 {print $2}' | xargs -I {} convert {} -resize "128x128" -verbose "${APPIMAGE_EXTRACT}/${APP}.png" + if [[ ! -f "${APPIMAGE_EXTRACT}/${APP}.png" || $(stat -c%s "${APPIMAGE_EXTRACT}/${APP}.png") -le 3 ]]; then + find "${APPIMAGE_EXTRACT}" -regex ".*\(128x128/apps\|256x256\)/.*${APP}.*\.\(png\|svg\)" -printf "%s %p\n" -quit | sort -n | awk 'NR==1 {print $2}' | xargs -I {} convert {} -resize "128x128" -verbose "${APPIMAGE_EXTRACT}/${APP}.png" + fi + rsync -achL "${APPIMAGE_EXTRACT}/${APP}.png" "${APPIMAGE_EXTRACT}/.DirIcon" + #Desktop + find "${APPIMAGE_EXTRACT}" -path "*${APP}*.desktop" -printf "%s %p\n" -quit | sort -n | awk 'NR==1 {print $2}' | xargs -I {} sh -c 'rsync -achL "{}" "${APPIMAGE_EXTRACT}/${APP}.desktop"' + sed "s/Icon=[^ ]*/Icon=${APP}/" -i "${APPIMAGE_EXTRACT}/${APP}.desktop" + #Perms + find "${APPIMAGE_EXTRACT}" -maxdepth 1 -type f -exec chmod "u=rx,go=rx" {} + + #Purge Bloatware + echo -e "\n[+] Purging Bloatware...\n" + O_SIZE="$(du -sh "${APPIMAGE_EXTRACT}" 2>/dev/null | awk '{print $1}' 2>/dev/null)" && export "O_SIZE=${O_SIZE}" + #Headers + find "${APPIMAGE_EXTRACT}" -type d -path "*/include*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null + #docs & manpages + find "${APPIMAGE_EXTRACT}" -type d -path "*doc/share*" ! -name "*${APP}*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null + find "${APPIMAGE_EXTRACT}" -type d -path "*/share/docs*" ! -name "*${APP}*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null + find "${APPIMAGE_EXTRACT}" -type d -path "*/share/man*" ! -name "*${APP}*" -print -exec rm -rf {} 2>/dev/null \; 2>/dev/null + #static libs + find "${APPIMAGE_EXTRACT}" -type f -name "*.a" -print -exec rm -f {} 2>/dev/null \; 2>/dev/null + #systemd (need .so) + find "${APPIMAGE_EXTRACT}" -type d -name "*systemd*" -exec find {} -type f ! -name "*.so*" -delete \; + P_SIZE="$(du -sh "${APPIMAGE_EXTRACT}" 2>/dev/null | awk '{print $1}' 2>/dev/null)" && export "P_SIZE=${P_SIZE}" + echo -e "\n[+] Shaved off ${O_SIZE} --> ${P_SIZE}\n" + #Copy Media + rsync -achL "${APPIMAGE_EXTRACT}/${APP}.png" "${BINDIR}/${BIN}.icon.png" + rsync -achL "${APPIMAGE_EXTRACT}/.DirIcon" "${BINDIR}/${BIN}.DirIcon" + rsync -achL "${APPIMAGE_EXTRACT}/${APP}.desktop" "${BINDIR}/${BIN}.desktop" + #Create (+Zsync) + 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 + #End + popd >/dev/null 2>&1 + 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 +#-------------------------------------------------------# \ No newline at end of file diff --git a/.github/scripts/x86_64-Linux/pkgs/obs-studio.yaml b/.github/scripts/x86_64-Linux/pkgs/obs-studio.yaml new file mode 100644 index 00000000..02f2d264 --- /dev/null +++ b/.github/scripts/x86_64-Linux/pkgs/obs-studio.yaml @@ -0,0 +1,15 @@ +#https://github.com/ivan-hc/AM/blob/main/programs/x86_64/obs-studio +name: "obs-studio" +bin_name: "obs-studio" +bins: + - "obs-studio.AppImage" + - "obs-studio.NixAppImage" +category: + - "multimedia" + - "screenrecording" + - "video" +description: "FOSS cross-platform screencasting and streaming app (AppImage|NixAppImage)" +note: "This PKG has Multiple Formats (CI_VERIFIED: https://github.com/obsproject/obs-studio/actions)" +web_url: "https://obsproject.com" +path: "/" +src_url: "https://github.com/obsproject/obs-studio" \ No newline at end of file diff --git a/.github/scripts/x86_64-Linux/pkgs/puddletag.sh b/.github/scripts/x86_64-Linux/pkgs/puddletag.sh index 194748cd..15169dff 100644 --- a/.github/scripts/x86_64-Linux/pkgs/puddletag.sh +++ b/.github/scripts/x86_64-Linux/pkgs/puddletag.sh @@ -95,6 +95,7 @@ if [ "${SKIP_BUILD}" == "NO" ]; then rsync -achL "${APPIMAGE_EXTRACT}/.DirIcon" "${BINDIR}/${BIN}.DirIcon" rsync -achL "${APPIMAGE_EXTRACT}/${APP}.desktop" "${BINDIR}/${BIN}.desktop" #Create (+Zsync) + 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 \