commit fadae43f2adf3889c4da675b8b9cf61e7bf4d16e Author: Bryan Joshua Pedini Date: Fri May 22 11:54:43 2026 +0200 first commit diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 0000000..c182b21 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,20 @@ +pkgbase = nethlink-appimage + pkgdesc = A tool designed to link NethServer systems and provide remote access tools. + pkgver = 1.4.5 + pkgrel = 1 + url = https://github.com/NethServer/nethlink + arch = x86_64 + license = unknown + depends = fuse2 + provides = nethlink + conflicts = nethlink + options = !strip + options = !debug + source = nethlink-1.4.5.AppImage::https://github.com/NethServer/nethlink/releases/download/v1.4.5/nethlink-1.4.5.AppImage + source = nethlink.desktop + source = nethlink.png + sha256sums = d3339c7d172009ae342c9969f4d5c9d6591e3310b146a90e16a1f1b4f880d103 + sha256sums = 1c5d66ad8406cb12645f26e51d5fdac5ff6ad2a90d392dd852ab027d6783aa54 + sha256sums = 360ba441787829ab27c306cd0cdb8606d501c210e6d100bc767e2842fde2dc02 + +pkgname = nethlink-appimage diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6518c1e --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +# AppImages +*.AppImage +# built packages +*.pkg.tar.zst diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..04f030a --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Bryan Joshua Pedini + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..efe4d75 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,38 @@ +# Maintainer: Bryan Joshua Pedini + +_pkgname="nethlink" +_srcname="nethlink" +_srcmntr="NethServer" + +pkgname="${_pkgname}-appimage" +pkgver="1.4.5" +pkgrel="1" +pkgdesc="A tool designed to link NethServer systems and provide remote access tools." +url="https://github.com/${_srcmntr}/${_srcname}" +arch=("x86_64") +license=("unknown") +options=("!strip" "!debug") +depends=("fuse2") +_archive="${_pkgname}-${pkgver}.AppImage" +source=( + "${_archive}::https://github.com/${_srcmntr}/${_srcname}/releases/download/v${pkgver}/${_pkgname}-${pkgver}.AppImage" + "${_pkgname}.desktop" + "${_pkgname}.png" +) +conflicts=("nethlink") +provides=("nethlink") + +sha256sums=( + "d3339c7d172009ae342c9969f4d5c9d6591e3310b146a90e16a1f1b4f880d103" + "1c5d66ad8406cb12645f26e51d5fdac5ff6ad2a90d392dd852ab027d6783aa54" + "360ba441787829ab27c306cd0cdb8606d501c210e6d100bc767e2842fde2dc02" +) + +package() { + install -Dm755 "${srcdir}/${_archive}" \ + "${pkgdir}/usr/bin/${_pkgname}" + install -Dm644 "$srcdir/${_pkgname}.desktop" \ + "$pkgdir/usr/share/applications/${_pkgname}.desktop" + install -Dm644 "$srcdir/${_pkgname}.png" \ + "$pkgdir/usr/share/icons/hicolor/512x512/apps/${_pkgname}.png" +} diff --git a/README.md b/README.md new file mode 100644 index 0000000..b2103d6 --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# reflex-appimage +PKGBUILD script for Arch Linux for `reflex-appimage` package diff --git a/nethlink.desktop b/nethlink.desktop new file mode 100644 index 0000000..269f1c8 --- /dev/null +++ b/nethlink.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Name=NethLink +Exec=nethlink %U +Terminal=false +Type=Application +Icon=nethlink +StartupWMClass=NethLink +Comment=NethLink is a tool designed to link NethServer systems and provide remote access tools. This project aims to offer a simple yet powerful user interface for managing NethServer systems more efficiently. +MimeType=x-scheme-handler/tel;x-scheme-handler/callto;x-scheme-handler/nethlink; +Categories=Utility; diff --git a/nethlink.png b/nethlink.png new file mode 100644 index 0000000..dc33cf8 Binary files /dev/null and b/nethlink.png differ diff --git a/push.sh b/push.sh new file mode 100755 index 0000000..e39b37e --- /dev/null +++ b/push.sh @@ -0,0 +1,103 @@ +#!/usr/bin/env bash + +# Variables +gui=true +desktop="nethlink.desktop" +icon="nethlink.png" + +# Get version +oldver=$(grep -E "^pkgver=" PKGBUILD | sed 's/pkgver="//;s/"//') +if [ $# -eq 1 ]; then + pkgver="${1}" +else + echo "Old version: ${oldver}" + read -p "New version: " pkgver +fi + +# Check version +if [ "${pkgver}" = "${oldver}" ] && [ -z "${FORCE_REBUILD}" ]; then + echo >/dev/stderr "Error: same (old) version specified - update aborted" + exit +fi + +# Get variables from PKGBUILD +url=$(sed -n '/^source=(/,/)/p' PKGBUILD | grep -oE 'https?://[^"]+') +pkgname=$(grep -E "^pkgname=" PKGBUILD | sed 's/pkgname="//;s/"//') +_pkgname=$(grep -E "^_pkgname=" PKGBUILD | sed 's/_pkgname="//;s/"//') +_srcname=$(grep -E "^_srcname=" PKGBUILD | sed 's/_srcname="//;s/"//') +_srcmntr=$(grep -E "^_srcmntr=" PKGBUILD | sed 's/_srcmntr="//;s/"//') +_archive=$(grep -E "^_archive=" PKGBUILD | sed 's/_archive="//;s/"//') +pkgrel=$(grep -E "^pkgrel=" PKGBUILD | sed 's/pkgrel="//;s/"//') +aur_url="ssh://aur@aur.archlinux.org/${pkgname}.git" +if [ "${gui}" = "true" ] && [ -n "${_pkgname}" ]; then + newdesktop="${_pkgname}.desktop" + newicon="${_pkgname}.png" +else + newdesktop="${package}.desktop" + newicon="${package}.png" +fi + +# Perform variable substitution +url="${url//\$\{_pkgname\}/$_pkgname}" +url="${url//\$\{_srcname\}/$_srcname}" +url="${url//\$\{_srcmntr\}/$_srcmntr}" +url="${url//\$\{pkgver\}/$pkgver}" +_archive="${_archive//\$\{_pkgname\}/$_pkgname}" +_archive="${_archive//\$\{pkgver\}/$pkgver}" +aur_url="${aur_url//\$\{_pkgname\}/$_pkgname}" +pkgname="${pkgname//\$\{_pkgname\}/$_pkgname}" + +# Download archive +wget -qO ${_archive} "${url}" +# Extract icon / .desktop files if appimage +if printf '%s' "${_archive,,}" | grep -qi "appimage"; then + chmod +x "${_archive}" + "./${_archive}" --appimage-extract >/dev/null + cp "squashfs-root/${desktop}" "${newdesktop}" + cp "squashfs-root/${icon}" "${newicon}" + sed -i "/^X-AppImage-/d;/^$/d" "${newdesktop}" + sed -i "s/^Exec=.*/Exec=${_pkgname} %U/" "${newdesktop}" + rm -rf $(readlink -f squashfs-root) squashfs-root +fi +# Calculate checksums +sha256bin=$(sha256sum ${_archive} | awk '{print $1}') +if [ "${gui}" = "true" ]; then + sha256dsk=$(sha256sum ${newdesktop} | awk '{print $1}') + sha256ico=$(sha256sum ${newicon} | awk '{print $1}') +fi +# Yoink the archive - unnecessary anymore +rm -f ${_archive} + +# Update PKGBUILD with new values +sed -i -E "s/^pkgver=\"[^\"]+\"/pkgver=\"$pkgver\"/" PKGBUILD +if [ "${gui}" = "true" ]; then + sed -i '/^sha256sums=(/,/^)/c\ +sha256sums=(\ + "'"$sha256bin"'"\ + "'"$sha256dsk"'"\ + "'"$sha256ico"'"\ +)' PKGBUILD +else + sed -i -E "s/^sha256sums=\(\"[^\"]+\"\)/sha256sums=(\"$sha256bin\")/" PKGBUILD +fi +if [ "${pkgver}" != "${oldver}" ] && [ -n "${FORCE_REBUILD}" ]; then + sed -i -E "s/^pkgrel=\"[^\"]+\"/pkgrel=\"1\"/" PKGBUILD +fi +# Update .SRCINFO +makepkg --printsrcinfo > .SRCINFO + +# Create git message with correct variable +if [ -n "$_pkgname" ]; then + commit_msg="Updated ${pkgname//\$\{_pkgname\}/_pkgname} to ${pkgver}-${pkgrel}" +else + commit_msg="Updated ${pkgname} to ${pkgver}-${pkgrel}" +fi + +if [ -z "${NO_GIT_PUSH}" ]; then + # In case of fire, git commit, git push, leave building + git add . + git commit -m "${commit_msg}" + git remote add aur ${aur_url} + git push origin main + git push aur main:master +fi