# Copyright (C) 2023 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the CC0 1.0 License.
# Maintainer: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>

pkgname=gnutoo-scripts
pkgver=0.0.2
pkgrel=3
pkgdesc="Various scripts that don't fit elsewhere"
arch=('any')
url='https://git.sr.ht/~gnutoo/scripts'
license=('GPL-3.0-or-later')
depends=('hdparm'         # storage.sh
         'openssh'        # ssh-gen.sh
         'poppler'        # for pdftocairo for shrink_pdf_size.sh
         'python'         # gen-pts-guix-test.py
         'smartmontools') # storage.sh
makedepends=('autoconf'
             'automake'
             'git'
             'shellcheck'
             'systemd')
optdepends=('postgresql-libs: for adding batteries to a (GNUtoo specific) database in batt.sh'
            'systemd: for automatic logging support in batt.sh')
source=("git+https://git.sr.ht/~gnutoo/scripts#commit=v${pkgver}")
sha512sums=('SKIP')

build(){
    cd scripts
    ./autogen.sh
    ./configure --prefix=/usr --with-systemd
    make
}

package(){
    cd scripts
    make install DESTDIR="${pkgdir}"
}
