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

pkgname=xed
pkgver=2.2.3
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' 'gtksourceview3' 'libpeas' 'xapps')
makedepends=('meson' 'samurai' 'gobject-introspection' 'intltool' 'itstool')
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz")
sha256sums=('2b451811791078275ae65b96a49954458e7d97dc0e64acaa62c328aa60b28f3b')
b2sums=('860c6ecef45ffe3b530abf3f2ad051e0601d3376733756dee3c1cbddebec75e2200ab00e1dc39848b46832914dc6fa5c0ccd46e4ad41ee5eb762a94ac8e2d6c8')

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
}
