anchor.diff:      sed -e 's,%sbindir%,${sbindir},g' \
           < ${WORKDIR}/gdm.service.in \
           > ${D}${systemd_unitdir}/system/gdm.service
  +
  +    chown -R gdm:gdm ${D}${localstatedir}/lib/gdm
  +    chmod 0750 ${D}${localstatedir}/lib/gdm
   }
   
   FILES_${PN} += "${datadir}/icon* \
  
positive.code: INITSCRIPT_NAME = "gdm"
  INITSCRIPT_PARAMS = "start 99 5 2 . stop 20 0 1 6 ."
  
  pkg_postinst_${PN} () {
      # can't do this offline
      if [ "x$D" != "x" ]; then
          exit 1
      fi
      grep "^gdm:" /etc/group > /dev/null || addgroup gdm
      grep "^gdm:" /etc/passwd > /dev/null || adduser --disabled-password --system --home /var/lib/gdm gdm --ingroup gdm -g gdm
  
  if [ -d /var/lib/gdm ]; then
      chown -R gdm:gdm /var/lib/gdm
      chmod 0750 /var/lib/gdm
  fi
  
  # Register up as default dm
  mkdir -p ${sysconfdir}/X11/
  echo "${bindir}/gdm" > ${sysconfdir}/X11/default-display-manager
  
  }
  
  pkg_postrm_${PN} () {
  
negative.code: }
  
  do_install_prepend() {
      install -d ${D}/${localstatedir}/lib/gdm/.gconf.mandatory
      install ${WORKDIR}/%gconf-tree.xml ${D}/${localstatedir}/lib/gdm/.gconf.mandatory/
  }
  
  do_install_append() {
  