# Tanım: Cinnamon Denetim Merkezi
# URL: https://github.com/linuxmint/cinnamon-control-center
# Paketçi: Cihan_Alkan
# Gerekler: glib intltool python-gobject python-pillow pypam python3-ptyprocess python3-pexpect docbook-xsl libgnomekbd colord glibmm network-manager-applet cinnamon-settings-daemon cinnamon-translations cinnamon-menus gnome-online-accounts
# Grup: sistem

isim=cinnamon-control-center
surum=4.0.1
devir=1
kaynak=(https://github.com/linuxmint/$isim/archive/$surum.tar.gz::$isim-$surum.tar.gz)

derle() {
  cd $isim-$surum   
    NOCONFIGURE=1 ./autogen.sh
 
    ./configure --prefix=/usr \
                --sysconfdir=/etc \
                --localstatedir=/var \
                --enable-systemd

    #https://bugzilla.gnome.org/show_bug.cgi?id=656229
    sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0 /g' -e 's/    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then/      func_append compile_command " -Wl,-O1,--as-needed"\n      func_append finalize_command " -Wl,-O1,--as-needed"\n\0/' libtool
    make
    make -C shell  DESTDIR="${PKG}" install-{libcinnamon_control_center_includeHEADERS,libLTLIBRARIES,pkgconfigDATA}
    make -C panels DESTDIR="${PKG}" install

    install -d -o root -g 102 -m 750 "${PKG}"/usr/share/polkit-1/rules.d
}