description='The Cinnamon Settings daemon.'
url='https://github.com/linuxmint/cinnamon-settings-daemon'

packager="spiky <spiky@nutyx.org>"

set=(cinnamon)

makedepends=(cinnamon-desktop libnotify
             libwacom libcanberra libgudev
             xorg-xf86-input-wacom librsvg)
run=(polkit nss upower libgnomekbd)

name=cinnamon-settings-daemon
version=5.6.1

PKGMK_KEEP_SOURCES="no"
source=(https://github.com/linuxmint/$name/archive/$version.tar.gz)

build() {
mkdir build
cd build
meson --prefix=/usr \
--libexecdir=/usr/lib/$name \
--buildtype=plain \
../$name-$version

ninja
DESTDIR=${PKG} ninja install
}
package() {
wget https://download.tuxfamily.org/nutyx/files/cinnamon-translations-5.2.2.tar.gz
bsdtar xf cinnamon-translations-5.2.2.tar.gz
cd cinnamon-translations-5.2.2
for file in po-export/$name/*.po
do
    LANG=${file/*-/}
    install -d $PKG/usr/share/locale/${LANG%.*}/LC_MESSAGES
    msgfmt -o $PKG/usr/share/locale/${LANG%.*}/LC_MESSAGES/$name.mo \
    $file
done
}
