Refactoring repository...
Some checks are pending
Check Conventional Commit / check-commit-message (push) Waiting to run

This commit is contained in:
CELESTIFYX
2025-01-14 19:02:06 +02:00
parent 876fa0988e
commit 08abac9e7d
33171 changed files with 4677 additions and 761 deletions

View File

@@ -0,0 +1,41 @@
# Maintainer: Eshan Roy <eshan@snigdhaos.org>
# Contributor: d3v1l0n <d3v1l0n@outlook.in>
pkgname=snigdhaos-assistant
pkgver=2.0
_pkgver=$(curl -fsSL https://api.github.com/repos/Snigdha-OS/snigdhaos-assistant/releases/latest | jq -r .tag_name)
pkgrel=1
pkgdesc="A setup utility for Snigdha OS which helps setting up & installing applications"
arch=('any')
url="https://gitlab.com/snigdhaos/snigdhaos-assistant/"
license=('MIT')
depends=('yad' 'wget' 'qt5-base' 'curl' 'jq' 'snigdhaos-libs')
optdepends=('pamac: For managing packages')
makedepends=('git' 'cmake')
groups=()
source=("https://github.com/Snigdha-OS/${pkgname}/archive/refs/tags/${_pkgver}.tar.gz")
sha256sums=('SKIP')
install=${pkgname}.install
pkgver() {
# Extract the version from the tag name, removing the 'v' prefix if present.
printf "%s" "${_pkgver#v}"
}
build() {
# Ensure the build directory exists
cmake -B build -S "$pkgname-$pkgver" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-Wno-dev
make -C build
}
package() {
# Install built files to the package directory
make -C build DESTDIR="$pkgdir" install
# Ensure proper directory structure
install -d "$pkgdir/usr"
cp -rf "$srcdir/$pkgname-$pkgver/usr" "$pkgdir"
}

View File

@@ -0,0 +1,33 @@
post_install() {
echo "\n[INFO] Snigdha OS Assistant successfully installed!\n"
echo "\n[INFO] Post-installation steps are being executed...\n"
# Ensure necessary directories are created
echo "[INFO] Verifying required directories..."
mkdir -p "$HOME/.snigdhaos" && echo "[OK] Directory $HOME/.snigdhaos created." || echo "[WARNING] Could not create $HOME/.snigdhaos."
# Generate a default configuration file if it does not exist
CONFIG_FILE="$HOME/.snigdhaos/assistant-config.json"
if [[ ! -f "$CONFIG_FILE" ]]; then
echo "[INFO] Creating a default configuration file at $CONFIG_FILE..."
cat <<EOL > "$CONFIG_FILE"
{
"default_applications": [
"firefox",
"code",
"vlc"
],
"auto_update": true
}
EOL
echo "[OK] Default configuration file created."
else
echo "[INFO] Configuration file already exists at $CONFIG_FILE. Skipping creation."
fi
# Inform the user of the next steps
echo "\n[INFO] Post-installation completed. You can now launch Snigdha OS Assistant using the command 'snigdhaos-assistant'."
echo "\n[INFO] For configuration, edit the file at $CONFIG_FILE."
}
post_install