# Maintainer: Eli Schwartz <eschwartz@archlinux.org>
# Contributor: Nate Simon <aurpkg (at natesimon.net)>

pkgname=xed
pkgver=3.0.2
pkgrel=1
pkgdesc="A small and lightweight text editor. X-Apps Project."
arch=('x86_64')
url="https://github.com/linuxmint/${pkgname}"
license=('GPL')
groups=('x-apps')
depends=('gspell' 'gtksourceview4' 'libpeas' 'xapps')
makedepends=('meson' 'samurai' 'gobject-introspection' 'intltool' 'itstool')
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz")
sha256sums=('6e71347f64210369bd5ca2eefee36ee72ca9a701e40edfe4456115a95234e5c5')
b2sums=('c7e01840840ab65a8b678bd61949399a318c186236bd05d88a06798406d8cbc3c75db858ae750791a5013c5328ba4aeb2a114c6274cfb97d8290cc8cc7521385')

build() {
    mkdir -p "${srcdir}"/${pkgname}-${pkgver}/build
    cd "${srcdir}"/${pkgname}-${pkgver}/build

    meson --prefix=/usr \
          --libexecdir=lib/${pkgname} \
          --buildtype=plain \
          ..
    samu
}

package(){
    cd "${srcdir}"/${pkgname}-${pkgver}/build

    DESTDIR="${pkgdir}" samu install
}
