# Maintainer: Wyllian Bezerra da Silva <wyllianbs@gmail.com>
pkgname=kate-quickrun
pkgver=1.0.2
pkgrel=1
pkgdesc="Quick Run plugin for Kate - compile and run the current file with one shortcut"
arch=('x86_64' 'aarch64')
url="https://github.com/wyllianbs/kate-quickrun"
license=('GPL-2.0-or-later')
depends=('ktexteditor' 'ki18n' 'kparts' 'kiconthemes' 'kservice' 'kxmlgui' 'kconfig' 'kcoreaddons' 'qt6-base')
optdepends=('konsole: embedded terminal (KPart) for the Quick Run own terminal')
makedepends=('cmake' 'extra-cmake-modules' 'gettext')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/wyllianbs/kate-quickrun/archive/refs/tags/v${pkgver}.tar.gz")
sha256sums=('c163888837e6cd1ea88d54496d090a1f9ddeaa09ca8af34f913ce76e96816885')

build() {
    cmake -B build -S "${srcdir}/kate-quickrun-${pkgver}" \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DCMAKE_BUILD_TYPE=Release
    cmake --build build
}

package() {
    DESTDIR="${pkgdir}" cmake --install build
}
