summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzxp198210052023-12-29 18:51:59 +0800
committerzxp198210052023-12-29 18:51:59 +0800
commitb0cac0e7e51215618385396b4323b141c1eb03a8 (patch)
treec4e29cf9da6d49fd4647587b89ae31a1b85533c1
downloadaur-b0cac0e7e51215618385396b4323b141c1eb03a8.tar.gz
update to 1.0.0
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD46
-rw-r--r--simple-inventory.sh17
3 files changed, 83 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..2cd2e8be5482
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = simple-inventory-bin
+ pkgdesc = Simple desktop app to manage a wearhose inventory.
+ pkgver = 1.0.0
+ pkgrel = 1
+ url = https://github.com/osoyinas/simple-inventory
+ arch = x86_64
+ license = custom
+ makedepends = squashfuse
+ depends = electron26
+ depends = dbus-glib
+ depends = libdbusmenu-glib
+ depends = gtk2
+ provides = simple-inventory
+ conflicts = simple-inventory
+ source = simple-inventory-1.0.0.AppImage::https://github.com/osoyinas/simple-inventory/releases/download/1.0.0/Inventario-Linux-1.0.0.AppImage
+ source = simple-inventory.sh
+ sha256sums = 01153e86361364bf75e62e924ec34d19faf70b04e1a60dd1d8092a2fb9898ecf
+ sha256sums = 5ce46265f0335b03568aa06f7b4c57c5f8ffade7a226489ea39796be91a511bf
+
+pkgname = simple-inventory-bin
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..63c18f74c1d7
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,46 @@
+# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
+pkgname=simple-inventory-bin
+_pkgname=Inventario
+_appname=electron-vite-project
+pkgver=1.0.0
+_electronversion=26
+pkgrel=1
+pkgdesc="Simple desktop app to manage a wearhose inventory."
+arch=('x86_64')
+url="https://github.com/osoyinas/simple-inventory"
+license=('custom')
+provides=("${pkgname%-bin}")
+conflicts=("${pkgname%-bin}")
+depends=(
+ "electron${_electronversion}"
+ 'dbus-glib'
+ 'libdbusmenu-glib'
+ 'gtk2'
+)
+makedepends=(
+ 'squashfuse'
+)
+source=(
+ "${pkgname%-bin}-${pkgver}.AppImage::${url}/releases/download/${pkgver}/${_pkgname}-Linux-${pkgver}.AppImage"
+ "${pkgname%-bin}.sh"
+)
+sha256sums=('01153e86361364bf75e62e924ec34d19faf70b04e1a60dd1d8092a2fb9898ecf'
+ '5ce46265f0335b03568aa06f7b4c57c5f8ffade7a226489ea39796be91a511bf')
+build() {
+ sed -e "s|@electronversion@|${_electronversion}|g" \
+ -e "s|@appname@|${pkgname%-bin}|g" \
+ -e "s|@appasar@|app.asar|g" \
+ -i "${srcdir}/${pkgname%-bin}.sh"
+ chmod a+x "${srcdir}/${pkgname%-bin}-${pkgver}.AppImage"
+ "${srcdir}/${pkgname%-bin}-${pkgver}.AppImage" --appimage-extract > /dev/null
+ sed "s|AppRun --no-sandbox|${pkgname%-bin}|g;s|${_appname}|${pkgname%-bin}|g" -i "${srcdir}/squashfs-root/${_appname}.desktop"
+}
+package() {
+ install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
+ install -Dm644 "${srcdir}/squashfs-root/resources/app.asar" -t "${pkgdir}/usr/lib/${pkgname%-bin}"
+ install -Dm644 "${srcdir}/squashfs-root/resources/data/"* -t "${pkgdir}/usr/lib/${pkgname%-bin}/data"
+ install -Dm644 "${srcdir}/squashfs-root/LICENSE"* -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -Dm644 "${srcdir}/squashfs-root/usr/lib/"* -t "${pkgdir}/usr/lib/${pkgname%-bin}/lib"
+ install -Dm644 "${srcdir}/squashfs-root/usr/share/icons/hicolor/0x0/apps/${_appname}.png" "${pkgdir}/usr/share/pixmaps/${pkgname%-bin}.png"
+ install -Dm644 "${srcdir}/squashfs-root/${_appname}.desktop" "${pkgdir}/usr/share/applications/${pkgname%-bin}.desktop"
+} \ No newline at end of file
diff --git a/simple-inventory.sh b/simple-inventory.sh
new file mode 100644
index 000000000000..c77c53567639
--- /dev/null
+++ b/simple-inventory.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+set -e
+_APPDIR="/usr/lib/@appname@"
+_ASAR="${_APPDIR}/@appasar@"
+export PATH="${_APPDIR}:${PATH}"
+export LD_LIBRARY_PATH="${_APPDIR}/swiftshader:${_APPDIR}/lib:${LD_LIBRARY_PATH}"
+export ELECTRON_IS_DEV=0
+export NODE_ENV=production
+if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then
+ cd "${_APPDIR}"
+ exec electron@electronversion@ "${_ASAR}" "$@"
+ exit
+else
+ cd "${_APPDIR}"
+ exec electron@electronversion@ "${_ASAR}" --no-sandbox "$@"
+ exit
+fi \ No newline at end of file