# Maintainer: EndeavourOS-Team <info@endeavouros.com>

pkgname=eos-log-tool
pkgdesc="Gathers selected system logs and sends them to the internet."
url="https://github.com/endeavouros-team/PKGBUILDS/raw/master/$pkgname"
pkgver=25.10
pkgrel=1

arch=('any')
license=('GPL')
depends=(eos-bash-shared
         yad
         pciutils
         usbutils 
        )

optdepends=(
    'expac: for showing native packages (much faster)'
    'xclip: for automatic copying the returned URL to clipboard'
    'inxi: for inxi logs'
    'polkit: for pkexec'
)
backup=(etc/$pkgname.conf)

source=(
    $pkgname
    $pkgname.desktop
    $pkgname.conf
)
sha512sums=('e9283974f96bd509dd9bb9b516421a7515d80220cf916d97757a1eb581da26f698db735546358235f97ddb40f8030465833724aa3ab26cf7e2ff36e940c96b68'
            '6cd144109818f0da59a571956b55f0688b41f2e0bf467b059a1a4157206b038bd339955b1cb33a97c2eb51e0824b165b5e04656403db1fef39ee2797fb6a0189'
            '781f2d48101d0a0a23da049ccbaa70d3da30dda7e2e31458bcb671ceb25721dec86c7f32d87245554e5a3043cdf35fd9664761efe0a8cc82aeb982055488d229')

package() {
  install -Dm755 $pkgname                 $pkgdir/usr/bin/$pkgname
  install -Dm644 $pkgname.conf            $pkgdir/etc/$pkgname.conf

  install -d $pkgdir/usr/share/applications
  install -Dm755 $pkgname.desktop         $pkgdir/usr/share/applications/$pkgname.desktop
}
