33900a8b3c
Neue Dateien: - PKGBUILD: AUR-Paket mit Hook-Installation - INSTALL.md: Installations-Guide mit eigenem AUR-Repo - USAGE.md: Befehlsreferenz + Troubleshooting Features: - ALPM-Hook Installation via aegisaur install-hook - Eigenes pacman-Remote auf Gitea - Config/Cache Pfad-Dokumentation Repository: https://gitea.die-heimatlosen.eu/arch_agent/aegisaur
73 lines
2.7 KiB
Bash
73 lines
2.7 KiB
Bash
# Maintainer: Thuumate <thuumate@ghost.local>
|
|
# AUR-Repo: https://gitea.die-heimatlosen.eu/arch_agent/aegisaur
|
|
|
|
pkgname=aegisaur
|
|
pkgver=0.1.0
|
|
pkgrel=1
|
|
pkgdesc="Trust-Scoring + IOC-Scanner für Arch Linux AUR-Pakete"
|
|
arch=('x86_64' 'x86_64_v3' 'x86_64_v4' 'aarch64')
|
|
url="https://gitea.die-heimatlosen.eu/arch_agent/aegisaur"
|
|
license=('MIT')
|
|
makedepends=('rust' 'cargo')
|
|
depends=('pacman' 'libalpm')
|
|
optdepends=(
|
|
'sudo: für install-hook und ALPM-Integration'
|
|
'nodejs: für IOC-Checks mit npm-Paketen'
|
|
)
|
|
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz")
|
|
sha256sums=('SKIP')
|
|
|
|
build() {
|
|
cd "$srcdir/$pkgname-$pkgver"
|
|
export RUSTFLAGS="-C target-cpu=${CARCH}"
|
|
cargo build --release --locked
|
|
}
|
|
|
|
package() {
|
|
cd "$srcdir/$pkgname-$pkgver"
|
|
|
|
# Binary
|
|
install -Dm755 "target/release/$pkgname" "$pkgdir/usr/bin/$pkgname"
|
|
|
|
# ALPM Hook
|
|
install -Dm644 "src/hook/hook.install" "$pkgdir/usr/share/libalpm/hooks/99-aegisaur.hook"
|
|
install -Dm755 "src/hook/check.sh" "$pkgdir/usr/share/libalpm/hooks/aegisaur-check.sh"
|
|
|
|
# Dokumentation
|
|
install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
|
|
install -Dm644 TODO.md "$pkgdir/usr/share/doc/$pkgname/TODO.md"
|
|
install -Dm644 INSTALL.md "$pkgdir/usr/share/doc/$pkgname/INSTALL.md"
|
|
install -Dm644 USAGE.md "$pkgdir/usr/share/doc/$pkgname/USAGE.md"
|
|
|
|
# Config Beispiel
|
|
install -Dm644 "config/example.toml" "$pkgdir/usr/share/$pkgname/config.example.toml"
|
|
|
|
# Licence
|
|
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
|
}
|
|
|
|
post_install() {
|
|
echo "╔══════════════════════════════════════════════════════════════╗"
|
|
echo "║ AegisAUR wurde installiert! ║"
|
|
echo "╚══════════════════════════════════════════════════════════════╝"
|
|
echo ""
|
|
echo "Nutzer-Spezifisches Setup:"
|
|
echo " aegisaur config → Erstellt ~/.config/aegisaur/config.toml"
|
|
echo ""
|
|
echo "Systemweites Setup (ALPM-Hook):"
|
|
echo " sudo aegisaur install-hook"
|
|
echo ""
|
|
echo "Schnellstart:"
|
|
echo " aegisaur scan-all → Scannt alle installierten AUR-Pakete"
|
|
echo " aegisaur check-ioc → Prüft gegen aktuelle IOC-Listen"
|
|
echo ""
|
|
echo "Mehr Infos: https://gitea.die-heimatlosen.eu/arch_agent/aegisaur"
|
|
}
|
|
|
|
pre_remove() {
|
|
echo "AegisAUR Hook wird entfernt..."
|
|
if command -v aegisaur >/dev/null 2>&1; then
|
|
aegisaur remove-hook 2>/dev/null || true
|
|
fi
|
|
}
|