# Tanım: Gelişmiş yenilikçi özellikler ve geleneksel kullanıcı deneyimi sağlayan Linux masaüstü
# URL: https://github.com/linuxmint/cinnamon
# Paketçi: Cihan_Alkan
# Gerekler: python-setproctitle caribou muffin cinnamon-settings-daemon cinnamon-session cinnamon-translations clutter-gtk libgnome-keyring cinnamon-control-center cinnamon-screensaver cinnamon-menus startup-notification libgnomekbd network-manager-applet nemo polkit-gnome xapps cjs
# Grup: cinnamon

isim=cinnamon
surum=3.8.2
devir=1
kaynak=(https://github.com/linuxmint/$isim/archive/$surum.tar.gz::$isim-$surum.tar.gz
        0001-cinanmon-settings-don-t-rely-on-the-presence-of-cinn.patch
        set_wheel.patch
        default-theme.patch)

derle() {
  cd Cinnamon-$surum
    patch -p1 -i ../0001-cinanmon-settings-don-t-rely-on-the-presence-of-cinn.patch
    patch -Np1 -i ../set_wheel.patch
    patch -Np1 -i ../default-theme.patch
    sed -i 's/mintinstall.desktop/org.gnome.Software.desktop/' data/org.cinnamon.gschema.xml.in
    sed -i 's/RequiredComponents=\(.*\)$/RequiredComponents=\1polkit-gnome-authentication-agent-1;/' \
        files/usr/share/cinnamon-session/sessions/cinnamon*.session
    sed -i 's|/usr/share/cinnamon-background-properties|/usr/share/gnome-background-properties|' \
        files/usr/share/cinnamon/cinnamon-settings/modules/cs_backgrounds.py

    NOCONFIGURE=1 ./autogen.sh
    ./configure --prefix=/usr \
                --sysconfdir=/etc \
                --libexecdir=/usr/lib/cinnamon \
                --localstatedir=/var \
                --disable-static \
                --disable-gtk-doc \
                --disable-schemas-compile \
                --enable-compile-warnings=yes \
                --without-ca-certificates

    sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
    make
    make DESTDIR="${PKG}" install
}
