# Maintainer: Eli Schwartz <eschwartz@archlinux.org>
# Contributor: Alexandre Filgueria <alexfilgueira@antergos.com>
# Contributor:  Jan de Groot <jan@archlinux.org>

pkgname=cinnamon-desktop
pkgver=5.0.0
pkgrel=1
pkgdesc="Library with common API for various Cinnamon modules"
arch=('x86_64')
url="https://github.com/linuxmint/${pkgname}"
license=('GPL' 'LGPL')
depends=('accountsservice' 'gtk3' 'libxkbfile' 'libpulse')
makedepends=('meson' 'samurai' 'gobject-introspection' 'intltool')
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz"
        "config.patch")
sha256sums=('3fa2bcfe24f370b6a4ac5fc9aa6b08d8a191f23264eaacfd8264ff5bb6a67f24'
            '45f403e6fe4ec701a0f3d16e990bb36598dd4a58fac5a374f85ccecdf74dd98a')
b2sums=('955fea37ceca3d5ee33ab94aaa4e22cb6973fc87a53f05486cd16e7d05e6e0a5ca7d548f68544fbc13ecebe2f59aee07db73b0db2e810d020730f77f05843cf4'
        '40efc9c24e1011239f68734c6c0a9459dab95d4330d8c712e674c7d1e99dd01b60833667b52d0ad8c58b31469eee349757ed4c44e4589b6fbfd7236c1499d28b')

prepare() {
    cd "${srcdir}"/${pkgname}-${pkgver}
    # Adjust configuration
    patch -Np1 -i ../config.patch
}

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

    meson --prefix=/usr --buildtype=plain ..
    samu
}

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

    DESTDIR="${pkgdir}" samu install
}
