From 265a66ce54f4c5fb66dc3a7a7a06a0734589163f Mon Sep 17 00:00:00 2001 From: Christian Schendel Date: Mon, 1 Sep 2025 05:25:37 +0200 Subject: [PATCH] Initial commit --- .SRCINFO | 23 ++++++++++++++ .gitignore | 18 +++++++++++ .nvchecker.toml | 4 +++ LICENSE | 12 ++++++++ LICENSES/0BSD.txt | 1 + PKGBUILD | 56 +++++++++++++++++++++++++++++++++ REUSE.toml | 24 +++++++++++++++ chroot-build | 65 +++++++++++++++++++++++++++++++++++++++ ecigstats.desktop | 12 ++++++++ escribe-suite-bin.desktop | 7 +++++ escribe-suite-bin.sh | 3 ++ 11 files changed, 225 insertions(+) create mode 100644 .SRCINFO create mode 100644 .gitignore create mode 100644 .nvchecker.toml create mode 100644 LICENSE create mode 120000 LICENSES/0BSD.txt create mode 100644 PKGBUILD create mode 100644 REUSE.toml create mode 100755 chroot-build create mode 100644 ecigstats.desktop create mode 100644 escribe-suite-bin.desktop create mode 100644 escribe-suite-bin.sh diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 0000000..99a3215 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,23 @@ +pkgbase = escribe-suite-bin + pkgdesc = Evolv eScribe Suite - DNA Management Suite and Ecigstats - INTL Version + pkgver = 2_SP68 + pkgrel = 1 + url = https://forum.evolvapor.com/topic/69197-linux-escribe-suite-beta-thread/ + arch = x86_64 + license = LicenseRef-custom + makedepends = unzip + optdepends = hardinfo: For system information utility + source = https://downloads.evolvapor.com/SetupEScribe2_SP68_INT.run + source = escribe-suite-bin.sh + source = escribe-suite-bin.desktop + source = ecigstats.desktop + b2sums = cc6cbbd8a8a8be361fc7afa154e36ee76410356b48a51d71057ebfc21f954ecca830884b47fe5cd7e3f98038f0c1c0319d64718d975827ea425a7b811a96a464 + b2sums = 2151c44c156dff69c9ade3884ca061bfac58ec3b6c886d5ca73ad7317b65034bc3c220d8b916454a6487085457c786e3a95f5971110432ccabd6959497cd8a47 + b2sums = 01fe26868c534d6b749243c1fc6d30ef0693bf516235efcefa342f36114eecb6db87364fd63c5641a4b031d4f01c2dc88a14d6e92bd4213ad70328388c331277 + b2sums = 457e5c7be94b76038967a04cf586cdbbb66331fdcb9dac841d2b1f1773374e1dec6e664f1e6a48732df81622c21e0f16c7cd63c25d3f74732d66abf043975d59 + +pkgname = escribe-suite-bin + depends = bash + depends = gtk2 + depends = gtk-sharp-2 + depends = mono diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0c14fda --- /dev/null +++ b/.gitignore @@ -0,0 +1,18 @@ +# Ignore everything +* + +# But not these files... +!.gitignore +!PKGBUILD +!.SRCINFO +!LICENSE +!chroot-build +!.nvchecker.toml +!/keys +!/keys/pgp +!/keys/pgp/*.asc +!/LICENSES +!/LICENSES/*.txt +!REUSE.toml +!*.desktop +!escribe-suite-bin.sh diff --git a/.nvchecker.toml b/.nvchecker.toml new file mode 100644 index 0000000..44d4626 --- /dev/null +++ b/.nvchecker.toml @@ -0,0 +1,4 @@ +[escribe-suite-bin] +source = "regex" +regex = "https://downloads.evolvapor.com/SetupEScribe(\\d+\\_SP\\d+)_INT.run" +url = "https://forum.evolvapor.com/topic/69197-linux-escribe-suite-beta-thread/#comment-921727" diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..b87c5e4 --- /dev/null +++ b/LICENSE @@ -0,0 +1,12 @@ +Copyright Arch Linux Contributors + +Permission to use, copy, modify, and/or distribute this software for +any purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL +WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE +FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY +DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN +AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/LICENSES/0BSD.txt b/LICENSES/0BSD.txt new file mode 120000 index 0000000..ea5b606 --- /dev/null +++ b/LICENSES/0BSD.txt @@ -0,0 +1 @@ +../LICENSE \ No newline at end of file diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..92cd6f9 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,56 @@ +# Maintainer: Christian Schendel +# Contributor: Khorne + +pkgname=escribe-suite-bin +pkgver=2_SP68 +pkgrel=1 +pkgdesc="Evolv eScribe Suite - DNA Management Suite and Ecigstats - INTL Version" +arch=('x86_64') +url="https://forum.evolvapor.com/topic/69197-linux-escribe-suite-beta-thread/" +license=( + LicenseRef-custom +) +makedepends=( + unzip +) +optdepends=( + 'hardinfo: For system information utility' +) +source=("https://downloads.evolvapor.com/SetupEScribe${pkgver//./_}_INT.run" + "escribe-suite-bin.sh" + "escribe-suite-bin.desktop" + "ecigstats.desktop") +b2sums=('cc6cbbd8a8a8be361fc7afa154e36ee76410356b48a51d71057ebfc21f954ecca830884b47fe5cd7e3f98038f0c1c0319d64718d975827ea425a7b811a96a464' + '2151c44c156dff69c9ade3884ca061bfac58ec3b6c886d5ca73ad7317b65034bc3c220d8b916454a6487085457c786e3a95f5971110432ccabd6959497cd8a47' + '01fe26868c534d6b749243c1fc6d30ef0693bf516235efcefa342f36114eecb6db87364fd63c5641a4b031d4f01c2dc88a14d6e92bd4213ad70328388c331277' + '457e5c7be94b76038967a04cf586cdbbb66331fdcb9dac841d2b1f1773374e1dec6e664f1e6a48732df81622c21e0f16c7cd63c25d3f74732d66abf043975d59') +prepare() { + chmod +x "SetupEScribe${pkgver//./_}_INT.run" + ./"SetupEScribe${pkgver//./_}_INT.run" --target . --noexec + cd common/data + unzip -o escribe-suite.zip -d main/ + unzip -o ecigstats.zip -d components/ + rm -f ./*.zip +} + +package() { + depends=( + bash + gtk2 + gtk-sharp-2 + mono + ) + mkdir -p "${pkgdir}/opt/${pkgname}" + cp -r common/data/* "${pkgdir}/opt/${pkgname}" + + # Update permissions to match the default system ones + find "${pkgdir}/opt/" -type d -exec chmod 755 {} \; + find "${pkgdir}/opt/" -type f -exec chmod 644 {} \; + + install -Dm0644 "common/data/License.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + install -Dm0644 "${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop" + install -Dm0644 "ecigstats.desktop" "${pkgdir}/usr/share/applications/ecigstats.desktop" + install -Dm0755 "${pkgname}.sh" "${pkgdir}/usr/bin/escribe-suite" +} + +# vim: set ft=sh ts=4 sw=4 et: diff --git a/REUSE.toml b/REUSE.toml new file mode 100644 index 0000000..c18213d --- /dev/null +++ b/REUSE.toml @@ -0,0 +1,24 @@ +version = 1 + +[[annotations]] +path = [ + "PKGBUILD", + "README.md", + "keys/**", + ".SRCINFO", + ".nvchecker.toml", + ".gitignore", + "*.install", + "*.sysusers", + "*.tmpfiles", + "*.logrotate", + "*.pam", + "*.service", + "*.socket", + "*.timer", + "*.desktop", + "*.hook", + "escribe-suite-bin.sh", +] +SPDX-FileCopyrightText = "Arch Linux contributors" +SPDX-License-Identifier = "0BSD" diff --git a/chroot-build b/chroot-build new file mode 100755 index 0000000..f69cac8 --- /dev/null +++ b/chroot-build @@ -0,0 +1,65 @@ +#!/bin/bash + +# SPDX-FileCopyrightText: Christian Schendel +# SPDX-License-Identifier: 0BSD + +set -euo pipefail +use_tmpfs=true +CHROOT="/tmp/mkarchroot" + +check_available_ram() { + if [ "$(awk '/^MemAvailable:/ { print $2; }' /proc/meminfo)" -lt 50000 ]; then + use_tmpfs=false + fi +} + +create_chroot_directory() { + if [ $use_tmpfs ]; then + sudo mount --mkdir -t tmpfs -o defaults,size=20G tmpfs $CHROOT + else + sudo mkdir -p "$CHROOT" + fi +} + +create_chroot_environment() { + if [[ ! -d "$CHROOT/root" ]]; then + mkarchroot -M ~/.config/pacman/makepkg.conf "$CHROOT/root" base-devel + fi +} + +build_package(){ + arch-nspawn "$CHROOT/root" pacman -Syu + if makechrootpkg -c -r "$CHROOT" -- -Asf . ; then + makepkg --printsrcinfo >.SRCINFO + else + delete_chroot_environment && echo -e "\n\e[1;31m==> BUILD FAILED: \e[1;37m$CHROOT removed\e[0m " && exit 1 + fi +} + +sign_package(){ + PACKAGE="$(makepkg --packagelist)" + gpg --use-agent --output "$PACKAGE.sig" --detach-sign "$PACKAGE" +} + +delete_chroot_environment() { + if [ "$(stat -f --format=%T "$CHROOT")" == "btrfs" ]; then + { + sudo btrfs subvolume delete "$CHROOT/root/var/lib/portables" + sudo btrfs subvolume delete "$CHROOT/root/var/lib/machines" + sudo btrfs subvolume delete "$CHROOT/root" + sudo rm -Rf $CHROOT + } >>/dev/null 2>&1 + elif [ "$(stat -f --format=%T "$CHROOT")" == "tmpfs" ]; then + sudo umount -f $CHROOT + fi + sudo rm -Rf $CHROOT +} + +check_available_ram +create_chroot_directory +create_chroot_environment +build_package +sign_package +delete_chroot_environment + +# vim: set ts=4 sw=4 et: diff --git a/ecigstats.desktop b/ecigstats.desktop new file mode 100644 index 0000000..dec05ec --- /dev/null +++ b/ecigstats.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Encoding=UTF-8 +Value=1.0 +Type=Application +Name=ECigStats +GenericName=ECigStats +Comment=Help tell the true story of electronic cigarettes +Icon=accessories-calculator +Exec=mono /opt/escribe-suite-bin/components/ecigstats.exe +Categories=Science +Path=/opt/escribe-suite-bin/ + diff --git a/escribe-suite-bin.desktop b/escribe-suite-bin.desktop new file mode 100644 index 0000000..9331202 --- /dev/null +++ b/escribe-suite-bin.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Name=EScribe Suite +Comment=DNA Management Suite + ECigStats +Exec=mono /opt/escribe-suite-bin/main/EScribe.exe +Type=Application +Icon=/opt/escribe-suite-bin/main/Pictures/Theme Designer/Evolv DNA Color/Miscellaneous/Evolv Symbol Dark Large.png +Categories=Tools; diff --git a/escribe-suite-bin.sh b/escribe-suite-bin.sh new file mode 100644 index 0000000..e819954 --- /dev/null +++ b/escribe-suite-bin.sh @@ -0,0 +1,3 @@ +#!/bin/bash +cd /opt/escribe-suite-bin/main/ +mono EScribe.exe