# script

script:
  /usr/bin/find /usr/local/share/icons -type d -depth 1 -exec /usr/local/bin/gtk-update-icon-cache -q -f {} \; 2>/dev/null || /usr/bin/true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/Adwaita 2>/dev/null || /usr/bin/true


script:
  /usr/bin/find /usr/local/share/icons -type f -depth 2 -name icon-theme.cache -delete 2>/dev/null || /usr/bin/true


script:
  case "share/icons/Adwaita/icon-theme.cache" in
  	/*) f="share/icons/Adwaita/icon-theme.cache" ;;
  	 *) f="/usr/local/share/icons/Adwaita/icon-theme.cache" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/Adwaita 2>/dev/null || /usr/bin/true


script:
  /usr/local/bin/gio-querymodules /usr/local/lib/gio/modules 2>/dev/null || /usr/bin/true
  /sbin/ldconfig -m /usr/local/lib


script:
  /usr/local/bin/gio-querymodules /usr/local/lib/gio/modules 2>/dev/null || /usr/bin/true
  /sbin/ldconfig -R


script:
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/gnome 2>/dev/null || /usr/bin/true


script:
  case "share/icons/gnome/icon-theme.cache" in
  	/*) f="share/icons/gnome/icon-theme.cache" ;;
  	 *) f="/usr/local/share/icons/gnome/icon-theme.cache" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/gnome 2>/dev/null || /usr/bin/true


script:
  /usr/local/bin/xmlcatalog --noout --add "system" "http://glade.gnome.org/glade-2.0.dtd" /usr/local/share/xml/libglade/glade-2.0.dtd /usr/local/share/xml/catalog.ports || /usr/bin/true
  /sbin/ldconfig -m /usr/local/lib


script:
  /usr/local/bin/xmlcatalog --noout --del /usr/local/share/xml/libglade/glade-2.0.dtd /usr/local/share/xml/catalog.ports || /usr/bin/true
  /sbin/ldconfig -R


script:
  /sbin/ldconfig -m /usr/local/lib
    case "/usr/local/info/libcdio.info" in
    /*) file="/usr/local/info/libcdio.info" ;;
     *) file="/usr/local//usr/local/info/libcdio.info" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -R
    case "/usr/local/info/libcdio.info" in
    /*) file="/usr/local/info/libcdio.info" ;;
     *) file="/usr/local//usr/local/info/libcdio.info" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -m /usr/local/lib
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/sysutils/policykit-gnome/work gconftool-2 --makefile-install-rule /usr/local/etc/gconf/schemas/polkit-gnome.schemas > /dev/null || /usr/bin/true


script:
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/sysutils/policykit-gnome/work gconftool-2 --makefile-uninstall-rule /usr/local/etc/gconf/schemas/polkit-gnome.schemas > /dev/null || /usr/bin/true


script:
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/sysutils/gnome-mount/work gconftool-2 --makefile-install-rule /usr/local/etc/gconf/schemas/gnome-mount.schemas > /dev/null || /usr/bin/true


script:
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/sysutils/gnome-mount/work gconftool-2 --makefile-uninstall-rule /usr/local/etc/gconf/schemas/gnome-mount.schemas > /dev/null || /usr/bin/true


script:
  /sbin/ldconfig -m /usr/local/lib
    case "/usr/local/info/fftw3.info" in
    /*) file="/usr/local/info/fftw3.info" ;;
     *) file="/usr/local//usr/local/info/fftw3.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/fftw3.info-1" in
    /*) file="/usr/local/info/fftw3.info-1" ;;
     *) file="/usr/local//usr/local/info/fftw3.info-1" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/fftw3.info-2" in
    /*) file="/usr/local/info/fftw3.info-2" ;;
     *) file="/usr/local//usr/local/info/fftw3.info-2" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -R
    case "/usr/local/info/fftw3.info" in
    /*) file="/usr/local/info/fftw3.info" ;;
     *) file="/usr/local//usr/local/info/fftw3.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/fftw3.info-1" in
    /*) file="/usr/local/info/fftw3.info-1" ;;
     *) file="/usr/local//usr/local/info/fftw3.info-1" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/fftw3.info-2" in
    /*) file="/usr/local/info/fftw3.info-2" ;;
     *) file="/usr/local//usr/local/info/fftw3.info-2" ;;
    esac
    indexinfo ${file%/*}


script:
  echo "===> Creating users and/or groups."
  if ! /usr/sbin/pw groupshow webcamd >/dev/null 2>&1; then 
    echo "Creating group 'webcamd' with gid '145'." 
    /usr/sbin/pw groupadd webcamd -g 145; else echo "Using existing group 'webcamd'."
  fi
  if ! /usr/sbin/pw usershow webcamd >/dev/null 2>&1; then 
    echo "Creating user 'webcamd' with uid '145'." 
    /usr/sbin/pw useradd webcamd -u 145 -g 145  -c "Webcamd user" -d /var/empty -s /usr/sbin/nologin 
    else 
  echo "Using existing user 'webcamd'." 
  fi


script:
  if /usr/sbin/pw usershow webcamd >/dev/null 2>&1; then  echo "==> You should manually remove the \"webcamd\" user. "; fi


script:
  /sbin/ldconfig -m /usr/local/lib
    case "/usr/local/info/ksba.info" in
    /*) file="/usr/local/info/ksba.info" ;;
     *) file="/usr/local//usr/local/info/ksba.info" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -R
    case "/usr/local/info/ksba.info" in
    /*) file="/usr/local/info/ksba.info" ;;
     *) file="/usr/local//usr/local/info/ksba.info" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -m /usr/local/lib
    case "/usr/local/info/mpfr.info" in
    /*) file="/usr/local/info/mpfr.info" ;;
     *) file="/usr/local//usr/local/info/mpfr.info" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -R
    case "/usr/local/info/mpfr.info" in
    /*) file="/usr/local/info/mpfr.info" ;;
     *) file="/usr/local//usr/local/info/mpfr.info" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -m /usr/local/lib
    case "/usr/local/info/aalib.info" in
    /*) file="/usr/local/info/aalib.info" ;;
     *) file="/usr/local//usr/local/info/aalib.info" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -R
    case "/usr/local/info/aalib.info" in
    /*) file="/usr/local/info/aalib.info" ;;
     *) file="/usr/local//usr/local/info/aalib.info" ;;
    esac
    indexinfo ${file%/*}


script:
  #!/bin/sh

  case $2 in
  POST-INSTALL)
  	/bin/mkdir -p /var/db/AccountsService/users/
  	/bin/mkdir -p /var/db/AccountsService/icons/
  	exit 0
  	;;
  esac


script:
  update-desktop-database -q > /dev/null || true
  /sbin/ldconfig -m /usr/local/lib
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/hicolor 2>/dev/null || /usr/bin/true


script:
  case "share/icons/hicolor/icon-theme.cache" in
  	/*) f="share/icons/hicolor/icon-theme.cache" ;;
  	 *) f="/usr/local/share/icons/hicolor/icon-theme.cache" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
    update-desktop-database -q > /dev/null || true
  /sbin/ldconfig -R
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/hicolor 2>/dev/null || /usr/bin/true


script:
  /sbin/ldconfig -m /usr/local/lib
    case "/usr/local/info/libgtop2.info" in
    /*) file="/usr/local/info/libgtop2.info" ;;
     *) file="/usr/local//usr/local/info/libgtop2.info" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -R
    case "/usr/local/info/libgtop2.info" in
    /*) file="/usr/local/info/libgtop2.info" ;;
     *) file="/usr/local//usr/local/info/libgtop2.info" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -m /usr/local/lib
    case "/usr/local/info/assuan.info" in
    /*) file="/usr/local/info/assuan.info" ;;
     *) file="/usr/local//usr/local/info/assuan.info" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -R
    case "/usr/local/info/assuan.info" in
    /*) file="/usr/local/info/assuan.info" ;;
     *) file="/usr/local//usr/local/info/assuan.info" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -m /usr/local/lib
    case "/usr/local/info/libunistring.info" in
    /*) file="/usr/local/info/libunistring.info" ;;
     *) file="/usr/local//usr/local/info/libunistring.info" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -R
    case "/usr/local/info/libunistring.info" in
    /*) file="/usr/local/info/libunistring.info" ;;
     *) file="/usr/local//usr/local/info/libunistring.info" ;;
    esac
    indexinfo ${file%/*}


script:
  echo "===> Creating users and/or groups."
  if ! /usr/sbin/pw groupshow gdm >/dev/null 2>&1; then 
    echo "Creating group 'gdm' with gid '92'." 
    /usr/sbin/pw groupadd gdm -g 92; else echo "Using existing group 'gdm'."
  fi
  if ! /usr/sbin/pw usershow gdm >/dev/null 2>&1; then 
    echo "Creating user 'gdm' with uid '92'." 
    /usr/sbin/pw useradd gdm -u 92 -g 92  -c "GNOME Display Manager" -d /usr/local/etc/gdm/home -s /usr/sbin/nologin 
    else 
  echo "Using existing user 'gdm'." 
  fi
  install -d -g 92 -o 92 /usr/local/etc/gdm/home


script:
  #!/bin/sh

  case $2 in
  POST-INSTALL)
  	USER=gdm
  	GROUP=gdm
  	CHMOD=/bin/chmod
  	CHOWN=/usr/sbin/chown
  	MKDIR=/bin/mkdir

  	${MKDIR} -p /var/gdm
  	${MKDIR} -p /var/log/gdm
  	${CHMOD} 1770 /var/log/gdm
  	${CHOWN} ${USER}:${GROUP} /var/log/gdm
  	${CHOWN} -R root:${GROUP} /var/gdm
  	${CHMOD} 1770 /var/gdm
  	${MKDIR} -p /var/run/gdm/greeter
  	${CHOWN} root:${GROUP} /var/run/gdm
  	${CHMOD} -R 1777 /var/run/gdm
  	${MKDIR} -p /var/cache/gdm
  	${CHMOD} 1755 /var/cache/gdm
  	${CHOWN} root:${GROUP} /var/cache/gdm
  	${CHOWN} root:wheel ${PKG_PREFIX}/share/gdm
  	${CHMOD} 0755 ${PKG_PREFIX}/share/gdm
  	gconftool-2 --direct --config-source=xml:merged:${PKG_PREFIX}/etc/gdm/home/.gconf.mandatory --recursive-unset /
  	${CHOWN} -R ${USER}:${GROUP} ${PKG_PREFIX}/etc/gdm/home/.gconf.mandatory
  	${CHMOD} 1750 ${PKG_PREFIX}/etc/gdm/home/.gconf.mandatory
  	${CHMOD} 1640 ${PKG_PREFIX}/etc/gdm/home/.gconf.mandatory/*.xml

  	${MKDIR} -p ${PKG_PREFIX}/etc/gdm/Sessions
  	${MKDIR} -p ${PKG_PREFIX}/etc/dm/Sessions

  	${CHOWN} -R ${USER}:${GROUP} ${PKG_PREFIX}/etc/gdm/home

  	exit 0
  	;;
  esac


script:
  #!/bin/sh
  #
  # $FreeBSD$
  #

  case $2 in
  DEINSTALL)
  	echo ""
  	echo "To really remove the gdm port, please remove the following"
  	echo "directories manualy:"
  	echo ""
  	echo "/var/cache/gdm /var/gdm /var/log/gdm and /var/run/gdm"
  	echo ""
  	;;
  esac


script:
  /sbin/ldconfig -m /usr/local/lib
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/hicolor 2>/dev/null || /usr/bin/true


script:
  case "share/icons/hicolor/icon-theme.cache" in
  	/*) f="share/icons/hicolor/icon-theme.cache" ;;
  	 *) f="/usr/local/share/icons/hicolor/icon-theme.cache" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
  /sbin/ldconfig -R
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/hicolor 2>/dev/null || /usr/bin/true


script:
  case "etc/cdrecord.sample" in
    /*) sample_file="etc/cdrecord.sample" ;;
    *) sample_file="/usr/local/etc/cdrecord.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi


script:
  case "etc/cdrecord.sample" in
    /*) sample_file="etc/cdrecord.sample" ;;
    *) sample_file="/usr/local/etc/cdrecord.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi


script:
  [ -f /usr/local/etc/ffserver0.conf ] || cp /usr/local/etc/ffserver0.conf-dist /usr/local/etc/ffserver0.conf
  /sbin/ldconfig -m /usr/local/lib/ffmpeg0


script:
  if cmp -s /usr/local/etc/ffserver0.conf /usr/local/etc/ffserver0.conf-dist; then rm -f /usr/local/etc/ffserver0.conf; fi


script:
  /sbin/ldconfig -m /usr/local/lib
    case "/usr/local/info/gsl-ref.info" in
    /*) file="/usr/local/info/gsl-ref.info" ;;
     *) file="/usr/local//usr/local/info/gsl-ref.info" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -R
    case "/usr/local/info/gsl-ref.info" in
    /*) file="/usr/local/info/gsl-ref.info" ;;
     *) file="/usr/local//usr/local/info/gsl-ref.info" ;;
    esac
    indexinfo ${file%/*}


script:
  case "/usr/local/info/gnuchess.info" in
    /*) file="/usr/local/info/gnuchess.info" ;;
     *) file="/usr/local//usr/local/info/gnuchess.info" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -m /usr/local/lib
    case "/usr/local/info/guile.info" in
    /*) file="/usr/local/info/guile.info" ;;
     *) file="/usr/local//usr/local/info/guile.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/guile.info-1" in
    /*) file="/usr/local/info/guile.info-1" ;;
     *) file="/usr/local//usr/local/info/guile.info-1" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/guile.info-10" in
    /*) file="/usr/local/info/guile.info-10" ;;
     *) file="/usr/local//usr/local/info/guile.info-10" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/guile.info-2" in
    /*) file="/usr/local/info/guile.info-2" ;;
     *) file="/usr/local//usr/local/info/guile.info-2" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/guile.info-3" in
    /*) file="/usr/local/info/guile.info-3" ;;
     *) file="/usr/local//usr/local/info/guile.info-3" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/guile.info-4" in
    /*) file="/usr/local/info/guile.info-4" ;;
     *) file="/usr/local//usr/local/info/guile.info-4" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/guile.info-5" in
    /*) file="/usr/local/info/guile.info-5" ;;
     *) file="/usr/local//usr/local/info/guile.info-5" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/guile.info-6" in
    /*) file="/usr/local/info/guile.info-6" ;;
     *) file="/usr/local//usr/local/info/guile.info-6" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/guile.info-7" in
    /*) file="/usr/local/info/guile.info-7" ;;
     *) file="/usr/local//usr/local/info/guile.info-7" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/guile.info-8" in
    /*) file="/usr/local/info/guile.info-8" ;;
     *) file="/usr/local//usr/local/info/guile.info-8" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/guile.info-9" in
    /*) file="/usr/local/info/guile.info-9" ;;
     *) file="/usr/local//usr/local/info/guile.info-9" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/r5rs.info" in
    /*) file="/usr/local/info/r5rs.info" ;;
     *) file="/usr/local//usr/local/info/r5rs.info" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -R
    case "/usr/local/info/guile.info" in
    /*) file="/usr/local/info/guile.info" ;;
     *) file="/usr/local//usr/local/info/guile.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/guile.info-1" in
    /*) file="/usr/local/info/guile.info-1" ;;
     *) file="/usr/local//usr/local/info/guile.info-1" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/guile.info-10" in
    /*) file="/usr/local/info/guile.info-10" ;;
     *) file="/usr/local//usr/local/info/guile.info-10" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/guile.info-2" in
    /*) file="/usr/local/info/guile.info-2" ;;
     *) file="/usr/local//usr/local/info/guile.info-2" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/guile.info-3" in
    /*) file="/usr/local/info/guile.info-3" ;;
     *) file="/usr/local//usr/local/info/guile.info-3" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/guile.info-4" in
    /*) file="/usr/local/info/guile.info-4" ;;
     *) file="/usr/local//usr/local/info/guile.info-4" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/guile.info-5" in
    /*) file="/usr/local/info/guile.info-5" ;;
     *) file="/usr/local//usr/local/info/guile.info-5" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/guile.info-6" in
    /*) file="/usr/local/info/guile.info-6" ;;
     *) file="/usr/local//usr/local/info/guile.info-6" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/guile.info-7" in
    /*) file="/usr/local/info/guile.info-7" ;;
     *) file="/usr/local//usr/local/info/guile.info-7" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/guile.info-8" in
    /*) file="/usr/local/info/guile.info-8" ;;
     *) file="/usr/local//usr/local/info/guile.info-8" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/guile.info-9" in
    /*) file="/usr/local/info/guile.info-9" ;;
     *) file="/usr/local//usr/local/info/guile.info-9" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/r5rs.info" in
    /*) file="/usr/local/info/r5rs.info" ;;
     *) file="/usr/local//usr/local/info/r5rs.info" ;;
    esac
    indexinfo ${file%/*}


script:
  if [ ! -f "/usr/local/lib/python3.4/site-packages/easy-install.pth" ]; then cp -p /usr/local/lib/python3.4/site-packages/easy-install.pth.dist /usr/local/lib/python3.4/site-packages/easy-install.pth; fi


script:
  if cmp -s /usr/local/lib/python3.4/site-packages/easy-install.pth /usr/local/lib/python3.4/site-packages/easy-install.pth.dist; then rm -f /usr/local/lib/python3.4/site-packages/easy-install.pth; fi


script:
  case "/usr/local/share/fonts/misc" in
    /*) fontsdir="/usr/local/share/fonts/misc" ;;
    *) fontsdir="/usr/local//usr/local/share/fonts/misc" ;;
    esac
    fc-cache -fs ${fontsdir} 2>/dev/null || true
    mkfontscale ${fontsdir} 2>/dev/null || true
    mkfontdir ${fontsdir} 2>/dev/null || true


script:
  case "/usr/local/share/fonts/misc" in
    /*) fontsdir="/usr/local/share/fonts/misc" ;;
    *) fontsdir="/usr/local//usr/local/share/fonts/misc" ;;
    esac
    fc-cache -fs ${fontsdir} 2>/dev/null || true
    mkfontscale ${fontsdir} 2>/dev/null || true
    if [ -e ${fontsdir}/fonts.scale -a "`stat -f '%z' ${fontsdir}/fonts.scale 2>/dev/null`" = '2' ]; then
      rm ${fontsdir}/fonts.scale
    fi
    mkfontdir ${fontsdir} 2>/dev/null || true
    if [ -e ${fontsdir}/fonts.dir -a "`stat -f '%z' ${fontsdir}/fonts.dir 2>/dev/null`" = '2' ]; then
      rm ${fontsdir}/fonts.dir
    fi


script:
  case "/usr/local/share/fonts/100dpi" in
    /*) fontsdir="/usr/local/share/fonts/100dpi" ;;
    *) fontsdir="/usr/local//usr/local/share/fonts/100dpi" ;;
    esac
    fc-cache -fs ${fontsdir} 2>/dev/null || true
    mkfontscale ${fontsdir} 2>/dev/null || true
    mkfontdir ${fontsdir} 2>/dev/null || true


script:
  case "/usr/local/share/fonts/100dpi" in
    /*) fontsdir="/usr/local/share/fonts/100dpi" ;;
    *) fontsdir="/usr/local//usr/local/share/fonts/100dpi" ;;
    esac
    fc-cache -fs ${fontsdir} 2>/dev/null || true
    mkfontscale ${fontsdir} 2>/dev/null || true
    if [ -e ${fontsdir}/fonts.scale -a "`stat -f '%z' ${fontsdir}/fonts.scale 2>/dev/null`" = '2' ]; then
      rm ${fontsdir}/fonts.scale
    fi
    mkfontdir ${fontsdir} 2>/dev/null || true
    if [ -e ${fontsdir}/fonts.dir -a "`stat -f '%z' ${fontsdir}/fonts.dir 2>/dev/null`" = '2' ]; then
      rm ${fontsdir}/fonts.dir
    fi


script:
  case "/usr/local/share/fonts/Type1" in
    /*) fontsdir="/usr/local/share/fonts/Type1" ;;
    *) fontsdir="/usr/local//usr/local/share/fonts/Type1" ;;
    esac
    fc-cache -fs ${fontsdir} 2>/dev/null || true
    mkfontscale ${fontsdir} 2>/dev/null || true
    mkfontdir ${fontsdir} 2>/dev/null || true


script:
  case "/usr/local/share/fonts/Type1" in
    /*) fontsdir="/usr/local/share/fonts/Type1" ;;
    *) fontsdir="/usr/local//usr/local/share/fonts/Type1" ;;
    esac
    fc-cache -fs ${fontsdir} 2>/dev/null || true
    mkfontscale ${fontsdir} 2>/dev/null || true
    if [ -e ${fontsdir}/fonts.scale -a "`stat -f '%z' ${fontsdir}/fonts.scale 2>/dev/null`" = '2' ]; then
      rm ${fontsdir}/fonts.scale
    fi
    mkfontdir ${fontsdir} 2>/dev/null || true
    if [ -e ${fontsdir}/fonts.dir -a "`stat -f '%z' ${fontsdir}/fonts.dir 2>/dev/null`" = '2' ]; then
      rm ${fontsdir}/fonts.dir
    fi


script:
  case "/usr/local/share/fonts/cyrillic" in
    /*) fontsdir="/usr/local/share/fonts/cyrillic" ;;
    *) fontsdir="/usr/local//usr/local/share/fonts/cyrillic" ;;
    esac
    fc-cache -fs ${fontsdir} 2>/dev/null || true
    mkfontscale ${fontsdir} 2>/dev/null || true
    mkfontdir ${fontsdir} 2>/dev/null || true


script:
  case "/usr/local/share/fonts/cyrillic" in
    /*) fontsdir="/usr/local/share/fonts/cyrillic" ;;
    *) fontsdir="/usr/local//usr/local/share/fonts/cyrillic" ;;
    esac
    fc-cache -fs ${fontsdir} 2>/dev/null || true
    mkfontscale ${fontsdir} 2>/dev/null || true
    if [ -e ${fontsdir}/fonts.scale -a "`stat -f '%z' ${fontsdir}/fonts.scale 2>/dev/null`" = '2' ]; then
      rm ${fontsdir}/fonts.scale
    fi
    mkfontdir ${fontsdir} 2>/dev/null || true
    if [ -e ${fontsdir}/fonts.dir -a "`stat -f '%z' ${fontsdir}/fonts.dir 2>/dev/null`" = '2' ]; then
      rm ${fontsdir}/fonts.dir
    fi


script:
  case "/usr/local/share/fonts/75dpi" in
    /*) fontsdir="/usr/local/share/fonts/75dpi" ;;
    *) fontsdir="/usr/local//usr/local/share/fonts/75dpi" ;;
    esac
    fc-cache -fs ${fontsdir} 2>/dev/null || true
    mkfontscale ${fontsdir} 2>/dev/null || true
    mkfontdir ${fontsdir} 2>/dev/null || true


script:
  case "/usr/local/share/fonts/75dpi" in
    /*) fontsdir="/usr/local/share/fonts/75dpi" ;;
    *) fontsdir="/usr/local//usr/local/share/fonts/75dpi" ;;
    esac
    fc-cache -fs ${fontsdir} 2>/dev/null || true
    mkfontscale ${fontsdir} 2>/dev/null || true
    if [ -e ${fontsdir}/fonts.scale -a "`stat -f '%z' ${fontsdir}/fonts.scale 2>/dev/null`" = '2' ]; then
      rm ${fontsdir}/fonts.scale
    fi
    mkfontdir ${fontsdir} 2>/dev/null || true
    if [ -e ${fontsdir}/fonts.dir -a "`stat -f '%z' ${fontsdir}/fonts.dir 2>/dev/null`" = '2' ]; then
      rm ${fontsdir}/fonts.dir
    fi


script:
  if [ -f /usr/local/etc/cdrdao.conf ]; then echo "If permanently deleting this package, /usr/local/etc/cdrdao.conf must be removed manually."; fi


script:
  /sbin/ldconfig -m /usr/local/lib
    case "/usr/local/info/gpgme.info" in
    /*) file="/usr/local/info/gpgme.info" ;;
     *) file="/usr/local//usr/local/info/gpgme.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/gpgme.info-1" in
    /*) file="/usr/local/info/gpgme.info-1" ;;
     *) file="/usr/local//usr/local/info/gpgme.info-1" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/gpgme.info-2" in
    /*) file="/usr/local/info/gpgme.info-2" ;;
     *) file="/usr/local//usr/local/info/gpgme.info-2" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -R
    case "/usr/local/info/gpgme.info" in
    /*) file="/usr/local/info/gpgme.info" ;;
     *) file="/usr/local//usr/local/info/gpgme.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/gpgme.info-1" in
    /*) file="/usr/local/info/gpgme.info-1" ;;
     *) file="/usr/local//usr/local/info/gpgme.info-1" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/gpgme.info-2" in
    /*) file="/usr/local/info/gpgme.info-2" ;;
     *) file="/usr/local//usr/local/info/gpgme.info-2" ;;
    esac
    indexinfo ${file%/*}


script:
  if [ "$2" = "POST-INSTALL" ] && [ -e ${PKG_PREFIX}/etc/bogofilter.cf ] ; then
  cat - <<_EOF

  --------------------------------------------------------------------------
  The recent bogofilter versions have undergone substantial changes that can
  affect compatibility and may require that you change your configuration.

  See the RELEASE.NOTES file that shipped with bogofilter for details,
  particularly the sections with headings [Incompat ...] and [Major ...]!

  It is also advisable to check the README.* file for your database driver.
  --------------------------------------------------------------------------

  _EOF
  fi


script:
  #!/bin/sh

  PATH=/bin:/usr/bin:/usr/sbin

  case $2 in
  POST-INSTALL)
      mkdir -p ${PKG_PREFIX}/share/games
      SCORES="gtali.Colors.scores gtali.Regular.scores"
      for i in ${SCORES}; do
  	if [ ! -f ${PKG_PREFIX}/share/games/${i} ]; then
  	    touch -f ${PKG_PREFIX}/share/games/${i}
  	    chown games:games ${PKG_PREFIX}/share/games/${i}
  	    chmod 0666 ${PKG_PREFIX}/share/games/${i}
  	fi
      done
      ;;
  esac


script:
  #!/bin/sh

  PATH=/bin:/usr/bin:/usr/sbin

  case $2 in
  POST-INSTALL)
      mkdir -p ${PKG_PREFIX}/share/games
      SCORES="gnibbles.1.0.scores gnibbles.1.1.scores gnibbles.2.0.scores gnibbles.2.1.scores gnibbles.3.0.scores gnibbles.3.1.scores gnibbles.4.0.scores gnibbles.4.1.scores"
      for i in ${SCORES}; do
  	if [ ! -f ${PKG_PREFIX}/share/games/${i} ]; then
  	    touch -f ${PKG_PREFIX}/share/games/${i}
  	    chown games:games ${PKG_PREFIX}/share/games/${i}
  	    chmod 0666 ${PKG_PREFIX}/share/games/${i}
  	fi
      done
      ;;
  esac


script:
  [ -s /usr/local/share/games/glines.Large.scores ] || rm -f /usr/local/share/games/glines.Large.scores
  [ -s /usr/local/share/games/glines.Medium.scores ] || rm -f /usr/local/share/games/glines.Medium.scores
  [ -s /usr/local/share/games/glines.Small.scores ] || rm -f /usr/local/share/games/glines.Small.scores


script:
  #!/bin/sh

  PATH=/bin:/usr/bin:/usr/sbin

  case $2 in
  POST-INSTALL)
      mkdir -p ${PKG_PREFIX}/share/games
      SCORES="glines.Large.scores glines.Medium.scores glines.Small.scores"
      for i in ${SCORES}; do
  	if [ ! -f ${PKG_PREFIX}/share/games/${i} ]; then
  	    touch -f ${PKG_PREFIX}/share/games/${i}
  	    chown games:games ${PKG_PREFIX}/share/games/${i}
  	    chmod 0666 ${PKG_PREFIX}/share/games/${i}
  	fi
      done
      ;;
  esac


script:
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/games/aisleriot/work gconftool-2 --makefile-uninstall-rule /usr/local/etc/gconf/schemas/aisleriot.schemas > /dev/null || /usr/bin/true


script:
  case "/usr/local/info/tar.info" in
    /*) file="/usr/local/info/tar.info" ;;
     *) file="/usr/local//usr/local/info/tar.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/tar.info-1" in
    /*) file="/usr/local/info/tar.info-1" ;;
     *) file="/usr/local//usr/local/info/tar.info-1" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/tar.info-2" in
    /*) file="/usr/local/info/tar.info-2" ;;
     *) file="/usr/local//usr/local/info/tar.info-2" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/tar.info-3" in
    /*) file="/usr/local/info/tar.info-3" ;;
     *) file="/usr/local//usr/local/info/tar.info-3" ;;
    esac
    indexinfo ${file%/*}


script:
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/HighContrast 2>/dev/null || /usr/bin/true


script:
  case "share/icons/HighContrast/icon-theme.cache" in
  	/*) f="share/icons/HighContrast/icon-theme.cache" ;;
  	 *) f="/usr/local/share/icons/HighContrast/icon-theme.cache" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/HighContrast 2>/dev/null || /usr/bin/true


script:
  case "/usr/local/share/fonts/bitstream-vera" in
    /*) fontsdir="/usr/local/share/fonts/bitstream-vera" ;;
    *) fontsdir="/usr/local//usr/local/share/fonts/bitstream-vera" ;;
    esac
    fc-cache -fs ${fontsdir} 2>/dev/null || true
    mkfontscale ${fontsdir} 2>/dev/null || true
    mkfontdir ${fontsdir} 2>/dev/null || true


script:
  case "/usr/local/share/fonts/bitstream-vera" in
    /*) fontsdir="/usr/local/share/fonts/bitstream-vera" ;;
    *) fontsdir="/usr/local//usr/local/share/fonts/bitstream-vera" ;;
    esac
    fc-cache -fs ${fontsdir} 2>/dev/null || true
    mkfontscale ${fontsdir} 2>/dev/null || true
    if [ -e ${fontsdir}/fonts.scale -a "`stat -f '%z' ${fontsdir}/fonts.scale 2>/dev/null`" = '2' ]; then
      rm ${fontsdir}/fonts.scale
    fi
    mkfontdir ${fontsdir} 2>/dev/null || true
    if [ -e ${fontsdir}/fonts.dir -a "`stat -f '%z' ${fontsdir}/fonts.dir 2>/dev/null`" = '2' ]; then
      rm ${fontsdir}/fonts.dir
    fi


script:
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/sysutils/gconf-editor/work gconftool-2 --makefile-install-rule /usr/local/etc/gconf/schemas/gconf-editor.schemas > /dev/null || /usr/bin/true
  scrollkeeper-install -q /usr/local/share/omf/gconf-editor/gconf-editor-C.omf 2>/dev/null || /usr/bin/true
  scrollkeeper-install -q /usr/local/share/omf/gconf-editor/gconf-editor-ca.omf 2>/dev/null || /usr/bin/true
  scrollkeeper-install -q /usr/local/share/omf/gconf-editor/gconf-editor-cs.omf 2>/dev/null || /usr/bin/true
  scrollkeeper-install -q /usr/local/share/omf/gconf-editor/gconf-editor-de.omf 2>/dev/null || /usr/bin/true
  scrollkeeper-install -q /usr/local/share/omf/gconf-editor/gconf-editor-el.omf 2>/dev/null || /usr/bin/true
  scrollkeeper-install -q /usr/local/share/omf/gconf-editor/gconf-editor-en_GB.omf 2>/dev/null || /usr/bin/true
  scrollkeeper-install -q /usr/local/share/omf/gconf-editor/gconf-editor-es.omf 2>/dev/null || /usr/bin/true
  scrollkeeper-install -q /usr/local/share/omf/gconf-editor/gconf-editor-eu.omf 2>/dev/null || /usr/bin/true
  scrollkeeper-install -q /usr/local/share/omf/gconf-editor/gconf-editor-fr.omf 2>/dev/null || /usr/bin/true
  scrollkeeper-install -q /usr/local/share/omf/gconf-editor/gconf-editor-it.omf 2>/dev/null || /usr/bin/true
  scrollkeeper-install -q /usr/local/share/omf/gconf-editor/gconf-editor-oc.omf 2>/dev/null || /usr/bin/true
  scrollkeeper-install -q /usr/local/share/omf/gconf-editor/gconf-editor-pt_BR.omf 2>/dev/null || /usr/bin/true
  scrollkeeper-install -q /usr/local/share/omf/gconf-editor/gconf-editor-ru.omf 2>/dev/null || /usr/bin/true
  scrollkeeper-install -q /usr/local/share/omf/gconf-editor/gconf-editor-sl.omf 2>/dev/null || /usr/bin/true
  scrollkeeper-install -q /usr/local/share/omf/gconf-editor/gconf-editor-sv.omf 2>/dev/null || /usr/bin/true
  scrollkeeper-install -q /usr/local/share/omf/gconf-editor/gconf-editor-th.omf 2>/dev/null || /usr/bin/true
  scrollkeeper-install -q /usr/local/share/omf/gconf-editor/gconf-editor-uk.omf 2>/dev/null || /usr/bin/true
  scrollkeeper-install -q /usr/local/share/omf/gconf-editor/gconf-editor-zh_CN.omf 2>/dev/null || /usr/bin/true
  scrollkeeper-install -q /usr/local/share/omf/gconf-editor/gconf-editor-zh_HK.omf 2>/dev/null || /usr/bin/true
  scrollkeeper-install -q /usr/local/share/omf/gconf-editor/gconf-editor-zh_TW.omf 2>/dev/null || /usr/bin/true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/hicolor 2>/dev/null || /usr/bin/true


script:
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/sysutils/gconf-editor/work gconftool-2 --makefile-uninstall-rule /usr/local/etc/gconf/schemas/gconf-editor.schemas > /dev/null || /usr/bin/true
  scrollkeeper-uninstall -q /usr/local/share/omf/gconf-editor/gconf-editor-C.omf 2>/dev/null || /usr/bin/true
  scrollkeeper-uninstall -q /usr/local/share/omf/gconf-editor/gconf-editor-ca.omf 2>/dev/null || /usr/bin/true
  scrollkeeper-uninstall -q /usr/local/share/omf/gconf-editor/gconf-editor-cs.omf 2>/dev/null || /usr/bin/true
  scrollkeeper-uninstall -q /usr/local/share/omf/gconf-editor/gconf-editor-de.omf 2>/dev/null || /usr/bin/true
  scrollkeeper-uninstall -q /usr/local/share/omf/gconf-editor/gconf-editor-el.omf 2>/dev/null || /usr/bin/true
  scrollkeeper-uninstall -q /usr/local/share/omf/gconf-editor/gconf-editor-en_GB.omf 2>/dev/null || /usr/bin/true
  scrollkeeper-uninstall -q /usr/local/share/omf/gconf-editor/gconf-editor-es.omf 2>/dev/null || /usr/bin/true
  scrollkeeper-uninstall -q /usr/local/share/omf/gconf-editor/gconf-editor-eu.omf 2>/dev/null || /usr/bin/true
  scrollkeeper-uninstall -q /usr/local/share/omf/gconf-editor/gconf-editor-fr.omf 2>/dev/null || /usr/bin/true
  scrollkeeper-uninstall -q /usr/local/share/omf/gconf-editor/gconf-editor-it.omf 2>/dev/null || /usr/bin/true
  scrollkeeper-uninstall -q /usr/local/share/omf/gconf-editor/gconf-editor-oc.omf 2>/dev/null || /usr/bin/true
  scrollkeeper-uninstall -q /usr/local/share/omf/gconf-editor/gconf-editor-pt_BR.omf 2>/dev/null || /usr/bin/true
  scrollkeeper-uninstall -q /usr/local/share/omf/gconf-editor/gconf-editor-ru.omf 2>/dev/null || /usr/bin/true
  scrollkeeper-uninstall -q /usr/local/share/omf/gconf-editor/gconf-editor-sl.omf 2>/dev/null || /usr/bin/true
  scrollkeeper-uninstall -q /usr/local/share/omf/gconf-editor/gconf-editor-sv.omf 2>/dev/null || /usr/bin/true
  scrollkeeper-uninstall -q /usr/local/share/omf/gconf-editor/gconf-editor-th.omf 2>/dev/null || /usr/bin/true
  scrollkeeper-uninstall -q /usr/local/share/omf/gconf-editor/gconf-editor-uk.omf 2>/dev/null || /usr/bin/true
  scrollkeeper-uninstall -q /usr/local/share/omf/gconf-editor/gconf-editor-zh_CN.omf 2>/dev/null || /usr/bin/true
  scrollkeeper-uninstall -q /usr/local/share/omf/gconf-editor/gconf-editor-zh_HK.omf 2>/dev/null || /usr/bin/true
  scrollkeeper-uninstall -q /usr/local/share/omf/gconf-editor/gconf-editor-zh_TW.omf 2>/dev/null || /usr/bin/true


script:
  case "share/icons/hicolor/icon-theme.cache" in
  	/*) f="share/icons/hicolor/icon-theme.cache" ;;
  	 *) f="/usr/local/share/icons/hicolor/icon-theme.cache" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/hicolor 2>/dev/null || /usr/bin/true


script:
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/net-im/ekiga/work gconftool-2 --makefile-install-rule /usr/local/etc/gconf/schemas/ekiga.schemas > /dev/null || /usr/bin/true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/hicolor 2>/dev/null || /usr/bin/true


script:
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/net-im/ekiga/work gconftool-2 --makefile-uninstall-rule /usr/local/etc/gconf/schemas/ekiga.schemas > /dev/null || /usr/bin/true


script:
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/hicolor 2>/dev/null || /usr/bin/true


script:
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/mate 2>/dev/null || /usr/bin/true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/menta 2>/dev/null || /usr/bin/true


script:
  case "share/icons/mate/icon-theme.cache" in
  	/*) f="share/icons/mate/icon-theme.cache" ;;
  	 *) f="/usr/local/share/icons/mate/icon-theme.cache" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
  	case "share/icons/menta/icon-theme.cache" in
  	/*) f="share/icons/menta/icon-theme.cache" ;;
  	 *) f="/usr/local/share/icons/menta/icon-theme.cache" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/mate 2>/dev/null || /usr/bin/true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/menta 2>/dev/null || /usr/bin/true


script:
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/matefaenza 2>/dev/null || /usr/bin/true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/matefaenzadark 2>/dev/null || /usr/bin/true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/matefaenzagray 2>/dev/null || /usr/bin/true


script:
  case "share/icons/matefaenza/icon-theme.cache" in
  	/*) f="share/icons/matefaenza/icon-theme.cache" ;;
  	 *) f="/usr/local/share/icons/matefaenza/icon-theme.cache" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
  	case "share/icons/matefaenzadark/icon-theme.cache" in
  	/*) f="share/icons/matefaenzadark/icon-theme.cache" ;;
  	 *) f="/usr/local/share/icons/matefaenzadark/icon-theme.cache" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
  	case "share/icons/matefaenzagray/icon-theme.cache" in
  	/*) f="share/icons/matefaenzagray/icon-theme.cache" ;;
  	 *) f="/usr/local/share/icons/matefaenzagray/icon-theme.cache" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/matefaenza 2>/dev/null || /usr/bin/true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/matefaenzadark 2>/dev/null || /usr/bin/true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/matefaenzagray 2>/dev/null || /usr/bin/true


script:
  /sbin/ldconfig -m /usr/local/lib
    case "/usr/local/info/kpathsea.info" in
    /*) file="/usr/local/info/kpathsea.info" ;;
     *) file="/usr/local//usr/local/info/kpathsea.info" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -R
    case "/usr/local/info/kpathsea.info" in
    /*) file="/usr/local/info/kpathsea.info" ;;
     *) file="/usr/local//usr/local/info/kpathsea.info" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -m /usr/local/lib
  /usr/local/bin/mktexlsr  /usr/local/share/texmf /usr/local/share/texmf-dist /usr/local/share/texmf-local /usr/local/share/texmf-var /usr/local/share/texmf-config
    case "/usr/local/info/dvipng.info" in
    /*) file="/usr/local/info/dvipng.info" ;;
     *) file="/usr/local//usr/local/info/dvipng.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/tlbuild.info" in
    /*) file="/usr/local/info/tlbuild.info" ;;
     *) file="/usr/local//usr/local/info/tlbuild.info" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -R
  	case "share/texmf/ls-R" in
  	/*) f="share/texmf/ls-R" ;;
  	 *) f="/usr/local/share/texmf/ls-R" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
  	case "share/texmf-dist/ls-R" in
  	/*) f="share/texmf-dist/ls-R" ;;
  	 *) f="/usr/local/share/texmf-dist/ls-R" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
  	case "share/texmf-local/ls-R" in
  	/*) f="share/texmf-local/ls-R" ;;
  	 *) f="/usr/local/share/texmf-local/ls-R" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
  	case "share/texmf-var/ls-R" in
  	/*) f="share/texmf-var/ls-R" ;;
  	 *) f="/usr/local/share/texmf-var/ls-R" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
  	case "share/texmf-config/ls-R" in
  	/*) f="share/texmf-config/ls-R" ;;
  	 *) f="/usr/local/share/texmf-config/ls-R" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
    case "/usr/local/info/dvipng.info" in
    /*) file="/usr/local/info/dvipng.info" ;;
     *) file="/usr/local//usr/local/info/dvipng.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/tlbuild.info" in
    /*) file="/usr/local/info/tlbuild.info" ;;
     *) file="/usr/local//usr/local/info/tlbuild.info" ;;
    esac
    indexinfo ${file%/*}


script:
  for D in /usr/local/share/texmf /usr/local/share/texmf-dist; do  if [ -r $D/ls-R ]; then  /usr/local/bin/mktexlsr $D;  fi; done


script:
  for D in /usr/local/share/texmf-var; do  if [ -r $D/ls-R ]; then  /usr/local/bin/mktexlsr $D;  fi; done


script:
  for D in /usr/local/share/texmf-dist; do  if [ -r $D/ls-R ]; then  /usr/local/bin/mktexlsr $D;  fi; done
    case "/usr/local/info/dvips.info" in
    /*) file="/usr/local/info/dvips.info" ;;
     *) file="/usr/local//usr/local/info/dvips.info" ;;
    esac
    indexinfo ${file%/*}


script:
  for D in /usr/local/share/texmf-dist; do  if [ -r $D/ls-R ]; then  /usr/local/bin/mktexlsr $D;  fi; done


script:
  case "/usr/local/info/dvips.info" in
    /*) file="/usr/local/info/dvips.info" ;;
     *) file="/usr/local//usr/local/info/dvips.info" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -m /usr/local/lib
    glib-compile-schemas /usr/local/share/glib-2.0/schemas > /dev/null || true


script:
  case "share/icons/hicolor/icon-theme.cache" in
  	/*) f="share/icons/hicolor/icon-theme.cache" ;;
  	 *) f="/usr/local/share/icons/hicolor/icon-theme.cache" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
  /sbin/ldconfig -R
    glib-compile-schemas /usr/local/share/glib-2.0/schemas > /dev/null || true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/hicolor 2>/dev/null || /usr/bin/true


script:
  /sbin/ldconfig -m /usr/local/lib
    glib-compile-schemas /usr/local/share/glib-2.0/schemas > /dev/null || true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/hicolor 2>/dev/null || /usr/bin/true


script:
  /sbin/ldconfig -m /usr/local/lib
    glib-compile-schemas /usr/local/share/glib-2.0/schemas > /dev/null || true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/gnome 2>/dev/null || /usr/bin/true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/hicolor 2>/dev/null || /usr/bin/true


script:
  case "share/icons/gnome/icon-theme.cache" in
  	/*) f="share/icons/gnome/icon-theme.cache" ;;
  	 *) f="/usr/local/share/icons/gnome/icon-theme.cache" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
  	case "share/icons/hicolor/icon-theme.cache" in
  	/*) f="share/icons/hicolor/icon-theme.cache" ;;
  	 *) f="/usr/local/share/icons/hicolor/icon-theme.cache" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
  /sbin/ldconfig -R
    glib-compile-schemas /usr/local/share/glib-2.0/schemas > /dev/null || true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/gnome 2>/dev/null || /usr/bin/true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/hicolor 2>/dev/null || /usr/bin/true


script:
  /usr/local/bin/xmlcatmgr -sc /usr/local/share/sgml/catalog.ports add CATALOG /usr/local/share/sgml/gtk-doc/gtk-doc.cat


script:
  /usr/local/bin/xmlcatmgr -sc /usr/local/share/sgml/catalog.ports remove CATALOG /usr/local/share/sgml/gtk-doc/gtk-doc.cat


script:
  case "/usr/local/info/pinentry.info" in
    /*) file="/usr/local/info/pinentry.info" ;;
     *) file="/usr/local//usr/local/info/pinentry.info" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -m /usr/local/lib
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/devel/gnome-vfs/work gconftool-2 --makefile-install-rule /usr/local/etc/gconf/schemas/desktop_default_applications.schemas > /dev/null || /usr/bin/true
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/devel/gnome-vfs/work gconftool-2 --makefile-install-rule /usr/local/etc/gconf/schemas/desktop_gnome_url_handlers.schemas > /dev/null || /usr/bin/true
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/devel/gnome-vfs/work gconftool-2 --makefile-install-rule /usr/local/etc/gconf/schemas/system_dns_sd.schemas > /dev/null || /usr/bin/true
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/devel/gnome-vfs/work gconftool-2 --makefile-install-rule /usr/local/etc/gconf/schemas/system_http_proxy.schemas > /dev/null || /usr/bin/true
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/devel/gnome-vfs/work gconftool-2 --makefile-install-rule /usr/local/etc/gconf/schemas/system_smb.schemas > /dev/null || /usr/bin/true


script:
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/devel/gnome-vfs/work gconftool-2 --makefile-uninstall-rule /usr/local/etc/gconf/schemas/desktop_default_applications.schemas > /dev/null || /usr/bin/true
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/devel/gnome-vfs/work gconftool-2 --makefile-uninstall-rule /usr/local/etc/gconf/schemas/desktop_gnome_url_handlers.schemas > /dev/null || /usr/bin/true
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/devel/gnome-vfs/work gconftool-2 --makefile-uninstall-rule /usr/local/etc/gconf/schemas/system_dns_sd.schemas > /dev/null || /usr/bin/true
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/devel/gnome-vfs/work gconftool-2 --makefile-uninstall-rule /usr/local/etc/gconf/schemas/system_http_proxy.schemas > /dev/null || /usr/bin/true
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/devel/gnome-vfs/work gconftool-2 --makefile-uninstall-rule /usr/local/etc/gconf/schemas/system_smb.schemas > /dev/null || /usr/bin/true


script:
  #!/bin/sh
  #
  # $FreeBSD: head/devel/gnome-vfs/pkg-install.in 340719 2014-01-22 15:52:06Z mat $
  #   $MCom: ports/devel/gnome-vfs/pkg-install.in,v 1.28 2010/09/29 12:30:29 kwm Exp $
  #
  # Restore gconf keys of libgnome.

  if [ "$2" != "POST-INSTALL" ]; then
  	exit 0
  fi

  SCHEMAS=/usr/local/etc/gconf/schemas/desktop_gnome_applications_terminal.schemas

  if [ -f ${SCHEMAS} ]; then
  	env GCONF_CONFIG_SOURCE=xml::/usr/local/etc/gconf/gconf.xml.defaults \
  	/usr/local/bin/gconftool-2 --makefile-install-rule ${SCHEMAS} \
  		> /dev/null || /usr/bin/true
  fi

  exit 0


script:
  #!/bin/sh
  #
  # $FreeBSD: head/devel/gnome-vfs/pkg-deinstall.in 340719 2014-01-22 15:52:06Z mat $
  #   $MCom: ports/devel/gnome-vfs/pkg-deinstall.in,v 1.28 2010/09/29 12:30:29 kwm Exp $
  #
  # Restore gconf keys of libgnome.

  if [ "$2" != "POST-DEINSTALL" ]; then
  	exit 0
  fi

  SCHEMAS=/usr/local/etc/gconf/schemas/desktop_gnome_applications_terminal.schemas

  if [ -f ${SCHEMAS} ]; then
  	env GCONF_CONFIG_SOURCE=xml::/usr/local/etc/gconf/gconf.xml.defaults \
  	/usr/local/bin/gconftool-2 --makefile-install-rule ${SCHEMAS} \
  		> /dev/null || /usr/bin/true
  fi

  exit 0


script:
  case "etc/esd.conf.sample" in
    /*) sample_file="etc/esd.conf.sample" ;;
    *) sample_file="/usr/local/etc/esd.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
  /sbin/ldconfig -m /usr/local/lib


script:
  case "etc/esd.conf.sample" in
    /*) sample_file="etc/esd.conf.sample" ;;
    *) sample_file="/usr/local/etc/esd.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi


script:
  cp -n /usr/local/etc/php-fpm.conf.default /usr/local/etc/php-fpm.conf
  touch /usr/local/include/php/ext/php_config.h


script:
  if cmp -s /usr/local/etc/php-fpm.conf /usr/local/etc/php-fpm.conf.default; then rm -f /usr/local/etc/php-fpm.conf; fi
  [ -s /usr/local/include/php/ext/php_config.h ] || rm /usr/local/include/php/ext/php_config.h


script:
  /sbin/ldconfig -m /usr/local/lib
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/x11/libgnome/work gconftool-2 --makefile-install-rule /usr/local/etc/gconf/schemas/desktop_gnome_accessibility_keyboard.schemas > /dev/null || /usr/bin/true
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/x11/libgnome/work gconftool-2 --makefile-install-rule /usr/local/etc/gconf/schemas/desktop_gnome_accessibility_startup.schemas > /dev/null || /usr/bin/true
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/x11/libgnome/work gconftool-2 --makefile-install-rule /usr/local/etc/gconf/schemas/desktop_gnome_applications_at_mobility.schemas > /dev/null || /usr/bin/true
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/x11/libgnome/work gconftool-2 --makefile-install-rule /usr/local/etc/gconf/schemas/desktop_gnome_applications_at_visual.schemas > /dev/null || /usr/bin/true
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/x11/libgnome/work gconftool-2 --makefile-install-rule /usr/local/etc/gconf/schemas/desktop_gnome_applications_browser.schemas > /dev/null || /usr/bin/true
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/x11/libgnome/work gconftool-2 --makefile-install-rule /usr/local/etc/gconf/schemas/desktop_gnome_applications_office.schemas > /dev/null || /usr/bin/true
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/x11/libgnome/work gconftool-2 --makefile-install-rule /usr/local/etc/gconf/schemas/desktop_gnome_applications_terminal.schemas > /dev/null || /usr/bin/true
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/x11/libgnome/work gconftool-2 --makefile-install-rule /usr/local/etc/gconf/schemas/desktop_gnome_applications_window_manager.schemas > /dev/null || /usr/bin/true
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/x11/libgnome/work gconftool-2 --makefile-install-rule /usr/local/etc/gconf/schemas/desktop_gnome_background.schemas > /dev/null || /usr/bin/true
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/x11/libgnome/work gconftool-2 --makefile-install-rule /usr/local/etc/gconf/schemas/desktop_gnome_file_views.schemas > /dev/null || /usr/bin/true
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/x11/libgnome/work gconftool-2 --makefile-install-rule /usr/local/etc/gconf/schemas/desktop_gnome_interface.schemas > /dev/null || /usr/bin/true
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/x11/libgnome/work gconftool-2 --makefile-install-rule /usr/local/etc/gconf/schemas/desktop_gnome_lockdown.schemas > /dev/null || /usr/bin/true
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/x11/libgnome/work gconftool-2 --makefile-install-rule /usr/local/etc/gconf/schemas/desktop_gnome_peripherals_keyboard.schemas > /dev/null || /usr/bin/true
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/x11/libgnome/work gconftool-2 --makefile-install-rule /usr/local/etc/gconf/schemas/desktop_gnome_peripherals_mouse.schemas > /dev/null || /usr/bin/true
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/x11/libgnome/work gconftool-2 --makefile-install-rule /usr/local/etc/gconf/schemas/desktop_gnome_sound.schemas > /dev/null || /usr/bin/true
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/x11/libgnome/work gconftool-2 --makefile-install-rule /usr/local/etc/gconf/schemas/desktop_gnome_thumbnail_cache.schemas > /dev/null || /usr/bin/true
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/x11/libgnome/work gconftool-2 --makefile-install-rule /usr/local/etc/gconf/schemas/desktop_gnome_thumbnailers.schemas > /dev/null || /usr/bin/true
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/x11/libgnome/work gconftool-2 --makefile-install-rule /usr/local/etc/gconf/schemas/desktop_gnome_typing_break.schemas > /dev/null || /usr/bin/true


script:
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/x11/libgnome/work gconftool-2 --makefile-uninstall-rule /usr/local/etc/gconf/schemas/desktop_gnome_accessibility_keyboard.schemas > /dev/null || /usr/bin/true
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/x11/libgnome/work gconftool-2 --makefile-uninstall-rule /usr/local/etc/gconf/schemas/desktop_gnome_accessibility_startup.schemas > /dev/null || /usr/bin/true
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/x11/libgnome/work gconftool-2 --makefile-uninstall-rule /usr/local/etc/gconf/schemas/desktop_gnome_applications_at_mobility.schemas > /dev/null || /usr/bin/true
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/x11/libgnome/work gconftool-2 --makefile-uninstall-rule /usr/local/etc/gconf/schemas/desktop_gnome_applications_at_visual.schemas > /dev/null || /usr/bin/true
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/x11/libgnome/work gconftool-2 --makefile-uninstall-rule /usr/local/etc/gconf/schemas/desktop_gnome_applications_browser.schemas > /dev/null || /usr/bin/true
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/x11/libgnome/work gconftool-2 --makefile-uninstall-rule /usr/local/etc/gconf/schemas/desktop_gnome_applications_office.schemas > /dev/null || /usr/bin/true
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/x11/libgnome/work gconftool-2 --makefile-uninstall-rule /usr/local/etc/gconf/schemas/desktop_gnome_applications_terminal.schemas > /dev/null || /usr/bin/true
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/x11/libgnome/work gconftool-2 --makefile-uninstall-rule /usr/local/etc/gconf/schemas/desktop_gnome_applications_window_manager.schemas > /dev/null || /usr/bin/true
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/x11/libgnome/work gconftool-2 --makefile-uninstall-rule /usr/local/etc/gconf/schemas/desktop_gnome_background.schemas > /dev/null || /usr/bin/true
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/x11/libgnome/work gconftool-2 --makefile-uninstall-rule /usr/local/etc/gconf/schemas/desktop_gnome_file_views.schemas > /dev/null || /usr/bin/true
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/x11/libgnome/work gconftool-2 --makefile-uninstall-rule /usr/local/etc/gconf/schemas/desktop_gnome_interface.schemas > /dev/null || /usr/bin/true
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/x11/libgnome/work gconftool-2 --makefile-uninstall-rule /usr/local/etc/gconf/schemas/desktop_gnome_lockdown.schemas > /dev/null || /usr/bin/true
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/x11/libgnome/work gconftool-2 --makefile-uninstall-rule /usr/local/etc/gconf/schemas/desktop_gnome_peripherals_keyboard.schemas > /dev/null || /usr/bin/true
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/x11/libgnome/work gconftool-2 --makefile-uninstall-rule /usr/local/etc/gconf/schemas/desktop_gnome_peripherals_mouse.schemas > /dev/null || /usr/bin/true
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/x11/libgnome/work gconftool-2 --makefile-uninstall-rule /usr/local/etc/gconf/schemas/desktop_gnome_sound.schemas > /dev/null || /usr/bin/true
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/x11/libgnome/work gconftool-2 --makefile-uninstall-rule /usr/local/etc/gconf/schemas/desktop_gnome_thumbnail_cache.schemas > /dev/null || /usr/bin/true
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/x11/libgnome/work gconftool-2 --makefile-uninstall-rule /usr/local/etc/gconf/schemas/desktop_gnome_thumbnailers.schemas > /dev/null || /usr/bin/true
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/x11/libgnome/work gconftool-2 --makefile-uninstall-rule /usr/local/etc/gconf/schemas/desktop_gnome_typing_break.schemas > /dev/null || /usr/bin/true


script:
  #!/bin/sh
  #
  # $FreeBSD: head/x11/libgnome/files/pkg-deinstall.in 340719 2014-01-22 15:52:06Z mat $
  #   $MCom: ports/x11/libgnome/files/pkg-deinstall.in,v 1.29 2010/09/28 15:55:50 kwm Exp $
  #
  # Restore gconf keys of gnomevfs2.

  if [ "$2" != "POST-DEINSTALL" ]; then
  	exit 0
  fi

  SCHEMAS=/usr/local/etc/gconf/schemas/desktop_default_applications.schemas

  if [ -f ${SCHEMAS} ]; then
  	env GCONF_CONFIG_SOURCE=xml::/usr/local/etc/gconf/gconf.xml.defaults \
  	/usr/local/bin/gconftool-2 --makefile-install-rule ${SCHEMAS} \
  		> /dev/null || /usr/bin/true
  fi

  exit 0


script:
  echo \#include \"ext/xml/config.h\" >> /usr/local/include/php/ext/php_config.h
  echo extension=xml.so >> /usr/local/etc/php/extensions.ini


script:
  cp /usr/local/include/php/ext/php_config.h /usr/local/include/php/ext/php_config.h.orig
  grep -v ext/xml/config.h /usr/local/include/php/ext/php_config.h.orig > /usr/local/include/php/ext/php_config.h || true
  rm /usr/local/include/php/ext/php_config.h.orig
  cp /usr/local/etc/php/extensions.ini /usr/local/etc/php/extensions.ini.orig
  grep -v extension=xml\\.so /usr/local/etc/php/extensions.ini.orig > /usr/local/etc/php/extensions.ini || true
  rm /usr/local/etc/php/extensions.ini.orig
  [ -s /usr/local/etc/php/extensions.ini ] || rm /usr/local/etc/php/extensions.ini


script:
  #!/bin/sh

  PATH=/bin:/usr/bin:/usr/sbin

  case $2 in
  POST-INSTALL)
      mkdir -p ${PKG_PREFIX}/share/games
      SCORES="gnobots2.classic_robots-safe.scores gnobots2.classic_robots-super-safe.scores gnobots2.classic_robots.scores gnobots2.nightmare-safe.scores gnobots2.nightmare-super-safe.scores gnobots2.nightmare.scores gnobots2.robots2-safe.scores gnobots2.robots2-super-safe.scores gnobots2.robots2.scores gnobots2.robots2_easy-safe.scores gnobots2.robots2_easy-super-safe.scores gnobots2.robots2_easy.scores gnobots2.robots_with_safe_teleport-safe.scores gnobots2.robots_with_safe_teleport-super-safe.scores gnobots2.robots_with_safe_teleport.scores"
      for i in ${SCORES}; do
  	if [ ! -f ${PKG_PREFIX}/share/games/${i} ]; then
  	    touch -f ${PKG_PREFIX}/share/games/${i}
  	    chown games:games ${PKG_PREFIX}/share/games/${i}
  	    chmod 0666 ${PKG_PREFIX}/share/games/${i}
  	fi
      done
      ;;
  esac


script:
  echo \#include \"ext/simplexml/config.h\" >> /usr/local/include/php/ext/php_config.h
  echo extension=simplexml.so >> /usr/local/etc/php/extensions.ini


script:
  cp /usr/local/include/php/ext/php_config.h /usr/local/include/php/ext/php_config.h.orig
  grep -v ext/simplexml/config.h /usr/local/include/php/ext/php_config.h.orig > /usr/local/include/php/ext/php_config.h || true
  rm /usr/local/include/php/ext/php_config.h.orig
  cp /usr/local/etc/php/extensions.ini /usr/local/etc/php/extensions.ini.orig
  grep -v extension=simplexml\\.so /usr/local/etc/php/extensions.ini.orig > /usr/local/etc/php/extensions.ini || true
  rm /usr/local/etc/php/extensions.ini.orig
  [ -s /usr/local/etc/php/extensions.ini ] || rm /usr/local/etc/php/extensions.ini


script:
  echo \#include \"ext/json/config.h\" >> /usr/local/include/php/ext/php_config.h
  echo extension=json.so >> /usr/local/etc/php/extensions.ini


script:
  cp /usr/local/include/php/ext/php_config.h /usr/local/include/php/ext/php_config.h.orig
  grep -v ext/json/config.h /usr/local/include/php/ext/php_config.h.orig > /usr/local/include/php/ext/php_config.h || true
  rm /usr/local/include/php/ext/php_config.h.orig
  cp /usr/local/etc/php/extensions.ini /usr/local/etc/php/extensions.ini.orig
  grep -v extension=json\\.so /usr/local/etc/php/extensions.ini.orig > /usr/local/etc/php/extensions.ini || true
  rm /usr/local/etc/php/extensions.ini.orig
  [ -s /usr/local/etc/php/extensions.ini ] || rm /usr/local/etc/php/extensions.ini


script:
  echo \#include \"ext/curl/config.h\" >> /usr/local/include/php/ext/php_config.h
  echo extension=curl.so >> /usr/local/etc/php/extensions.ini


script:
  cp /usr/local/include/php/ext/php_config.h /usr/local/include/php/ext/php_config.h.orig
  grep -v ext/curl/config.h /usr/local/include/php/ext/php_config.h.orig > /usr/local/include/php/ext/php_config.h || true
  rm /usr/local/include/php/ext/php_config.h.orig
  cp /usr/local/etc/php/extensions.ini /usr/local/etc/php/extensions.ini.orig
  grep -v extension=curl\\.so /usr/local/etc/php/extensions.ini.orig > /usr/local/etc/php/extensions.ini || true
  rm /usr/local/etc/php/extensions.ini.orig
  [ -s /usr/local/etc/php/extensions.ini ] || rm /usr/local/etc/php/extensions.ini


script:
  /sbin/ldconfig -m /usr/local/lib
    case "/usr/local/info/mpc.info" in
    /*) file="/usr/local/info/mpc.info" ;;
     *) file="/usr/local//usr/local/info/mpc.info" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -R
    case "/usr/local/info/mpc.info" in
    /*) file="/usr/local/info/mpc.info" ;;
     *) file="/usr/local//usr/local/info/mpc.info" ;;
    esac
    indexinfo ${file%/*}


script:
  /usr/local/bin/xmlcatmgr -sc /usr/local/share/sgml/catalog.ports add CATALOG jade/catalog
  /sbin/ldconfig -m /usr/local/lib


script:
  /usr/local/bin/xmlcatmgr -sc /usr/local/share/sgml/catalog.ports remove jade/catalog
  /sbin/ldconfig -R


script:
  case "/usr/local/info/as.info" in
    /*) file="/usr/local/info/as.info" ;;
     *) file="/usr/local//usr/local/info/as.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/binutils.info" in
    /*) file="/usr/local/info/binutils.info" ;;
     *) file="/usr/local//usr/local/info/binutils.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/gprof.info" in
    /*) file="/usr/local/info/gprof.info" ;;
     *) file="/usr/local//usr/local/info/gprof.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/bfd.info" in
    /*) file="/usr/local/info/bfd.info" ;;
     *) file="/usr/local//usr/local/info/bfd.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/ld.info" in
    /*) file="/usr/local/info/ld.info" ;;
     *) file="/usr/local//usr/local/info/ld.info" ;;
    esac
    indexinfo ${file%/*}


script:
  #!/bin/sh

  if [ "X$2" = "XPOST-INSTALL" ]; then
  	perl -MXML::SAX -e "XML::SAX->add_parser('XML::LibXML::SAX'.\$_)->save_parsers()"
  	perl -MXML::SAX -e "XML::SAX->add_parser('XML::LibXML::SAX::Parser'.\$_)->save_parsers()"
  elif [ "X$2" = "XDEINSTALL" ]; then
  	perl -MXML::SAX -e "XML::SAX->remove_parser('XML::LibXML::SAX'.\$_)->save_parsers()"
  	perl -MXML::SAX -e "XML::SAX->remove_parser('XML::LibXML::SAX::Parser'.\$_)->save_parsers()"
  fi


script:
  case "/usr/local/info/gperf.info" in
    /*) file="/usr/local/info/gperf.info" ;;
     *) file="/usr/local//usr/local/info/gperf.info" ;;
    esac
    indexinfo ${file%/*}


script:
  echo "===> Creating users and/or groups."
  if ! /usr/sbin/pw groupshow git_daemon >/dev/null 2>&1; then 
    echo "Creating group 'git_daemon' with gid '964'." 
    /usr/sbin/pw groupadd git_daemon -g 964; else echo "Using existing group 'git_daemon'."
  fi
  if ! /usr/sbin/pw usershow git_daemon >/dev/null 2>&1; then 
    echo "Creating user 'git_daemon' with uid '964'." 
    /usr/sbin/pw useradd git_daemon -u 964 -g 964  -c "git daemon" -d /nonexistent -s /usr/sbin/nologin 
    else 
  echo "Using existing user 'git_daemon'." 
  fi


script:
  echo "Updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v /usr/local/libexec/git-core/git-shell /etc/shells.bak; echo /usr/local/libexec/git-core/git-shell) >/etc/shells; rm -f /etc/shells.bak


script:
  echo "Updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v /usr/local/libexec/git-core/git-shell /etc/shells.bak) >/etc/shells; rm -f /etc/shells.bak
  if /usr/sbin/pw usershow git_daemon >/dev/null 2>&1; then  echo "==> You should manually remove the \"git_daemon\" user. "; fi


script:
  if type ccache-update-links >/dev/null 2>&1; then ccache-update-links -v; fi
  /sbin/ldconfig -m /usr/local/lib/gcc5
    case "/usr/local/info/gcc5/cpp.info" in
    /*) file="/usr/local/info/gcc5/cpp.info" ;;
     *) file="/usr/local//usr/local/info/gcc5/cpp.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/gcc5/cppinternals.info" in
    /*) file="/usr/local/info/gcc5/cppinternals.info" ;;
     *) file="/usr/local//usr/local/info/gcc5/cppinternals.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/gcc5/gcc.info" in
    /*) file="/usr/local/info/gcc5/gcc.info" ;;
     *) file="/usr/local//usr/local/info/gcc5/gcc.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/gcc5/gccinstall.info" in
    /*) file="/usr/local/info/gcc5/gccinstall.info" ;;
     *) file="/usr/local//usr/local/info/gcc5/gccinstall.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/gcc5/gccint.info" in
    /*) file="/usr/local/info/gcc5/gccint.info" ;;
     *) file="/usr/local//usr/local/info/gcc5/gccint.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/gcc5/gfortran.info" in
    /*) file="/usr/local/info/gcc5/gfortran.info" ;;
     *) file="/usr/local//usr/local/info/gcc5/gfortran.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/gcc5/libgomp.info" in
    /*) file="/usr/local/info/gcc5/libgomp.info" ;;
     *) file="/usr/local//usr/local/info/gcc5/libgomp.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/gcc5/libquadmath.info" in
    /*) file="/usr/local/info/gcc5/libquadmath.info" ;;
     *) file="/usr/local//usr/local/info/gcc5/libquadmath.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/gcc5/libitm.info" in
    /*) file="/usr/local/info/gcc5/libitm.info" ;;
     *) file="/usr/local//usr/local/info/gcc5/libitm.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/gcc5/cp-tools.info" in
    /*) file="/usr/local/info/gcc5/cp-tools.info" ;;
     *) file="/usr/local//usr/local/info/gcc5/cp-tools.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/gcc5/gcj.info" in
    /*) file="/usr/local/info/gcc5/gcj.info" ;;
     *) file="/usr/local//usr/local/info/gcc5/gcj.info" ;;
    esac
    indexinfo ${file%/*}


script:
  if type ccache-update-links >/dev/null 2>&1; then ccache-update-links -v; fi
  /sbin/ldconfig -R
    case "/usr/local/info/gcc5/cpp.info" in
    /*) file="/usr/local/info/gcc5/cpp.info" ;;
     *) file="/usr/local//usr/local/info/gcc5/cpp.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/gcc5/cppinternals.info" in
    /*) file="/usr/local/info/gcc5/cppinternals.info" ;;
     *) file="/usr/local//usr/local/info/gcc5/cppinternals.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/gcc5/gcc.info" in
    /*) file="/usr/local/info/gcc5/gcc.info" ;;
     *) file="/usr/local//usr/local/info/gcc5/gcc.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/gcc5/gccinstall.info" in
    /*) file="/usr/local/info/gcc5/gccinstall.info" ;;
     *) file="/usr/local//usr/local/info/gcc5/gccinstall.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/gcc5/gccint.info" in
    /*) file="/usr/local/info/gcc5/gccint.info" ;;
     *) file="/usr/local//usr/local/info/gcc5/gccint.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/gcc5/gfortran.info" in
    /*) file="/usr/local/info/gcc5/gfortran.info" ;;
     *) file="/usr/local//usr/local/info/gcc5/gfortran.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/gcc5/libgomp.info" in
    /*) file="/usr/local/info/gcc5/libgomp.info" ;;
     *) file="/usr/local//usr/local/info/gcc5/libgomp.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/gcc5/libquadmath.info" in
    /*) file="/usr/local/info/gcc5/libquadmath.info" ;;
     *) file="/usr/local//usr/local/info/gcc5/libquadmath.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/gcc5/libitm.info" in
    /*) file="/usr/local/info/gcc5/libitm.info" ;;
     *) file="/usr/local//usr/local/info/gcc5/libitm.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/gcc5/cp-tools.info" in
    /*) file="/usr/local/info/gcc5/cp-tools.info" ;;
     *) file="/usr/local//usr/local/info/gcc5/cp-tools.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/gcc5/gcj.info" in
    /*) file="/usr/local/info/gcc5/gcj.info" ;;
     *) file="/usr/local//usr/local/info/gcc5/gcj.info" ;;
    esac
    indexinfo ${file%/*}


script:
  if type ccache-update-links >/dev/null 2>&1; then ccache-update-links -v; fi
  /sbin/ldconfig -m /usr/local/lib/gcc48
    case "/usr/local/info/gcc48/cpp.info" in
    /*) file="/usr/local/info/gcc48/cpp.info" ;;
     *) file="/usr/local//usr/local/info/gcc48/cpp.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/gcc48/cppinternals.info" in
    /*) file="/usr/local/info/gcc48/cppinternals.info" ;;
     *) file="/usr/local//usr/local/info/gcc48/cppinternals.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/gcc48/gcc.info" in
    /*) file="/usr/local/info/gcc48/gcc.info" ;;
     *) file="/usr/local//usr/local/info/gcc48/gcc.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/gcc48/gccinstall.info" in
    /*) file="/usr/local/info/gcc48/gccinstall.info" ;;
     *) file="/usr/local//usr/local/info/gcc48/gccinstall.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/gcc48/gccint.info" in
    /*) file="/usr/local/info/gcc48/gccint.info" ;;
     *) file="/usr/local//usr/local/info/gcc48/gccint.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/gcc48/gfortran.info" in
    /*) file="/usr/local/info/gcc48/gfortran.info" ;;
     *) file="/usr/local//usr/local/info/gcc48/gfortran.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/gcc48/libgomp.info" in
    /*) file="/usr/local/info/gcc48/libgomp.info" ;;
     *) file="/usr/local//usr/local/info/gcc48/libgomp.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/gcc48/libquadmath.info" in
    /*) file="/usr/local/info/gcc48/libquadmath.info" ;;
     *) file="/usr/local//usr/local/info/gcc48/libquadmath.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/gcc48/libitm.info" in
    /*) file="/usr/local/info/gcc48/libitm.info" ;;
     *) file="/usr/local//usr/local/info/gcc48/libitm.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/gcc48/cp-tools.info" in
    /*) file="/usr/local/info/gcc48/cp-tools.info" ;;
     *) file="/usr/local//usr/local/info/gcc48/cp-tools.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/gcc48/gcj.info" in
    /*) file="/usr/local/info/gcc48/gcj.info" ;;
     *) file="/usr/local//usr/local/info/gcc48/gcj.info" ;;
    esac
    indexinfo ${file%/*}


script:
  if type ccache-update-links >/dev/null 2>&1; then ccache-update-links -v; fi
  /sbin/ldconfig -R
    case "/usr/local/info/gcc48/cpp.info" in
    /*) file="/usr/local/info/gcc48/cpp.info" ;;
     *) file="/usr/local//usr/local/info/gcc48/cpp.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/gcc48/cppinternals.info" in
    /*) file="/usr/local/info/gcc48/cppinternals.info" ;;
     *) file="/usr/local//usr/local/info/gcc48/cppinternals.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/gcc48/gcc.info" in
    /*) file="/usr/local/info/gcc48/gcc.info" ;;
     *) file="/usr/local//usr/local/info/gcc48/gcc.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/gcc48/gccinstall.info" in
    /*) file="/usr/local/info/gcc48/gccinstall.info" ;;
     *) file="/usr/local//usr/local/info/gcc48/gccinstall.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/gcc48/gccint.info" in
    /*) file="/usr/local/info/gcc48/gccint.info" ;;
     *) file="/usr/local//usr/local/info/gcc48/gccint.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/gcc48/gfortran.info" in
    /*) file="/usr/local/info/gcc48/gfortran.info" ;;
     *) file="/usr/local//usr/local/info/gcc48/gfortran.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/gcc48/libgomp.info" in
    /*) file="/usr/local/info/gcc48/libgomp.info" ;;
     *) file="/usr/local//usr/local/info/gcc48/libgomp.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/gcc48/libquadmath.info" in
    /*) file="/usr/local/info/gcc48/libquadmath.info" ;;
     *) file="/usr/local//usr/local/info/gcc48/libquadmath.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/gcc48/libitm.info" in
    /*) file="/usr/local/info/gcc48/libitm.info" ;;
     *) file="/usr/local//usr/local/info/gcc48/libitm.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/gcc48/cp-tools.info" in
    /*) file="/usr/local/info/gcc48/cp-tools.info" ;;
     *) file="/usr/local//usr/local/info/gcc48/cp-tools.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/gcc48/gcj.info" in
    /*) file="/usr/local/info/gcc48/gcj.info" ;;
     *) file="/usr/local//usr/local/info/gcc48/gcj.info" ;;
    esac
    indexinfo ${file%/*}


script:
  case "/usr/local/info/gawk.info" in
    /*) file="/usr/local/info/gawk.info" ;;
     *) file="/usr/local//usr/local/info/gawk.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/gawkinet.info" in
    /*) file="/usr/local/info/gawkinet.info" ;;
     *) file="/usr/local//usr/local/info/gawkinet.info" ;;
    esac
    indexinfo ${file%/*}


script:
  case "/usr/local/info/flex.info" in
    /*) file="/usr/local/info/flex.info" ;;
     *) file="/usr/local//usr/local/info/flex.info" ;;
    esac
    indexinfo ${file%/*}


script:
  case "etc/asciidoc/asciidoc.conf.sample" in
    /*) sample_file="etc/asciidoc/asciidoc.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/asciidoc.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/asciidoc/docbook45.conf.sample" in
    /*) sample_file="etc/asciidoc/docbook45.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/docbook45.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/asciidoc/filters/code/code-filter.conf.sample" in
    /*) sample_file="etc/asciidoc/filters/code/code-filter.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/filters/code/code-filter.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/asciidoc/filters/graphviz/graphviz-filter.conf.sample" in
    /*) sample_file="etc/asciidoc/filters/graphviz/graphviz-filter.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/filters/graphviz/graphviz-filter.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/asciidoc/filters/latex/latex-filter.conf.sample" in
    /*) sample_file="etc/asciidoc/filters/latex/latex-filter.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/filters/latex/latex-filter.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/asciidoc/filters/music/music-filter.conf.sample" in
    /*) sample_file="etc/asciidoc/filters/music/music-filter.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/filters/music/music-filter.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/asciidoc/filters/source/source-highlight-filter.conf.sample" in
    /*) sample_file="etc/asciidoc/filters/source/source-highlight-filter.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/filters/source/source-highlight-filter.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/asciidoc/help.conf.sample" in
    /*) sample_file="etc/asciidoc/help.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/help.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/asciidoc/html4.conf.sample" in
    /*) sample_file="etc/asciidoc/html4.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/html4.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/asciidoc/html5.conf.sample" in
    /*) sample_file="etc/asciidoc/html5.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/html5.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/asciidoc/lang-cs.conf.sample" in
    /*) sample_file="etc/asciidoc/lang-cs.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/lang-cs.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/asciidoc/lang-de.conf.sample" in
    /*) sample_file="etc/asciidoc/lang-de.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/lang-de.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/asciidoc/lang-el.conf.sample" in
    /*) sample_file="etc/asciidoc/lang-el.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/lang-el.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/asciidoc/lang-en.conf.sample" in
    /*) sample_file="etc/asciidoc/lang-en.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/lang-en.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/asciidoc/lang-es.conf.sample" in
    /*) sample_file="etc/asciidoc/lang-es.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/lang-es.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/asciidoc/lang-fr.conf.sample" in
    /*) sample_file="etc/asciidoc/lang-fr.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/lang-fr.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/asciidoc/lang-hu.conf.sample" in
    /*) sample_file="etc/asciidoc/lang-hu.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/lang-hu.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/asciidoc/lang-it.conf.sample" in
    /*) sample_file="etc/asciidoc/lang-it.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/lang-it.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/asciidoc/lang-nl.conf.sample" in
    /*) sample_file="etc/asciidoc/lang-nl.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/lang-nl.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/asciidoc/lang-pt-BR.conf.sample" in
    /*) sample_file="etc/asciidoc/lang-pt-BR.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/lang-pt-BR.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/asciidoc/lang-ro.conf.sample" in
    /*) sample_file="etc/asciidoc/lang-ro.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/lang-ro.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/asciidoc/lang-ru.conf.sample" in
    /*) sample_file="etc/asciidoc/lang-ru.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/lang-ru.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/asciidoc/lang-uk.conf.sample" in
    /*) sample_file="etc/asciidoc/lang-uk.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/lang-uk.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/asciidoc/latex.conf.sample" in
    /*) sample_file="etc/asciidoc/latex.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/latex.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/asciidoc/slidy.conf.sample" in
    /*) sample_file="etc/asciidoc/slidy.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/slidy.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/asciidoc/text.conf.sample" in
    /*) sample_file="etc/asciidoc/text.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/text.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/asciidoc/xhtml11.conf.sample" in
    /*) sample_file="etc/asciidoc/xhtml11.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/xhtml11.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/asciidoc/xhtml11-quirks.conf.sample" in
    /*) sample_file="etc/asciidoc/xhtml11-quirks.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/xhtml11-quirks.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi


script:
  case "etc/asciidoc/asciidoc.conf.sample" in
    /*) sample_file="etc/asciidoc/asciidoc.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/asciidoc.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/asciidoc/docbook45.conf.sample" in
    /*) sample_file="etc/asciidoc/docbook45.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/docbook45.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/asciidoc/filters/code/code-filter.conf.sample" in
    /*) sample_file="etc/asciidoc/filters/code/code-filter.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/filters/code/code-filter.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/asciidoc/filters/graphviz/graphviz-filter.conf.sample" in
    /*) sample_file="etc/asciidoc/filters/graphviz/graphviz-filter.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/filters/graphviz/graphviz-filter.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/asciidoc/filters/latex/latex-filter.conf.sample" in
    /*) sample_file="etc/asciidoc/filters/latex/latex-filter.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/filters/latex/latex-filter.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/asciidoc/filters/music/music-filter.conf.sample" in
    /*) sample_file="etc/asciidoc/filters/music/music-filter.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/filters/music/music-filter.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/asciidoc/filters/source/source-highlight-filter.conf.sample" in
    /*) sample_file="etc/asciidoc/filters/source/source-highlight-filter.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/filters/source/source-highlight-filter.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/asciidoc/help.conf.sample" in
    /*) sample_file="etc/asciidoc/help.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/help.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/asciidoc/html4.conf.sample" in
    /*) sample_file="etc/asciidoc/html4.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/html4.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/asciidoc/html5.conf.sample" in
    /*) sample_file="etc/asciidoc/html5.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/html5.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/asciidoc/lang-cs.conf.sample" in
    /*) sample_file="etc/asciidoc/lang-cs.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/lang-cs.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/asciidoc/lang-de.conf.sample" in
    /*) sample_file="etc/asciidoc/lang-de.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/lang-de.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/asciidoc/lang-el.conf.sample" in
    /*) sample_file="etc/asciidoc/lang-el.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/lang-el.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/asciidoc/lang-en.conf.sample" in
    /*) sample_file="etc/asciidoc/lang-en.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/lang-en.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/asciidoc/lang-es.conf.sample" in
    /*) sample_file="etc/asciidoc/lang-es.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/lang-es.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/asciidoc/lang-fr.conf.sample" in
    /*) sample_file="etc/asciidoc/lang-fr.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/lang-fr.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/asciidoc/lang-hu.conf.sample" in
    /*) sample_file="etc/asciidoc/lang-hu.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/lang-hu.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/asciidoc/lang-it.conf.sample" in
    /*) sample_file="etc/asciidoc/lang-it.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/lang-it.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/asciidoc/lang-nl.conf.sample" in
    /*) sample_file="etc/asciidoc/lang-nl.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/lang-nl.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/asciidoc/lang-pt-BR.conf.sample" in
    /*) sample_file="etc/asciidoc/lang-pt-BR.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/lang-pt-BR.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/asciidoc/lang-ro.conf.sample" in
    /*) sample_file="etc/asciidoc/lang-ro.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/lang-ro.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/asciidoc/lang-ru.conf.sample" in
    /*) sample_file="etc/asciidoc/lang-ru.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/lang-ru.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/asciidoc/lang-uk.conf.sample" in
    /*) sample_file="etc/asciidoc/lang-uk.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/lang-uk.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/asciidoc/latex.conf.sample" in
    /*) sample_file="etc/asciidoc/latex.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/latex.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/asciidoc/slidy.conf.sample" in
    /*) sample_file="etc/asciidoc/slidy.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/slidy.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/asciidoc/text.conf.sample" in
    /*) sample_file="etc/asciidoc/text.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/text.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/asciidoc/xhtml11.conf.sample" in
    /*) sample_file="etc/asciidoc/xhtml11.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/xhtml11.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/asciidoc/xhtml11-quirks.conf.sample" in
    /*) sample_file="etc/asciidoc/xhtml11-quirks.conf.sample" ;;
    *) sample_file="/usr/local/etc/asciidoc/xhtml11-quirks.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi


script:
  update-desktop-database -q > /dev/null || true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/hicolor 2>/dev/null || /usr/bin/true


script:
  case "share/icons/hicolor/icon-theme.cache" in
  	/*) f="share/icons/hicolor/icon-theme.cache" ;;
  	 *) f="/usr/local/share/icons/hicolor/icon-theme.cache" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
    update-desktop-database -q > /dev/null || true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/hicolor 2>/dev/null || /usr/bin/true


script:
  touch /usr/local/include/qt5/QtCore/qconfig-modules.h
  /sbin/ldconfig -m /usr/local/lib
  echo '#include <QtCore/modules/qconfig-core.h>' >> /usr/local/include/qt5/QtCore/qconfig-modules.h


script:
  #!/bin/sh
  #
  # $FreeBSD: head/devel/qt5/files/pkg-deinstall.in 346930 2014-03-03 16:50:32Z makc $

  case $2 in
  POST-DEINSTALL)
    sed -i "" '/qconfig-core\.h/ d' \
      /usr/local/include/qt5/QtCore/qconfig-modules.h 2>/dev/null || true
    [ \! -e /usr/local/include/qt5/QtCore/qconfig.h ] &&
    [ \! -s /usr/local/include/qt5/QtCore/qconfig-modules.h ] &&
    ( rm -f /usr/local/include/qt5/QtCore/qconfig-modules.h 2>/dev/null
      rmdir /usr/local/include/qt5/QtCore 2>/dev/null
      rmdir /usr/local/include/qt5 2>/dev/null ) || true
    ;;
  esac


script:
  /sbin/ldconfig -m /usr/local/lib
  echo '#include <QtCore/modules/qconfig-dbus.h>' >> /usr/local/include/qt5/QtCore/qconfig-modules.h


script:
  #!/bin/sh
  #
  # $FreeBSD: head/devel/qt5/files/pkg-deinstall.in 346930 2014-03-03 16:50:32Z makc $

  case $2 in
  POST-DEINSTALL)
    sed -i "" '/qconfig-dbus\.h/ d' \
      /usr/local/include/qt5/QtCore/qconfig-modules.h 2>/dev/null || true
    [ \! -e /usr/local/include/qt5/QtCore/qconfig.h ] &&
    [ \! -s /usr/local/include/qt5/QtCore/qconfig-modules.h ] &&
    ( rm -f /usr/local/include/qt5/QtCore/qconfig-modules.h 2>/dev/null
      rmdir /usr/local/include/qt5/QtCore 2>/dev/null
      rmdir /usr/local/include/qt5 2>/dev/null ) || true
    ;;
  esac


script:
  /sbin/ldconfig -m /usr/local/lib
  echo '#include <QtCore/modules/qconfig-gui.h>' >> /usr/local/include/qt5/QtCore/qconfig-modules.h


script:
  #!/bin/sh
  #
  # $FreeBSD: head/devel/qt5/files/pkg-deinstall.in 346930 2014-03-03 16:50:32Z makc $

  case $2 in
  POST-DEINSTALL)
    sed -i "" '/qconfig-gui\.h/ d' \
      /usr/local/include/qt5/QtCore/qconfig-modules.h 2>/dev/null || true
    [ \! -e /usr/local/include/qt5/QtCore/qconfig.h ] &&
    [ \! -s /usr/local/include/qt5/QtCore/qconfig-modules.h ] &&
    ( rm -f /usr/local/include/qt5/QtCore/qconfig-modules.h 2>/dev/null
      rmdir /usr/local/include/qt5/QtCore 2>/dev/null
      rmdir /usr/local/include/qt5 2>/dev/null ) || true
    ;;
  esac


script:
  /sbin/ldconfig -m /usr/local/lib
  echo '#include <QtCore/modules/qconfig-widgets.h>' >> /usr/local/include/qt5/QtCore/qconfig-modules.h


script:
  #!/bin/sh
  #
  # $FreeBSD: head/devel/qt5/files/pkg-deinstall.in 346930 2014-03-03 16:50:32Z makc $

  case $2 in
  POST-DEINSTALL)
    sed -i "" '/qconfig-widgets\.h/ d' \
      /usr/local/include/qt5/QtCore/qconfig-modules.h 2>/dev/null || true
    [ \! -e /usr/local/include/qt5/QtCore/qconfig.h ] &&
    [ \! -s /usr/local/include/qt5/QtCore/qconfig-modules.h ] &&
    ( rm -f /usr/local/include/qt5/QtCore/qconfig-modules.h 2>/dev/null
      rmdir /usr/local/include/qt5/QtCore 2>/dev/null
      rmdir /usr/local/include/qt5 2>/dev/null ) || true
    ;;
  esac


script:
  /usr/bin/find /usr/local/share/icons -type d -depth 1 -exec /usr/local/bin/gtk-update-icon-cache -q -f {} \; 2>/dev/null || /usr/bin/true
  /usr/local/bin/gtk-query-immodules-2.0 --update-cache > /dev/null 2>&1 || /usr/bin/true
  /sbin/ldconfig -m /usr/local/lib


script:
  /usr/bin/find /usr/local/share/icons -type f -depth 2 -name icon-theme.cache -delete 2>/dev/null || /usr/bin/true
  /bin/rm -f /usr/local/lib/gtk-2.0/2.10.0/immodules.cache


script:
  case "/usr/local/info/indent.info" in
    /*) file="/usr/local/info/indent.info" ;;
     *) file="/usr/local//usr/local/info/indent.info" ;;
    esac
    indexinfo ${file%/*}


script:
  case "etc/ssl/cert.pem.sample" in
    /*) sample_file="etc/ssl/cert.pem.sample" ;;
    *) sample_file="/usr/local/etc/ssl/cert.pem.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "openssl/cert.pem.sample" in
    /*) sample_file="openssl/cert.pem.sample" ;;
    *) sample_file="/usr/local/openssl/cert.pem.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi


script:
  case "etc/ssl/cert.pem.sample" in
    /*) sample_file="etc/ssl/cert.pem.sample" ;;
    *) sample_file="/usr/local/etc/ssl/cert.pem.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "openssl/cert.pem.sample" in
    /*) sample_file="openssl/cert.pem.sample" ;;
    *) sample_file="/usr/local/openssl/cert.pem.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi


script:
  if [ ! -f "/usr/local/lib/python2.7/site-packages/easy-install.pth" ]; then cp -p /usr/local/lib/python2.7/site-packages/easy-install.pth.dist /usr/local/lib/python2.7/site-packages/easy-install.pth; fi


script:
  if cmp -s /usr/local/lib/python2.7/site-packages/easy-install.pth /usr/local/lib/python2.7/site-packages/easy-install.pth.dist; then rm -f /usr/local/lib/python2.7/site-packages/easy-install.pth; fi


script:
  case "etc/libgda-5.0/config.sample" in
    /*) sample_file="etc/libgda-5.0/config.sample" ;;
    *) sample_file="/usr/local/etc/libgda-5.0/config.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
  /sbin/ldconfig -m /usr/local/lib


script:
  case "etc/libgda-5.0/config.sample" in
    /*) sample_file="etc/libgda-5.0/config.sample" ;;
    *) sample_file="/usr/local/etc/libgda-5.0/config.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi


script:
  case "etc/lircd.conf.sample" in
    /*) sample_file="etc/lircd.conf.sample" ;;
    *) sample_file="/usr/local/etc/lircd.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
  /sbin/ldconfig -m /usr/local/lib


script:
  case "etc/lircd.conf.sample" in
    /*) sample_file="etc/lircd.conf.sample" ;;
    *) sample_file="/usr/local/etc/lircd.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi


script:
  /usr/local/bin/xmlcatmgr -sc /usr/local/share/sgml/catalog.ports add CATALOG /usr/local/share/xml/dtd/xhtml/xhtml-dcl.soc
  /usr/local/bin/xmlcatmgr -c /usr/local/share/xml/catalog.ports add nextCatalog /usr/local/share/xml/dtd/xhtml/catalog.xml


script:
  /usr/local/bin/xmlcatmgr -sc /usr/local/share/sgml/catalog.ports remove /usr/local/share/xml/dtd/xhtml/xhtml-dcl.soc
  /usr/local/bin/xmlcatmgr -c /usr/local/share/xml/catalog.ports remove /usr/local/share/xml/dtd/xhtml/catalog.xml


script:
  #!/bin/sh
  # $FreeBSD: head/textproc/docbook-xsl-ns/files/pkg-install.in 333527 2013-11-11 17:41:15Z hrs $
  # This script will create the docbook-xsl catalog and will add entries to xml catalog.
  # WARNING: If you change this script, be sure to check pkg-deinstall.in!
  #
  # Based on http://xmlsoft.org/buildDocBookCatalog file.
  #
  # Run the following command to generate a new VERSIONS string:
  # perl -n -e '/Version ([\d.]+) rel/ && print "$1\n"' work/*/ChangeLog |
  #     sort -n | tr '\n' ' '
  #
  # -- Rui Lopes <rui@ruilopes.com>

  case $2 in
  POST-INSTALL)
  	/usr/local/bin/xmlcatmgr -c /usr/local/share/xml/catalog.ports add nextCatalog \
  	    "${PKG_PREFIX}/share/xsl/docbook-ns/catalog.xml"
  ;;
  POST-DEINSTALL)
  	/usr/local/bin/xmlcatmgr -c /usr/local/share/xml/catalog.ports remove \
  	    "${PKG_PREFIX}/share/xsl/docbook-ns/catalog.xml"
  ;;
  esac
  exit 0


script:
  /usr/local/bin/xmlcatmgr -sc /usr/local/share/sgml/catalog.ports add CATALOG docbook/dsssl/modular/catalog


script:
  /usr/local/bin/xmlcatmgr -sc /usr/local/share/sgml/catalog.ports remove docbook/dsssl/modular/catalog


script:
  for D in /usr/local/share/texmf-dist /usr/local/share/texmf-var; do  if [ -r $D/ls-R ]; then  /usr/local/bin/mktexlsr $D;  fi; done


script:
  case "etc/lynx.cfg.sample" in
    /*) sample_file="etc/lynx.cfg.sample" ;;
    *) sample_file="/usr/local/etc/lynx.cfg.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/lynx.lss.sample" in
    /*) sample_file="etc/lynx.lss.sample" ;;
    *) sample_file="/usr/local/etc/lynx.lss.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
  mkdir -p /usr/local/share/lynx_help
  ln -sf /usr/local/share/doc/lynx/COPYHEADER.asc /usr/local/share/lynx_help
  ln -sf /usr/local/share/doc/lynx/COPYING.asc /usr/local/share/lynx_help


script:
  case "etc/lynx.cfg.sample" in
    /*) sample_file="etc/lynx.cfg.sample" ;;
    *) sample_file="/usr/local/etc/lynx.cfg.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/lynx.lss.sample" in
    /*) sample_file="etc/lynx.lss.sample" ;;
    *) sample_file="/usr/local/etc/lynx.lss.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
  rm -f /usr/local/share/lynx_help/COPYHEADER.asc
  rm -f /usr/local/share/lynx_help/COPYING.asc


script:
  /usr/local/bin/xmlcatmgr -c /usr/local/share/xml/catalog.ports add nextCatalog  /usr/local/share/xml/dtd/xhtml-modularization/catalog.xml
  /usr/local/bin/xmlcatmgr -sc /usr/local/share/sgml/catalog.ports add CATALOG  /usr/local/share/xml/dtd/xhtml-modularization/xhtml.cat


script:
  /usr/local/bin/xmlcatmgr -c /usr/local/share/xml/catalog.ports remove  /usr/local/share/xml/dtd/xhtml-modularization/catalog.xml
  /usr/local/bin/xmlcatmgr -sc /usr/local/share/sgml/catalog.ports remove  /usr/local/share/xml/dtd/xhtml-modularization/xhtml.cat


script:
  /usr/local/bin/xmlcatmgr -c /usr/local/share/xml/catalog.ports add nextCatalog  /usr/local/share/xml/dtd/xhtml-basic/catalog.xml
  /usr/local/bin/xmlcatmgr -sc /usr/local/share/sgml/catalog.ports add CATALOG  /usr/local/share/xml/dtd/xhtml-basic/xhtml-basic10.cat


script:
  /usr/local/bin/xmlcatmgr -c /usr/local/share/xml/catalog.ports remove  /usr/local/share/xml/dtd/xhtml-basic/catalog.xml
  /usr/local/bin/xmlcatmgr -sc /usr/local/share/sgml/catalog.ports remove  /usr/local/share/xml/dtd/xhtml-basic/xhtml-basic10.cat


script:
  /usr/local/bin/xmlcatmgr -c /usr/local/share/xml/catalog.ports add nextCatalog  /usr/local/share/xml/dtd/vuxml/catalog.xml
  /usr/local/bin/xmlcatmgr -sc /usr/local/share/sgml/catalog.ports add CATALOG  /usr/local/share/xml/dtd/vuxml/catalog


script:
  /usr/local/bin/xmlcatmgr -c /usr/local/share/xml/catalog.ports remove nextCatalog  /usr/local/share/xml/dtd/vuxml/catalog.xml
  /usr/local/bin/xmlcatmgr -sc /usr/local/share/sgml/catalog.ports remove CATALOG  /usr/local/share/xml/dtd/vuxml/catalog


script:
  case "lib/perl5/5.20/perl/man/whatis" in
  	/*) f="lib/perl5/5.20/perl/man/whatis" ;;
  	 *) f="/usr/local/lib/perl5/5.20/perl/man/whatis" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
  	case "lib/perl5/site_perl/man/whatis" in
  	/*) f="lib/perl5/site_perl/man/whatis" ;;
  	 *) f="/usr/local/lib/perl5/site_perl/man/whatis" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true


script:
  #!/bin/sh
  #
  # $FreeBSD: /tmp/pcvs/ports/java/javavmwrapper/files/pkg-install.in,v 1.3 2006-06-03 17:32:24 glewis Exp $

  LOCALBASE=/usr/local

  # This script runs during post-install
  if [ "x${2}" != "xPOST-INSTALL" ]; then
      exit 0
  fi

  # The option configuration file
  OPTION_CONF="${PKG_PREFIX}/etc/javavm_opts.conf"

  # Install default javavm options configuration
  if [ ! -e "${OPTION_CONF}" ]; then
      cp "${OPTION_CONF}.dist" "${OPTION_CONF}"
  else
      echo "${OPTION_CONF} already exists - not installing."
      echo "You may need to hand merge changes."
  fi

  # Ensure all JDKs and JREs are installed
  _excl_dirs='bootstrap-openjdk'
  _find_expr='-depth 2 -regex .*/bin/java'
  for dir in ${_excl_dirs}; do
      _find_expr="${_find_expr} ! -regex ${dir}/bin/java"
  done
  for jvm in `cd "${LOCALBASE}" && find *jdk* *jre* ${_find_expr} 2> /dev/null`; do
      if [ -x "${LOCALBASE}/${jvm}" ]; then
          "${PKG_PREFIX}"/bin/registervm "${LOCALBASE}/${jvm}" > /dev/null 2>&1
      fi
  done

  # Ensure all VMs are configured correctly
  "${PKG_PREFIX}"/bin/checkvms


script:
  #!/bin/sh
  #
  # $FreeBSD: head/java/javavmwrapper/pkg-deinstall 340719 2014-01-22 15:52:06Z mat $

  export PATH=/bin:/sbin:/usr/bin:/usr/sbin

  # Run this script at the pre-deinstall stage
  if [ "x${2}" != "xDEINSTALL" ]; then
      exit 0
  fi

  # The option configuration file
  OPTION_CONF="${PKG_PREFIX}/etc/javavm_opts.conf"

  # Remove the option configuration file if its identical to the
  # distributed version.
  if [ -f "${OPTION_CONF}" -a -f "${OPTION_CONF}.dist" ]; then
  	if [ `sed -e '/^#/d' -e '/^\s*$/d' "${OPTION_CONF}" | sort | md5` = \
  	     `sed -e '/^#/d' -e '/^\s*$/d' "${OPTION_CONF}.dist" | sort | md5` ]; then
  		rm -f "${OPTION_CONF}"
  	fi
  fi

  # Destroy the symbolic links that were created for every executable for a VM.
  _excl_links='checkvms manvm registervm unregistervm'
  _find_expr='-depth 1 -type l'
  for i in ${_excl_links}; do
  	_find_expr="${_find_expr} ! -name ${i}"
  done
  _javavm_path=`realpath ${PKG_PREFIX}/bin/javavm`
  for i in `find ${PKG_PREFIX}/bin ${_find_expr}`; do
  	if [ "${_javavm_path}" = `realpath ${i}` ]; then
  		rm -f "${i}"
  	fi
  done

  # The configuration file
  CONF="${PKG_PREFIX}/etc/javavms"

  # Ensure the configuration file exists
  if [ ! -f "${CONF}" ]; then
      exit 0
  fi

  # Ensure the configuration file has the correct permissions
  if [ ! -r "${CONF}" ]; then
      echo "error: can't read configuration file ${CONF}" 1>&2
      exit 1
  fi

  # Remove the configuration file.
  rm -f "${CONF}"

  exit 0


script:
  /usr/local/bin/gdk-pixbuf-query-loaders > /dev/null 2>&1 && /usr/local/bin/gdk-pixbuf-query-loaders > /usr/local/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache 2>/dev/null || /usr/bin/true
  /sbin/ldconfig -m /usr/local/lib


script:
  case "/usr/local/info/texinfo.info" in
    /*) file="/usr/local/info/texinfo.info" ;;
     *) file="/usr/local//usr/local/info/texinfo.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/texinfo.info-1" in
    /*) file="/usr/local/info/texinfo.info-1" ;;
     *) file="/usr/local//usr/local/info/texinfo.info-1" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/texinfo.info-2" in
    /*) file="/usr/local/info/texinfo.info-2" ;;
     *) file="/usr/local//usr/local/info/texinfo.info-2" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/texinfo.info-3" in
    /*) file="/usr/local/info/texinfo.info-3" ;;
     *) file="/usr/local//usr/local/info/texinfo.info-3" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/info-stnd.info" in
    /*) file="/usr/local/info/info-stnd.info" ;;
     *) file="/usr/local//usr/local/info/info-stnd.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/info.info" in
    /*) file="/usr/local/info/info.info" ;;
     *) file="/usr/local//usr/local/info/info.info" ;;
    esac
    indexinfo ${file%/*}


script:
  #!/bin/sh
  # $FreeBSD: head/print/texinfo/pkg-install 340719 2014-01-22 15:52:06Z mat $

  [ $# != 2 ] && exit 1
  PKGNAME=$1
  ACTION=$2

  PATH="${PKG_PREFIX}/bin:${LOCALBASE}/bin:/usr/bin:${PATH}"

  SETENV=env
  TEXHASH=texhash
  TRUE=true

  case "$ACTION" in

  POST-INSTALL|DEINSTALL)
  	${SETENV} PATH="${PATH}" ${TEXHASH} 2>/dev/null || ${TRUE}
  	;;

  PRE-INSTALL|POST-DEINSTALL)
  	;;

  *)
  	exit 1
  	;;
  esac

  exit


script:
  /usr/local/bin/gtk-query-immodules-3.0 --update-cache > /dev/null 2>&1 || /usr/bin/true
  /bin/mkdir -p /usr/local/lib/gtk-3.0/modules
  /bin/mkdir -p /usr/local/lib/gtk-3.0/3.0.0/engines
  /bin/mkdir -p /usr/local/lib/gtk-3.0/3.0.0/loaders
  /sbin/ldconfig -m /usr/local/lib
    glib-compile-schemas /usr/local/share/glib-2.0/schemas > /dev/null || true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/hicolor 2>/dev/null || /usr/bin/true


script:
  case "share/icons/hicolor/icon-theme.cache" in
  	/*) f="share/icons/hicolor/icon-theme.cache" ;;
  	 *) f="/usr/local/share/icons/hicolor/icon-theme.cache" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
  	case "lib/gtk-3.0/3.0.0/immodules.cache" in
  	/*) f="lib/gtk-3.0/3.0.0/immodules.cache" ;;
  	 *) f="/usr/local/lib/gtk-3.0/3.0.0/immodules.cache" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
  /sbin/ldconfig -R
    glib-compile-schemas /usr/local/share/glib-2.0/schemas > /dev/null || true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/hicolor 2>/dev/null || /usr/bin/true


script:
  update-desktop-database -q > /dev/null || true
    update-mime-database /usr/local/share/mime || true
  /sbin/ldconfig -m /usr/local/lib
    glib-compile-schemas /usr/local/share/glib-2.0/schemas > /dev/null || true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/hicolor 2>/dev/null || /usr/bin/true


script:
  case "share/icons/hicolor/icon-theme.cache" in
  	/*) f="share/icons/hicolor/icon-theme.cache" ;;
  	 *) f="/usr/local/share/icons/hicolor/icon-theme.cache" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
    update-desktop-database -q > /dev/null || true
    update-mime-database /usr/local/share/mime || true
  /sbin/ldconfig -R
    glib-compile-schemas /usr/local/share/glib-2.0/schemas > /dev/null || true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/hicolor 2>/dev/null || /usr/bin/true


script:
  glib-compile-schemas /usr/local/share/glib-2.0/schemas > /dev/null || true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/hicolor 2>/dev/null || /usr/bin/true


script:
  case "share/icons/hicolor/icon-theme.cache" in
  	/*) f="share/icons/hicolor/icon-theme.cache" ;;
  	 *) f="/usr/local/share/icons/hicolor/icon-theme.cache" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
    glib-compile-schemas /usr/local/share/glib-2.0/schemas > /dev/null || true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/hicolor 2>/dev/null || /usr/bin/true


script:
  case "etc/gdm/PostLogin/Default.sample" in
    /*) sample_file="etc/gdm/PostLogin/Default.sample" ;;
    *) sample_file="/usr/local/etc/gdm/PostLogin/Default.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/gdm/PostSession/Default.sample" in
    /*) sample_file="etc/gdm/PostSession/Default.sample" ;;
    *) sample_file="/usr/local/etc/gdm/PostSession/Default.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/gdm/PreSession/Default.sample" in
    /*) sample_file="etc/gdm/PreSession/Default.sample" ;;
    *) sample_file="/usr/local/etc/gdm/PreSession/Default.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/gdm/custom.conf.sample" in
    /*) sample_file="etc/gdm/custom.conf.sample" ;;
    *) sample_file="/usr/local/etc/gdm/custom.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
  mkdir -p /usr/local/share/xsessions
  dconf update
  /sbin/ldconfig -m /usr/local/lib
    glib-compile-schemas /usr/local/share/glib-2.0/schemas > /dev/null || true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/hicolor 2>/dev/null || /usr/bin/true


script:
  case "etc/gdm/PostLogin/Default.sample" in
    /*) sample_file="etc/gdm/PostLogin/Default.sample" ;;
    *) sample_file="/usr/local/etc/gdm/PostLogin/Default.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/gdm/PostSession/Default.sample" in
    /*) sample_file="etc/gdm/PostSession/Default.sample" ;;
    *) sample_file="/usr/local/etc/gdm/PostSession/Default.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/gdm/PreSession/Default.sample" in
    /*) sample_file="etc/gdm/PreSession/Default.sample" ;;
    *) sample_file="/usr/local/etc/gdm/PreSession/Default.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/gdm/custom.conf.sample" in
    /*) sample_file="etc/gdm/custom.conf.sample" ;;
    *) sample_file="/usr/local/etc/gdm/custom.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
  dconf update
  rm -rf /usr/local/etc/gdm/home/.gconf*
  rm -fr /var/gdm
  if /usr/sbin/pw usershow gdm >/dev/null 2>&1; then  echo "==> You should manually remove the \"gdm\" user. "; fi


script:
  update-desktop-database -q > /dev/null || true
  /sbin/ldconfig -m /usr/local/lib
    glib-compile-schemas /usr/local/share/glib-2.0/schemas > /dev/null || true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/hicolor 2>/dev/null || /usr/bin/true


script:
  case "share/icons/hicolor/icon-theme.cache" in
  	/*) f="share/icons/hicolor/icon-theme.cache" ;;
  	 *) f="/usr/local/share/icons/hicolor/icon-theme.cache" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
    update-desktop-database -q > /dev/null || true
  /sbin/ldconfig -R
    glib-compile-schemas /usr/local/share/glib-2.0/schemas > /dev/null || true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/hicolor 2>/dev/null || /usr/bin/true


script:
  update-desktop-database -q > /dev/null || true
  /sbin/ldconfig -m /usr/local/lib
    glib-compile-schemas /usr/local/share/glib-2.0/schemas > /dev/null || true


script:
  update-desktop-database -q > /dev/null || true
  /sbin/ldconfig -R
    glib-compile-schemas /usr/local/share/glib-2.0/schemas > /dev/null || true


script:
  update-desktop-database -q > /dev/null || true
    glib-compile-schemas /usr/local/share/glib-2.0/schemas > /dev/null || true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/hicolor 2>/dev/null || /usr/bin/true


script:
  case "share/icons/hicolor/icon-theme.cache" in
  	/*) f="share/icons/hicolor/icon-theme.cache" ;;
  	 *) f="/usr/local/share/icons/hicolor/icon-theme.cache" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
    update-desktop-database -q > /dev/null || true
    glib-compile-schemas /usr/local/share/glib-2.0/schemas > /dev/null || true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/hicolor 2>/dev/null || /usr/bin/true


script:
  update-desktop-database -q > /dev/null || true
  env GCONF_CONFIG_SOURCE=xml:merged:/usr/local/etc/gconf/gconf.xml.defaults HOME=/wrkdirs/usr/ports/games/aisleriot/work gconftool-2 --makefile-install-rule /usr/local/etc/gconf/schemas/aisleriot.schemas > /dev/null || /usr/bin/true
    glib-compile-schemas /usr/local/share/glib-2.0/schemas > /dev/null || true


script:
  update-desktop-database -q > /dev/null || true
    glib-compile-schemas /usr/local/share/glib-2.0/schemas > /dev/null || true


script:
  glib-compile-schemas /usr/local/share/glib-2.0/schemas > /dev/null || true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/HighContrast 2>/dev/null || /usr/bin/true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/hicolor 2>/dev/null || /usr/bin/true


script:
  case "share/icons/HighContrast/icon-theme.cache" in
  	/*) f="share/icons/HighContrast/icon-theme.cache" ;;
  	 *) f="/usr/local/share/icons/HighContrast/icon-theme.cache" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
  	case "share/icons/hicolor/icon-theme.cache" in
  	/*) f="share/icons/hicolor/icon-theme.cache" ;;
  	 *) f="/usr/local/share/icons/hicolor/icon-theme.cache" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
    glib-compile-schemas /usr/local/share/glib-2.0/schemas > /dev/null || true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/HighContrast 2>/dev/null || /usr/bin/true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/hicolor 2>/dev/null || /usr/bin/true


script:
  [ -s /usr/local/share/games/gnibbles.1.0.scores ] || rm -f /usr/local/share/games/gnibbles.1.0.scores
  [ -s /usr/local/share/games/gnibbles.1.1.scores ] || rm -f /usr/local/share/games/gnibbles.1.1.scores
  [ -s /usr/local/share/games/gnibbles.2.0.scores ] || rm -f /usr/local/share/games/gnibbles.2.0.scores
  [ -s /usr/local/share/games/gnibbles.2.1.scores ] || rm -f /usr/local/share/games/gnibbles.2.1.scores
  [ -s /usr/local/share/games/gnibbles.3.0.scores ] || rm -f /usr/local/share/games/gnibbles.3.0.scores
  [ -s /usr/local/share/games/gnibbles.3.1.scores ] || rm -f /usr/local/share/games/gnibbles.3.1.scores
  [ -s /usr/local/share/games/gnibbles.4.0.scores ] || rm -f /usr/local/share/games/gnibbles.4.0.scores
  [ -s /usr/local/share/games/gnibbles.4.1.scores ] || rm -f /usr/local/share/games/gnibbles.4.1.scores


script:
  [ -s /usr/local/share/games/gnobots2.classic_robots-safe.scores ] || rm -f /usr/local/share/games/gnobots2.classic_robots-safe.scores
  [ -s /usr/local/share/games/gnobots2.classic_robots-super-safe.scores ] || rm -f /usr/local/share/games/gnobots2.classic_robots-super-safe.scores
  [ -s /usr/local/share/games/gnobots2.classic_robots.scores ] || rm -f /usr/local/share/games/gnobots2.classic_robots.scores
  [ -s /usr/local/share/games/gnobots2.nightmare-safe.scores ] || rm -f /usr/local/share/games/gnobots2.nightmare-safe.scores
  [ -s /usr/local/share/games/gnobots2.nightmare-super-safe.scores ] || rm -f /usr/local/share/games/gnobots2.nightmare-super-safe.scores
  [ -s /usr/local/share/games/gnobots2.nightmare.scores ] || rm -f /usr/local/share/games/gnobots2.nightmare.scores
  [ -s /usr/local/share/games/gnobots2.robots2-safe.scores ] || rm -f /usr/local/share/games/gnobots2.robots2-safe.scores
  [ -s /usr/local/share/games/gnobots2.robots2-super-safe.scores ] || rm -f /usr/local/share/games/gnobots2.robots2-super-safe.scores
  [ -s /usr/local/share/games/gnobots2.robots2.scores ] || rm -f /usr/local/share/games/gnobots2.robots2.scores
  [ -s /usr/local/share/games/gnobots2.robots2_easy-safe.scores ] || rm -f /usr/local/share/games/gnobots2.robots2_easy-safe.scores
  [ -s /usr/local/share/games/gnobots2.robots2_easy-super-safe.scores ] || rm -f /usr/local/share/games/gnobots2.robots2_easy-super-safe.scores
  [ -s /usr/local/share/games/gnobots2.robots2_easy.scores ] || rm -f /usr/local/share/games/gnobots2.robots2_easy.scores
  [ -s /usr/local/share/games/gnobots2.robots_with_safe_teleport-safe.scores ] || rm -f /usr/local/share/games/gnobots2.robots_with_safe_teleport-safe.scores
  [ -s /usr/local/share/games/gnobots2.robots_with_safe_teleport-super-safe.scores ] || rm -f /usr/local/share/games/gnobots2.robots_with_safe_teleport-super-safe.scores
  [ -s /usr/local/share/games/gnobots.robots_with_safe_teleport.scores ] || rm -f /usr/local/share/games/gnobots2.robots_with_safe_teleport.scores


script:
  update-desktop-database -q > /dev/null || true
    update-mime-database /usr/local/share/mime || true
    glib-compile-schemas /usr/local/share/glib-2.0/schemas > /dev/null || true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/hicolor 2>/dev/null || /usr/bin/true


script:
  case "share/icons/hicolor/icon-theme.cache" in
  	/*) f="share/icons/hicolor/icon-theme.cache" ;;
  	 *) f="/usr/local/share/icons/hicolor/icon-theme.cache" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
    update-desktop-database -q > /dev/null || true
    update-mime-database /usr/local/share/mime || true
    glib-compile-schemas /usr/local/share/glib-2.0/schemas > /dev/null || true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/hicolor 2>/dev/null || /usr/bin/true


script:
  case "/usr/local/share/fonts/LinLibertineG" in
    /*) fontsdir="/usr/local/share/fonts/LinLibertineG" ;;
    *) fontsdir="/usr/local//usr/local/share/fonts/LinLibertineG" ;;
    esac
    fc-cache -fs ${fontsdir} 2>/dev/null || true
    mkfontscale ${fontsdir} 2>/dev/null || true
    mkfontdir ${fontsdir} 2>/dev/null || true


script:
  case "/usr/local/share/fonts/LinLibertineG" in
    /*) fontsdir="/usr/local/share/fonts/LinLibertineG" ;;
    *) fontsdir="/usr/local//usr/local/share/fonts/LinLibertineG" ;;
    esac
    fc-cache -fs ${fontsdir} 2>/dev/null || true
    mkfontscale ${fontsdir} 2>/dev/null || true
    if [ -e ${fontsdir}/fonts.scale -a "`stat -f '%z' ${fontsdir}/fonts.scale 2>/dev/null`" = '2' ]; then
      rm ${fontsdir}/fonts.scale
    fi
    mkfontdir ${fontsdir} 2>/dev/null || true
    if [ -e ${fontsdir}/fonts.dir -a "`stat -f '%z' ${fontsdir}/fonts.dir 2>/dev/null`" = '2' ]; then
      rm ${fontsdir}/fonts.dir
    fi


script:
  case "/usr/local/share/fonts/Liberation" in
    /*) fontsdir="/usr/local/share/fonts/Liberation" ;;
    *) fontsdir="/usr/local//usr/local/share/fonts/Liberation" ;;
    esac
    fc-cache -fs ${fontsdir} 2>/dev/null || true
    mkfontscale ${fontsdir} 2>/dev/null || true
    mkfontdir ${fontsdir} 2>/dev/null || true


script:
  case "/usr/local/share/fonts/Liberation" in
    /*) fontsdir="/usr/local/share/fonts/Liberation" ;;
    *) fontsdir="/usr/local//usr/local/share/fonts/Liberation" ;;
    esac
    fc-cache -fs ${fontsdir} 2>/dev/null || true
    mkfontscale ${fontsdir} 2>/dev/null || true
    if [ -e ${fontsdir}/fonts.scale -a "`stat -f '%z' ${fontsdir}/fonts.scale 2>/dev/null`" = '2' ]; then
      rm ${fontsdir}/fonts.scale
    fi
    mkfontdir ${fontsdir} 2>/dev/null || true
    if [ -e ${fontsdir}/fonts.dir -a "`stat -f '%z' ${fontsdir}/fonts.dir 2>/dev/null`" = '2' ]; then
      rm ${fontsdir}/fonts.dir
    fi


script:
  case "/usr/local/share/fonts/GentiumBasic" in
    /*) fontsdir="/usr/local/share/fonts/GentiumBasic" ;;
    *) fontsdir="/usr/local//usr/local/share/fonts/GentiumBasic" ;;
    esac
    fc-cache -fs ${fontsdir} 2>/dev/null || true
    mkfontscale ${fontsdir} 2>/dev/null || true
    mkfontdir ${fontsdir} 2>/dev/null || true


script:
  case "/usr/local/share/fonts/GentiumBasic" in
    /*) fontsdir="/usr/local/share/fonts/GentiumBasic" ;;
    *) fontsdir="/usr/local//usr/local/share/fonts/GentiumBasic" ;;
    esac
    fc-cache -fs ${fontsdir} 2>/dev/null || true
    mkfontscale ${fontsdir} 2>/dev/null || true
    if [ -e ${fontsdir}/fonts.scale -a "`stat -f '%z' ${fontsdir}/fonts.scale 2>/dev/null`" = '2' ]; then
      rm ${fontsdir}/fonts.scale
    fi
    mkfontdir ${fontsdir} 2>/dev/null || true
    if [ -e ${fontsdir}/fonts.dir -a "`stat -f '%z' ${fontsdir}/fonts.dir 2>/dev/null`" = '2' ]; then
      rm ${fontsdir}/fonts.dir
    fi


script:
  case "/usr/local/share/fonts/Carlito" in
    /*) fontsdir="/usr/local/share/fonts/Carlito" ;;
    *) fontsdir="/usr/local//usr/local/share/fonts/Carlito" ;;
    esac
    fc-cache -fs ${fontsdir} 2>/dev/null || true
    mkfontscale ${fontsdir} 2>/dev/null || true
    mkfontdir ${fontsdir} 2>/dev/null || true


script:
  case "/usr/local/share/fonts/Carlito" in
    /*) fontsdir="/usr/local/share/fonts/Carlito" ;;
    *) fontsdir="/usr/local//usr/local/share/fonts/Carlito" ;;
    esac
    fc-cache -fs ${fontsdir} 2>/dev/null || true
    mkfontscale ${fontsdir} 2>/dev/null || true
    if [ -e ${fontsdir}/fonts.scale -a "`stat -f '%z' ${fontsdir}/fonts.scale 2>/dev/null`" = '2' ]; then
      rm ${fontsdir}/fonts.scale
    fi
    mkfontdir ${fontsdir} 2>/dev/null || true
    if [ -e ${fontsdir}/fonts.dir -a "`stat -f '%z' ${fontsdir}/fonts.dir 2>/dev/null`" = '2' ]; then
      rm ${fontsdir}/fonts.dir
    fi


script:
  case "/usr/local/share/fonts/Caladea" in
    /*) fontsdir="/usr/local/share/fonts/Caladea" ;;
    *) fontsdir="/usr/local//usr/local/share/fonts/Caladea" ;;
    esac
    fc-cache -fs ${fontsdir} 2>/dev/null || true
    mkfontscale ${fontsdir} 2>/dev/null || true
    mkfontdir ${fontsdir} 2>/dev/null || true


script:
  case "/usr/local/share/fonts/Caladea" in
    /*) fontsdir="/usr/local/share/fonts/Caladea" ;;
    *) fontsdir="/usr/local//usr/local/share/fonts/Caladea" ;;
    esac
    fc-cache -fs ${fontsdir} 2>/dev/null || true
    mkfontscale ${fontsdir} 2>/dev/null || true
    if [ -e ${fontsdir}/fonts.scale -a "`stat -f '%z' ${fontsdir}/fonts.scale 2>/dev/null`" = '2' ]; then
      rm ${fontsdir}/fonts.scale
    fi
    mkfontdir ${fontsdir} 2>/dev/null || true
    if [ -e ${fontsdir}/fonts.dir -a "`stat -f '%z' ${fontsdir}/fonts.dir 2>/dev/null`" = '2' ]; then
      rm ${fontsdir}/fonts.dir
    fi


script:
  echo "===> Creating users and/or groups."
  if ! /usr/sbin/pw groupshow mail >/dev/null 2>&1; then 
    echo "Creating group 'mail' with gid '6'." 
    /usr/sbin/pw groupadd mail -g 6; else echo "Using existing group 'mail'."
  fi
  if ! /usr/sbin/pw groupshow maildrop >/dev/null 2>&1; then 
    echo "Creating group 'maildrop' with gid '126'." 
    /usr/sbin/pw groupadd maildrop -g 126; else echo "Using existing group 'maildrop'."
  fi
  if ! /usr/sbin/pw groupshow postfix >/dev/null 2>&1; then 
    echo "Creating group 'postfix' with gid '125'." 
    /usr/sbin/pw groupadd postfix -g 125; else echo "Using existing group 'postfix'."
  fi
  if ! /usr/sbin/pw usershow postfix >/dev/null 2>&1; then 
    echo "Creating user 'postfix' with uid '125'." 
    /usr/sbin/pw useradd postfix -u 125 -g 125  -c "Postfix Mail System" -d /var/spool/postfix -s /usr/sbin/nologin 
    else 
  echo "Using existing user 'postfix'." 
  fi
  install -d -g 125 -o 125 /var/spool/postfix
  if ! /usr/sbin/pw groupshow mail | /usr/bin/grep -qw postfix; then 
    echo "Adding user 'postfix' to group 'mail'." 
    /usr/sbin/pw groupmod mail -m postfix 
  fi


script:
  case "/usr/local/etc/postfix/main.cf.sample" in
    /*) sample_file="/usr/local/etc/postfix/main.cf.sample" ;;
    *) sample_file="/usr/local//usr/local/etc/postfix/main.cf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "/usr/local/etc/postfix/master.cf.sample" in
    /*) sample_file="/usr/local/etc/postfix/master.cf.sample" ;;
    *) sample_file="/usr/local//usr/local/etc/postfix/master.cf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi


script:
  case "/usr/local/etc/postfix/main.cf.sample" in
    /*) sample_file="/usr/local/etc/postfix/main.cf.sample" ;;
    *) sample_file="/usr/local//usr/local/etc/postfix/main.cf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "/usr/local/etc/postfix/master.cf.sample" in
    /*) sample_file="/usr/local/etc/postfix/master.cf.sample" ;;
    *) sample_file="/usr/local//usr/local/etc/postfix/master.cf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
  if /usr/sbin/pw usershow postfix >/dev/null 2>&1; then  echo "==> You should manually remove the \"postfix\" user. "; fi


script:
  #!/bin/sh
  #
  #	$FreeBSD: /tmp/pcvs/ports/mail/postfix/files/pkg-install.in,v 1.6 2012-02-11 05:14:34 sahil Exp $
  #

  # If the POSTFIX_DEFAULT_MTA environment variable is set to YES, it
  # will make the port/package use defaults which make postfix replace
  # sendmail as much as possible.

  PREFIX=${PKG_PREFIX:=/usr/local}
  ETCDIR=${ETCDIR:=/usr/local/etc/postfix}
  DAEMONDIR=${DAEMONDIR:=/usr/local/libexec/postfix}
  READMEDIR=${READMEDIR:=/usr/local/share/doc/postfix}
  BATCH=${BATCH:=no}
  POSTFIX_DEFAULT_MTA=${POSTFIX_DEFAULT_MTA:=no}
  MC=/etc/mail/mailer.conf

  if [ "${POSTFIX_DEFAULT_MTA}" = "no" ]; then
        DEFAULT_REPLACE_MAILERCONF=n
  else
        DEFAULT_REPLACE_MAILERCONF=y
  fi

  if [ -x /usr/sbin/nologin ]; then
        NOLOGIN=/usr/sbin/nologin
  else
        NOLOGIN=/sbin/nologin
  fi

  ask() {
        local question default answer

        question=$1
        default=$2
        if [ -z "${PACKAGE_BUILDING}" -a "${BATCH}" = "no" ]; then
  	      read -p "${question} [${default}]? " answer
        fi
        if [ -z "${answer}" ]; then
  	      answer=${default}
        fi
        echo ${answer}
  }

  yesno() {
        local question default answer

        question=$1
        default=$2
        while :; do
  	      answer=$(ask "${question}" "${default}")
  	      case "${answer}" in
  		      [Yy]*)	return 0;;
  		      [Nn]*)	return 1;;
  	      esac
  	      echo "Please answer yes or no."
        done
  }

  if [ "$2" = "POST-INSTALL" ]; then
  	/bin/sh ${DAEMONDIR}/post-install tempdir=/tmp \
  	 daemon_directory=${DAEMONDIR} \
  	 html_directory=${READMEDIR} \
  	 readme_directory=${READMEDIR} \
  	 upgrade-package
  fi

  if [ "$2" = "POST-INSTALL" -a -z "${PACKAGE_BUILDING}" -a -f "${MC}" ]; then
  	egrep -q "^sendmail.*${PREFIX}/sbin/sendmail"    ${MC} && \
  	egrep -q "^send-mail.*${PREFIX}/sbin/sendmail"   ${MC} && \
  	egrep -q "^mailq.*${PREFIX}/sbin/sendmail"       ${MC} && \
  	egrep -q "^newaliases.*${PREFIX}/sbin/sendmail"  ${MC}
  	ret=$?
  	if [ ${ret} -ne 0 ]; then
  		if yesno "Would you like to activate Postfix in ${MC}" ${DEFAULT_REPLACE_MAILERCONF}; then
  			/bin/mv -f ${MC} ${MC}.old
  			echo "#"						>	${MC}
  			echo -n "# Execute the Postfix sendmail program"	>>	${MC}
  			echo ", named ${PREFIX}/sbin/sendmail"			>>	${MC}
  			echo "#"						>>	${MC}
  			echo "sendmail	${PREFIX}/sbin/sendmail"	>>	${MC}
  			echo "send-mail	${PREFIX}/sbin/sendmail"	>>	${MC}
  			echo "mailq		${PREFIX}/sbin/sendmail"	>>	${MC}
  			echo "newaliases	${PREFIX}/sbin/sendmail"	>>	${MC}
  		fi
  	else
  		echo "Postfix already activated in ${MC}"
  	fi
  fi


script:
  case "bin/bash" in
    /*) file="bin/bash" ;;
    *) file="/usr/local/bin/bash" ;;
    esac
          cp /etc/shells /etc/shells.bak
          (grep -v "^${file}$" /etc/shells.bak; echo ${file}) > /etc/shells
          rm -f /etc/shells.bak
    case "bin/rbash" in
    /*) file="bin/rbash" ;;
    *) file="/usr/local/bin/rbash" ;;
    esac
          cp /etc/shells /etc/shells.bak
          (grep -v "^${file}$" /etc/shells.bak; echo ${file}) > /etc/shells
          rm -f /etc/shells.bak
    case "/usr/local/info/bash.info" in
    /*) file="/usr/local/info/bash.info" ;;
     *) file="/usr/local//usr/local/info/bash.info" ;;
    esac
    indexinfo ${file%/*}


script:
  case "bin/bash" in
    /*) file="bin/bash" ;;
    *) file="/usr/local/bin/bash" ;;
    esac
          cp /etc/shells /etc/shells.bak
          grep -v "^${file}$" /etc/shells.bak > /etc/shells
          rm -f /etc/shells.bak
    case "bin/rbash" in
    /*) file="bin/rbash" ;;
    *) file="/usr/local/bin/rbash" ;;
    esac
          cp /etc/shells /etc/shells.bak
          grep -v "^${file}$" /etc/shells.bak > /etc/shells
          rm -f /etc/shells.bak


script:
  case "/usr/local/info/bash.info" in
    /*) file="/usr/local/info/bash.info" ;;
     *) file="/usr/local//usr/local/info/bash.info" ;;
    esac
    indexinfo ${file%/*}


script:
  case "/boot/modules" in
    /*) kmoddir="/boot/modules" ;;
    *) kmoddir="/usr/local//boot/modules" ;;
    esac
    /usr/sbin/kldxref ${kmoddir}


script:
  case "/boot/modules" in
    /*) kmoddir="/boot/modules" ;;
    *) kmoddir="/usr/local//boot/modules" ;;
    esac
    /usr/sbin/kldxref ${kmoddir}
    case "${kmoddir}" in
    /usr/local/*) ;;
    /boot/modules) ;;
    *) rmdir -p ${kmoddir} 2>/dev/null || true ;;
    esac


script:
  case "etc/ffserver.conf.sample" in
    /*) sample_file="etc/ffserver.conf.sample" ;;
    *) sample_file="/usr/local/etc/ffserver.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
  /sbin/ldconfig -m /usr/local/lib


script:
  case "etc/ffserver.conf.sample" in
    /*) sample_file="etc/ffserver.conf.sample" ;;
    *) sample_file="/usr/local/etc/ffserver.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi


script:
  echo "===> Creating users and/or groups."
  if ! /usr/sbin/pw groupshow vboxusers >/dev/null 2>&1; then 
    echo "Creating group 'vboxusers' with gid '920'." 
    /usr/sbin/pw groupadd vboxusers -g 920; else echo "Using existing group 'vboxusers'."
  fi
  if ! /usr/sbin/pw usershow vboxusers >/dev/null 2>&1; then 
    echo "Creating user 'vboxusers' with uid '920'." 
    /usr/sbin/pw useradd vboxusers -u 920 -g 920  -c "Virtualbox user" -d /nonexistent -s /usr/sbin/nologin 
    else 
  echo "Using existing user 'vboxusers'." 
  fi


script:
  if /usr/sbin/pw usershow vboxusers >/dev/null 2>&1; then  echo "==> You should manually remove the \"vboxusers\" user. "; fi


script:
  case "etc/vim/gvimrc.sample" in
    /*) sample_file="etc/vim/gvimrc.sample" ;;
    *) sample_file="/usr/local/etc/vim/gvimrc.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/vim/vimrc.sample" in
    /*) sample_file="etc/vim/vimrc.sample" ;;
    *) sample_file="/usr/local/etc/vim/vimrc.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi


script:
  case "etc/vim/gvimrc.sample" in
    /*) sample_file="etc/vim/gvimrc.sample" ;;
    *) sample_file="/usr/local/etc/vim/gvimrc.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/vim/vimrc.sample" in
    /*) sample_file="etc/vim/vimrc.sample" ;;
    *) sample_file="/usr/local/etc/vim/vimrc.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi


script:
  case "etc/krb5.conf.sample" in
    /*) sample_file="etc/krb5.conf.sample" ;;
    *) sample_file="/compat/linux/etc/krb5.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/yp.conf.sample" in
    /*) sample_file="etc/yp.conf.sample" ;;
    *) sample_file="/compat/linux/etc/yp.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi


script:
  case "etc/krb5.conf.sample" in
    /*) sample_file="etc/krb5.conf.sample" ;;
    *) sample_file="/compat/linux/etc/krb5.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/yp.conf.sample" in
    /*) sample_file="etc/yp.conf.sample" ;;
    *) sample_file="/compat/linux/etc/yp.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi


script:
  #!/bin/sh
  # an installation script for linux_base

  case "$2" in
  PRE-INSTALL)
  	if [ "`/sbin/sysctl -n compat.linux.osrelease`"x = "x" ]; then
  		echo 'linuxulator is not (kld)loaded, exiting'
  		exit 1
  	fi
  	if [ "`/sbin/sysctl -n compat.linux.osrelease`" = "2.6.16" ]; then
  		echo 'compat.linux.osrelease: 2.6.16 is not supported, exiting'
  		exit 1
  	fi
  	if [ -z "`kldstat -v | grep -E 'linux(aout|elf)'`" ]; then
  		echo 'Linux mode is not enabled.'
  		echo 'Loading linux kernel module now...'
  		if ! kldload linux; then
  			echo 'The linux kernel module could not be loaded.'
  			echo 'Please enable linux mode manually and retry.'
  			exit 1
  		fi
  	fi
  	;;
  POST-INSTALL)
  	if [ -z "`grep ^linproc /etc/fstab`" ]; then
  		echo ''
  		echo '+++ Some programs may need linprocfs, please add it to /etc/fstab! +++'
  	else
  		if [ -z "`mount | grep -w ^linprocfs`" ]; then
  			echo ''
  			echo '+++ Please mount linprocfs manually! +++'
  		fi
  	fi
  	if [ ! -f ${PKG_PREFIX}/etc/nsswitch.conf ]; then
  		cp ${PKG_PREFIX}/etc/nsswitch.conf.dist \
  			${PKG_PREFIX}/etc/nsswitch.conf
  	fi
  	if [ ! -f ${PKG_PREFIX}/etc/krb5.conf ]; then
  		
  		if [ -f /etc/krb5.conf ]; then
  			ln -s /etc/krb5.conf ${PKG_PREFIX}/etc
  		else
  			cp ${PKG_PREFIX}/etc/krb5.conf.dist \
  				${PKG_PREFIX}/etc/krb5.conf
  		fi

  	fi
  	if [ ! -f ${PKG_PREFIX}/etc/yp.conf ]; then
  		cp ${PKG_PREFIX}/etc/yp.conf.sample ${PKG_PREFIX}/etc/yp.conf
  	fi
  #
  # This is needed when updating to ensure that already installed libraries
  # are recorded in ${PKG_PREFIX}/etc/ld.so.cache
  #
  	echo ''
  	echo 'Running linux ldconfig...'
  	${PKG_PREFIX}/sbin/ldconfig -r ${PKG_PREFIX}
  	;;
  esac

  exit 0


script:
  #!/bin/sh
  # a deinstallation script for linux_base

  case "$2" in
  DEINSTALL)
  	if [ -n "`mount | grep ^linproc`" ] || \
  		[ -d /compat/linux/proc ]; then
  		echo ""
  		echo "You may need to do by hand:"
  		echo "  o  unmount linprocfs if mounted"
  		echo "  o  delete ${PKG_PREFIX}/proc if present"
  		echo "  o  remove/comment linprocfs from /etc/fstab if present"
  		echo ""
  	fi
  	;;
  esac

  exit 0


script:
  /bin/ln -s /usr/local/bin/foomatic-rip /usr/local/libexec/cups/filter/foomatic-rip
  /bin/ln -s /usr/local/share/ppd /usr/local/share/cups/model/foomatic-ppds


script:
  /bin/rm -f /usr/local/libexec/cups/filter/foomatic-rip
  /bin/rm -f /usr/local/share/cups/model/foomatic-ppds


script:
  case "/usr/local/info/autoconf-archive.info" in
    /*) file="/usr/local/info/autoconf-archive.info" ;;
     *) file="/usr/local//usr/local/info/autoconf-archive.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/autoconf-archive.info-1" in
    /*) file="/usr/local/info/autoconf-archive.info-1" ;;
     *) file="/usr/local//usr/local/info/autoconf-archive.info-1" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/autoconf-archive.info-2" in
    /*) file="/usr/local/info/autoconf-archive.info-2" ;;
     *) file="/usr/local//usr/local/info/autoconf-archive.info-2" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/autoconf-archive.info-3" in
    /*) file="/usr/local/info/autoconf-archive.info-3" ;;
     *) file="/usr/local//usr/local/info/autoconf-archive.info-3" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/autoconf-archive.info-4" in
    /*) file="/usr/local/info/autoconf-archive.info-4" ;;
     *) file="/usr/local//usr/local/info/autoconf-archive.info-4" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -m /usr/local/lib
    case "/usr/local/info/web2c.info" in
    /*) file="/usr/local/info/web2c.info" ;;
     *) file="/usr/local//usr/local/info/web2c.info" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -R
    case "/usr/local/info/web2c.info" in
    /*) file="/usr/local/info/web2c.info" ;;
     *) file="/usr/local//usr/local/info/web2c.info" ;;
    esac
    indexinfo ${file%/*}


script:
  update-desktop-database -q > /dev/null || true
  /bin/ln -sf /usr/local/lib/xpi/lightning@thunderbird.mozilla.org /usr/local/lib/thunderbird/extensions 2>/dev/null || true
  /bin/ln -sf /usr/local/lib/xpi/thunderbird@mozilla-enigmail.org /usr/local/lib/thunderbird/extensions 2>/dev/null || true


script:
  /bin/rm -f -f /usr/local/lib/thunderbird/extensions/lightning@thunderbird.mozilla.org
  /bin/rm -f -f /usr/local/lib/thunderbird/extensions/thunderbird@mozilla-enigmail.org


script:
  #!/bin/sh
  #
  #    $MCom: ports/www/mozilla/pkg-install.in,v 1.26 2008/08/04 16:58:03 mezz Exp $
  #
  # Date created:			Mon Nov 29, 2003
  # Whom:				Thierry Thomas (<thierry@pompo.net>)
  # Fix the chrome registry.

  umask 022
  PATH=/bin:/usr/bin

  [ "x$1" = "x" ] && exit 1
  [ "x$2" != "xPOST-INSTALL" ] && exit 0

  MOZDIR=/usr/local/lib/thunderbird
  MOZBIN=${MOZDIR}/thunderbird-bin
  REGXPCOM=${MOZDIR}/regxpcom
  REGCHROME=${MOZDIR}/regchrome

  rm -rf ${MOZDIR}/chrome/overlayinfo
  rm -f ${MOZDIR}/chrome/*.rdf
  mkdir -p ${MOZDIR}/chrome/overlayinfo
  rm -f ${MOZDIR}/component.reg

  cd ${MOZDIR} || exit 1
  if [ -f ${REGXPCOM} ]; then
  	./run-mozilla.sh ${REGXPCOM} || true
  fi
  if [ -f ${REGCHROME} ]; then
  	./run-mozilla.sh ${REGCHROME} || true
  fi
  if [ -f ${MOZBIN} -a "${1%-*}" = "nvu" ]; then
  	./run-mozilla.sh ${MOZBIN} -register > /dev/null 2>&1
  fi
  cp -R /usr/local/lib/xpi/symlinks/thunderbird/ /usr/local/lib/thunderbird/extensions/ > /dev/null 2>&1

  exit 0


script:
  #!/bin/sh
  #
  #    $MCom: ports/www/mozilla/pkg-deinstall.in,v 1.25 2008/07/26 19:07:07 ahze Exp $
  #
  # Date created:			Mon Nov 29, 2003
  # Whom:				Thierry Thomas (<thierry@pompo.net>)
  # Fix the chrome registry.

  umask 022
  PATH=/bin:/usr/bin

  [ "x$1" = "x" ] && exit 1
  [ "x$2" != "xDEINSTALL" ] && exit 0

  MOZDIR=/usr/local/lib/thunderbird

  rm -rf ${MOZDIR}/chrome/overlayinfo
  rm -f ${MOZDIR}/chrome/*.rdf
  rm -f ${MOZDIR}/component.reg
  rm -f ${MOZDIR}/components/*.dat
  rm -f ${MOZDIR}/components.ini
  rm -f ${MOZDIR}/defaults.ini
  rm -f ${MOZDIR}/chrome/app-chrome.manifest
  rm -rf ${MOZDIR}/updates
  find /usr/local/lib/thunderbird/plugins/ -depth 1 -type l -delete > /dev/null 2>&1
  find /usr/local/lib/thunderbird/extensions/ -depth 1 -type l -delete > /dev/null 2>&1

  exit 0


script:
  /sbin/ldconfig -m /usr/local/lib
    case "/usr/local/info/libidn.info" in
    /*) file="/usr/local/info/libidn.info" ;;
     *) file="/usr/local//usr/local/info/libidn.info" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -R
    case "/usr/local/info/libidn.info" in
    /*) file="/usr/local/info/libidn.info" ;;
     *) file="/usr/local//usr/local/info/libidn.info" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -m /usr/local/lib
    case "/usr/local/info/gnutls.info" in
    /*) file="/usr/local/info/gnutls.info" ;;
     *) file="/usr/local//usr/local/info/gnutls.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/gnutls-guile.info" in
    /*) file="/usr/local/info/gnutls-guile.info" ;;
     *) file="/usr/local//usr/local/info/gnutls-guile.info" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -R
    case "/usr/local/info/gnutls.info" in
    /*) file="/usr/local/info/gnutls.info" ;;
     *) file="/usr/local//usr/local/info/gnutls.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/gnutls-guile.info" in
    /*) file="/usr/local/info/gnutls-guile.info" ;;
     *) file="/usr/local//usr/local/info/gnutls-guile.info" ;;
    esac
    indexinfo ${file%/*}


script:
  #!/bin/sh
  #
  #    $MCom: ports/www/mozilla/pkg-install.in,v 1.26 2008/08/04 16:58:03 mezz Exp $
  #
  # Date created:			Mon Nov 29, 2003
  # Whom:				Thierry Thomas (<thierry@pompo.net>)
  # Fix the chrome registry.

  umask 022
  PATH=/bin:/usr/bin

  [ "x$1" = "x" ] && exit 1
  [ "x$2" != "xPOST-INSTALL" ] && exit 0

  MOZDIR=/usr/local/lib/firefox
  MOZBIN=${MOZDIR}/firefox-bin
  REGXPCOM=${MOZDIR}/regxpcom
  REGCHROME=${MOZDIR}/regchrome

  rm -rf ${MOZDIR}/chrome/overlayinfo
  rm -f ${MOZDIR}/chrome/*.rdf
  mkdir -p ${MOZDIR}/chrome/overlayinfo
  rm -f ${MOZDIR}/component.reg

  cd ${MOZDIR} || exit 1
  if [ -f ${REGXPCOM} ]; then
  	./run-mozilla.sh ${REGXPCOM} || true
  fi
  if [ -f ${REGCHROME} ]; then
  	./run-mozilla.sh ${REGCHROME} || true
  fi
  if [ -f ${MOZBIN} -a "${1%-*}" = "nvu" ]; then
  	./run-mozilla.sh ${MOZBIN} -register > /dev/null 2>&1
  fi
  cp -R /usr/local/lib/xpi/symlinks/firefox/ /usr/local/lib/firefox/extensions/ > /dev/null 2>&1

  exit 0


script:
  #!/bin/sh
  #
  #    $MCom: ports/www/mozilla/pkg-deinstall.in,v 1.25 2008/07/26 19:07:07 ahze Exp $
  #
  # Date created:			Mon Nov 29, 2003
  # Whom:				Thierry Thomas (<thierry@pompo.net>)
  # Fix the chrome registry.

  umask 022
  PATH=/bin:/usr/bin

  [ "x$1" = "x" ] && exit 1
  [ "x$2" != "xDEINSTALL" ] && exit 0

  MOZDIR=/usr/local/lib/firefox

  rm -rf ${MOZDIR}/chrome/overlayinfo
  rm -f ${MOZDIR}/chrome/*.rdf
  rm -f ${MOZDIR}/component.reg
  rm -f ${MOZDIR}/components/*.dat
  rm -f ${MOZDIR}/components.ini
  rm -f ${MOZDIR}/defaults.ini
  rm -f ${MOZDIR}/chrome/app-chrome.manifest
  rm -rf ${MOZDIR}/updates
  find /usr/local/lib/firefox/plugins/ -depth 1 -type l -delete > /dev/null 2>&1
  find /usr/local/lib/firefox/extensions/ -depth 1 -type l -delete > /dev/null 2>&1

  exit 0


script:
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/ContrastHigh 2>/dev/null || /usr/bin/true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/mate 2>/dev/null || /usr/bin/true


script:
  case "share/icons/ContrastHigh/icon-theme.cache" in
  	/*) f="share/icons/ContrastHigh/icon-theme.cache" ;;
  	 *) f="/usr/local/share/icons/ContrastHigh/icon-theme.cache" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
  	case "share/icons/mate/icon-theme.cache" in
  	/*) f="share/icons/mate/icon-theme.cache" ;;
  	 *) f="/usr/local/share/icons/mate/icon-theme.cache" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/ContrastHigh 2>/dev/null || /usr/bin/true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/mate 2>/dev/null || /usr/bin/true


script:
  case "/usr/local/share/fonts/Droid" in
    /*) fontsdir="/usr/local/share/fonts/Droid" ;;
    *) fontsdir="/usr/local//usr/local/share/fonts/Droid" ;;
    esac
    fc-cache -fs ${fontsdir} 2>/dev/null || true
    mkfontscale ${fontsdir} 2>/dev/null || true
    mkfontdir ${fontsdir} 2>/dev/null || true


script:
  case "/usr/local/share/fonts/Droid" in
    /*) fontsdir="/usr/local/share/fonts/Droid" ;;
    *) fontsdir="/usr/local//usr/local/share/fonts/Droid" ;;
    esac
    fc-cache -fs ${fontsdir} 2>/dev/null || true
    mkfontscale ${fontsdir} 2>/dev/null || true
    if [ -e ${fontsdir}/fonts.scale -a "`stat -f '%z' ${fontsdir}/fonts.scale 2>/dev/null`" = '2' ]; then
      rm ${fontsdir}/fonts.scale
    fi
    mkfontdir ${fontsdir} 2>/dev/null || true
    if [ -e ${fontsdir}/fonts.dir -a "`stat -f '%z' ${fontsdir}/fonts.dir 2>/dev/null`" = '2' ]; then
      rm ${fontsdir}/fonts.dir
    fi


script:
  case "etc/speech-dispatcher/clients/emacs.conf.sample" in
    /*) sample_file="etc/speech-dispatcher/clients/emacs.conf.sample" ;;
    *) sample_file="/usr/local/etc/speech-dispatcher/clients/emacs.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/speech-dispatcher/modules/cicero.conf.sample" in
    /*) sample_file="etc/speech-dispatcher/modules/cicero.conf.sample" ;;
    *) sample_file="/usr/local/etc/speech-dispatcher/modules/cicero.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/speech-dispatcher/modules/dtk-generic.conf.sample" in
    /*) sample_file="etc/speech-dispatcher/modules/dtk-generic.conf.sample" ;;
    *) sample_file="/usr/local/etc/speech-dispatcher/modules/dtk-generic.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/speech-dispatcher/modules/epos-generic.conf.sample" in
    /*) sample_file="etc/speech-dispatcher/modules/epos-generic.conf.sample" ;;
    *) sample_file="/usr/local/etc/speech-dispatcher/modules/epos-generic.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/speech-dispatcher/modules/espeak-generic.conf.sample" in
    /*) sample_file="etc/speech-dispatcher/modules/espeak-generic.conf.sample" ;;
    *) sample_file="/usr/local/etc/speech-dispatcher/modules/espeak-generic.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/speech-dispatcher/modules/espeak-mbrola-generic.conf.sample" in
    /*) sample_file="etc/speech-dispatcher/modules/espeak-mbrola-generic.conf.sample" ;;
    *) sample_file="/usr/local/etc/speech-dispatcher/modules/espeak-mbrola-generic.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/speech-dispatcher/modules/espeak.conf.sample" in
    /*) sample_file="etc/speech-dispatcher/modules/espeak.conf.sample" ;;
    *) sample_file="/usr/local/etc/speech-dispatcher/modules/espeak.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/speech-dispatcher/modules/festival.conf.sample" in
    /*) sample_file="etc/speech-dispatcher/modules/festival.conf.sample" ;;
    *) sample_file="/usr/local/etc/speech-dispatcher/modules/festival.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/speech-dispatcher/modules/flite.conf.sample" in
    /*) sample_file="etc/speech-dispatcher/modules/flite.conf.sample" ;;
    *) sample_file="/usr/local/etc/speech-dispatcher/modules/flite.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/speech-dispatcher/modules/ibmtts.conf.sample" in
    /*) sample_file="etc/speech-dispatcher/modules/ibmtts.conf.sample" ;;
    *) sample_file="/usr/local/etc/speech-dispatcher/modules/ibmtts.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/speech-dispatcher/modules/ivona.conf.sample" in
    /*) sample_file="etc/speech-dispatcher/modules/ivona.conf.sample" ;;
    *) sample_file="/usr/local/etc/speech-dispatcher/modules/ivona.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/speech-dispatcher/modules/llia_phon-generic.conf.sample" in
    /*) sample_file="etc/speech-dispatcher/modules/llia_phon-generic.conf.sample" ;;
    *) sample_file="/usr/local/etc/speech-dispatcher/modules/llia_phon-generic.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/speech-dispatcher/modules/pico-generic.conf.sample" in
    /*) sample_file="etc/speech-dispatcher/modules/pico-generic.conf.sample" ;;
    *) sample_file="/usr/local/etc/speech-dispatcher/modules/pico-generic.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/speech-dispatcher/modules/swift-generic.conf.sample" in
    /*) sample_file="etc/speech-dispatcher/modules/swift-generic.conf.sample" ;;
    *) sample_file="/usr/local/etc/speech-dispatcher/modules/swift-generic.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/speech-dispatcher/speechd.conf.sample" in
    /*) sample_file="etc/speech-dispatcher/speechd.conf.sample" ;;
    *) sample_file="/usr/local/etc/speech-dispatcher/speechd.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
  /sbin/ldconfig -m /usr/local/lib
    case "/usr/local/info/spd-say.info" in
    /*) file="/usr/local/info/spd-say.info" ;;
     *) file="/usr/local//usr/local/info/spd-say.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/speech-dispatcher.info" in
    /*) file="/usr/local/info/speech-dispatcher.info" ;;
     *) file="/usr/local//usr/local/info/speech-dispatcher.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/speech-dispatcher-cs.info" in
    /*) file="/usr/local/info/speech-dispatcher-cs.info" ;;
     *) file="/usr/local//usr/local/info/speech-dispatcher-cs.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/ssip.info" in
    /*) file="/usr/local/info/ssip.info" ;;
     *) file="/usr/local//usr/local/info/ssip.info" ;;
    esac
    indexinfo ${file%/*}


script:
  case "etc/speech-dispatcher/clients/emacs.conf.sample" in
    /*) sample_file="etc/speech-dispatcher/clients/emacs.conf.sample" ;;
    *) sample_file="/usr/local/etc/speech-dispatcher/clients/emacs.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/speech-dispatcher/modules/cicero.conf.sample" in
    /*) sample_file="etc/speech-dispatcher/modules/cicero.conf.sample" ;;
    *) sample_file="/usr/local/etc/speech-dispatcher/modules/cicero.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/speech-dispatcher/modules/dtk-generic.conf.sample" in
    /*) sample_file="etc/speech-dispatcher/modules/dtk-generic.conf.sample" ;;
    *) sample_file="/usr/local/etc/speech-dispatcher/modules/dtk-generic.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/speech-dispatcher/modules/epos-generic.conf.sample" in
    /*) sample_file="etc/speech-dispatcher/modules/epos-generic.conf.sample" ;;
    *) sample_file="/usr/local/etc/speech-dispatcher/modules/epos-generic.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/speech-dispatcher/modules/espeak-generic.conf.sample" in
    /*) sample_file="etc/speech-dispatcher/modules/espeak-generic.conf.sample" ;;
    *) sample_file="/usr/local/etc/speech-dispatcher/modules/espeak-generic.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/speech-dispatcher/modules/espeak-mbrola-generic.conf.sample" in
    /*) sample_file="etc/speech-dispatcher/modules/espeak-mbrola-generic.conf.sample" ;;
    *) sample_file="/usr/local/etc/speech-dispatcher/modules/espeak-mbrola-generic.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/speech-dispatcher/modules/espeak.conf.sample" in
    /*) sample_file="etc/speech-dispatcher/modules/espeak.conf.sample" ;;
    *) sample_file="/usr/local/etc/speech-dispatcher/modules/espeak.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/speech-dispatcher/modules/festival.conf.sample" in
    /*) sample_file="etc/speech-dispatcher/modules/festival.conf.sample" ;;
    *) sample_file="/usr/local/etc/speech-dispatcher/modules/festival.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/speech-dispatcher/modules/flite.conf.sample" in
    /*) sample_file="etc/speech-dispatcher/modules/flite.conf.sample" ;;
    *) sample_file="/usr/local/etc/speech-dispatcher/modules/flite.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/speech-dispatcher/modules/ibmtts.conf.sample" in
    /*) sample_file="etc/speech-dispatcher/modules/ibmtts.conf.sample" ;;
    *) sample_file="/usr/local/etc/speech-dispatcher/modules/ibmtts.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/speech-dispatcher/modules/ivona.conf.sample" in
    /*) sample_file="etc/speech-dispatcher/modules/ivona.conf.sample" ;;
    *) sample_file="/usr/local/etc/speech-dispatcher/modules/ivona.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/speech-dispatcher/modules/llia_phon-generic.conf.sample" in
    /*) sample_file="etc/speech-dispatcher/modules/llia_phon-generic.conf.sample" ;;
    *) sample_file="/usr/local/etc/speech-dispatcher/modules/llia_phon-generic.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/speech-dispatcher/modules/pico-generic.conf.sample" in
    /*) sample_file="etc/speech-dispatcher/modules/pico-generic.conf.sample" ;;
    *) sample_file="/usr/local/etc/speech-dispatcher/modules/pico-generic.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/speech-dispatcher/modules/swift-generic.conf.sample" in
    /*) sample_file="etc/speech-dispatcher/modules/swift-generic.conf.sample" ;;
    *) sample_file="/usr/local/etc/speech-dispatcher/modules/swift-generic.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/speech-dispatcher/speechd.conf.sample" in
    /*) sample_file="etc/speech-dispatcher/speechd.conf.sample" ;;
    *) sample_file="/usr/local/etc/speech-dispatcher/speechd.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi


script:
  /sbin/ldconfig -R
    case "/usr/local/info/spd-say.info" in
    /*) file="/usr/local/info/spd-say.info" ;;
     *) file="/usr/local//usr/local/info/spd-say.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/speech-dispatcher.info" in
    /*) file="/usr/local/info/speech-dispatcher.info" ;;
     *) file="/usr/local//usr/local/info/speech-dispatcher.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/speech-dispatcher-cs.info" in
    /*) file="/usr/local/info/speech-dispatcher-cs.info" ;;
     *) file="/usr/local//usr/local/info/speech-dispatcher-cs.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/ssip.info" in
    /*) file="/usr/local/info/ssip.info" ;;
     *) file="/usr/local//usr/local/info/ssip.info" ;;
    esac
    indexinfo ${file%/*}


script:
  case "/usr/local/share/fonts/dejavu" in
    /*) fontsdir="/usr/local/share/fonts/dejavu" ;;
    *) fontsdir="/usr/local//usr/local/share/fonts/dejavu" ;;
    esac
    fc-cache -fs ${fontsdir} 2>/dev/null || true
    mkfontscale ${fontsdir} 2>/dev/null || true
    mkfontdir ${fontsdir} 2>/dev/null || true


script:
  case "/usr/local/share/fonts/dejavu" in
    /*) fontsdir="/usr/local/share/fonts/dejavu" ;;
    *) fontsdir="/usr/local//usr/local/share/fonts/dejavu" ;;
    esac
    fc-cache -fs ${fontsdir} 2>/dev/null || true
    mkfontscale ${fontsdir} 2>/dev/null || true
    if [ -e ${fontsdir}/fonts.scale -a "`stat -f '%z' ${fontsdir}/fonts.scale 2>/dev/null`" = '2' ]; then
      rm ${fontsdir}/fonts.scale
    fi
    mkfontdir ${fontsdir} 2>/dev/null || true
    if [ -e ${fontsdir}/fonts.dir -a "`stat -f '%z' ${fontsdir}/fonts.dir 2>/dev/null`" = '2' ]; then
      rm ${fontsdir}/fonts.dir
    fi


script:
  /sbin/ldconfig -m /usr/local/lib
    case "/usr/local/info/check.info" in
    /*) file="/usr/local/info/check.info" ;;
     *) file="/usr/local//usr/local/info/check.info" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -R
    case "/usr/local/info/check.info" in
    /*) file="/usr/local/info/check.info" ;;
     *) file="/usr/local//usr/local/info/check.info" ;;
    esac
    indexinfo ${file%/*}


script:
  case "etc/dnsmasq.conf.sample" in
    /*) sample_file="etc/dnsmasq.conf.sample" ;;
    *) sample_file="/usr/local/etc/dnsmasq.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi


script:
  case "etc/dnsmasq.conf.sample" in
    /*) sample_file="etc/dnsmasq.conf.sample" ;;
    *) sample_file="/usr/local/etc/dnsmasq.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi


script:
  case "etc/libvirt/libvirt.conf.sample" in
    /*) sample_file="etc/libvirt/libvirt.conf.sample" ;;
    *) sample_file="/usr/local/etc/libvirt/libvirt.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/libvirt/libvirtd.conf.sample" in
    /*) sample_file="etc/libvirt/libvirtd.conf.sample" ;;
    *) sample_file="/usr/local/etc/libvirt/libvirtd.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
  /sbin/ldconfig -m /usr/local/lib


script:
  case "etc/libvirt/libvirt.conf.sample" in
    /*) sample_file="etc/libvirt/libvirt.conf.sample" ;;
    *) sample_file="/usr/local/etc/libvirt/libvirt.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/libvirt/libvirtd.conf.sample" in
    /*) sample_file="etc/libvirt/libvirtd.conf.sample" ;;
    *) sample_file="/usr/local/etc/libvirt/libvirtd.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi


script:
  update-desktop-database -q > /dev/null || true
    update-mime-database /usr/local/share/mime || true
    case "etc/xdg/libfm/libfm.conf.sample" in
    /*) sample_file="etc/xdg/libfm/libfm.conf.sample" ;;
    *) sample_file="/usr/local/etc/xdg/libfm/libfm.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
  /sbin/ldconfig -m /usr/local/lib


script:
  case "etc/xdg/libfm/libfm.conf.sample" in
    /*) sample_file="etc/xdg/libfm/libfm.conf.sample" ;;
    *) sample_file="/usr/local/etc/xdg/libfm/libfm.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi


script:
  update-desktop-database -q > /dev/null || true
    update-mime-database /usr/local/share/mime || true
  /sbin/ldconfig -R


script:
  update-desktop-database -q > /dev/null || true
    case "etc/xdg/pcmanfm/default/pcmanfm.conf.sample" in
    /*) sample_file="etc/xdg/pcmanfm/default/pcmanfm.conf.sample" ;;
    *) sample_file="/usr/local/etc/xdg/pcmanfm/default/pcmanfm.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi


script:
  case "etc/xdg/pcmanfm/default/pcmanfm.conf.sample" in
    /*) sample_file="etc/xdg/pcmanfm/default/pcmanfm.conf.sample" ;;
    *) sample_file="/usr/local/etc/xdg/pcmanfm/default/pcmanfm.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi


script:
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/nuoveXT2 2>/dev/null || /usr/bin/true


script:
  case "share/icons/nuoveXT2/icon-theme.cache" in
  	/*) f="share/icons/nuoveXT2/icon-theme.cache" ;;
  	 *) f="/usr/local/share/icons/nuoveXT2/icon-theme.cache" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/nuoveXT2 2>/dev/null || /usr/bin/true


script:
  case "etc/xdg/lxsession/LXDE/desktop.conf.sample" in
    /*) sample_file="etc/xdg/lxsession/LXDE/desktop.conf.sample" ;;
    *) sample_file="/usr/local/etc/xdg/lxsession/LXDE/desktop.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/xdg/pcmanfm/LXDE/pcmanfm.conf.sample" in
    /*) sample_file="etc/xdg/pcmanfm/LXDE/pcmanfm.conf.sample" ;;
    *) sample_file="/usr/local/etc/xdg/pcmanfm/LXDE/pcmanfm.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi


script:
  case "etc/xdg/lxsession/LXDE/desktop.conf.sample" in
    /*) sample_file="etc/xdg/lxsession/LXDE/desktop.conf.sample" ;;
    *) sample_file="/usr/local/etc/xdg/lxsession/LXDE/desktop.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/xdg/pcmanfm/LXDE/pcmanfm.conf.sample" in
    /*) sample_file="etc/xdg/pcmanfm/LXDE/pcmanfm.conf.sample" ;;
    *) sample_file="/usr/local/etc/xdg/pcmanfm/LXDE/pcmanfm.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi


script:
  test -e /usr/local/etc/odbc.ini || touch /usr/local/etc/odbc.ini
  test -e /usr/local/etc/odbcinst.ini || touch /usr/local/etc/odbcinst.ini
  /sbin/ldconfig -m /usr/local/lib


script:
  test -s /usr/local/etc/odbcinst.ini || rm -f /usr/local/etc/odbcinst.ini
  test -s /usr/local/etc/odbc.ini || rm -f /usr/local/etc/odbc.ini


script:
  case "etc/ImageMagick-6/coder.xml.sample" in
    /*) sample_file="etc/ImageMagick-6/coder.xml.sample" ;;
    *) sample_file="/usr/local/etc/ImageMagick-6/coder.xml.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/ImageMagick-6/colors.xml.sample" in
    /*) sample_file="etc/ImageMagick-6/colors.xml.sample" ;;
    *) sample_file="/usr/local/etc/ImageMagick-6/colors.xml.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/ImageMagick-6/delegates.xml.sample" in
    /*) sample_file="etc/ImageMagick-6/delegates.xml.sample" ;;
    *) sample_file="/usr/local/etc/ImageMagick-6/delegates.xml.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/ImageMagick-6/log.xml.sample" in
    /*) sample_file="etc/ImageMagick-6/log.xml.sample" ;;
    *) sample_file="/usr/local/etc/ImageMagick-6/log.xml.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/ImageMagick-6/magic.xml.sample" in
    /*) sample_file="etc/ImageMagick-6/magic.xml.sample" ;;
    *) sample_file="/usr/local/etc/ImageMagick-6/magic.xml.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/ImageMagick-6/mime.xml.sample" in
    /*) sample_file="etc/ImageMagick-6/mime.xml.sample" ;;
    *) sample_file="/usr/local/etc/ImageMagick-6/mime.xml.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/ImageMagick-6/policy.xml.sample" in
    /*) sample_file="etc/ImageMagick-6/policy.xml.sample" ;;
    *) sample_file="/usr/local/etc/ImageMagick-6/policy.xml.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/ImageMagick-6/quantization-table.xml.sample" in
    /*) sample_file="etc/ImageMagick-6/quantization-table.xml.sample" ;;
    *) sample_file="/usr/local/etc/ImageMagick-6/quantization-table.xml.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/ImageMagick-6/thresholds.xml.sample" in
    /*) sample_file="etc/ImageMagick-6/thresholds.xml.sample" ;;
    *) sample_file="/usr/local/etc/ImageMagick-6/thresholds.xml.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/ImageMagick-6/type-dejavu.xml.sample" in
    /*) sample_file="etc/ImageMagick-6/type-dejavu.xml.sample" ;;
    *) sample_file="/usr/local/etc/ImageMagick-6/type-dejavu.xml.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/ImageMagick-6/type-ghostscript.xml.sample" in
    /*) sample_file="etc/ImageMagick-6/type-ghostscript.xml.sample" ;;
    *) sample_file="/usr/local/etc/ImageMagick-6/type-ghostscript.xml.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/ImageMagick-6/type-windows.xml.sample" in
    /*) sample_file="etc/ImageMagick-6/type-windows.xml.sample" ;;
    *) sample_file="/usr/local/etc/ImageMagick-6/type-windows.xml.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/ImageMagick-6/type.xml.sample" in
    /*) sample_file="etc/ImageMagick-6/type.xml.sample" ;;
    *) sample_file="/usr/local/etc/ImageMagick-6/type.xml.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
  /sbin/ldconfig -m /usr/local/lib


script:
  case "etc/ImageMagick-6/coder.xml.sample" in
    /*) sample_file="etc/ImageMagick-6/coder.xml.sample" ;;
    *) sample_file="/usr/local/etc/ImageMagick-6/coder.xml.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/ImageMagick-6/colors.xml.sample" in
    /*) sample_file="etc/ImageMagick-6/colors.xml.sample" ;;
    *) sample_file="/usr/local/etc/ImageMagick-6/colors.xml.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/ImageMagick-6/delegates.xml.sample" in
    /*) sample_file="etc/ImageMagick-6/delegates.xml.sample" ;;
    *) sample_file="/usr/local/etc/ImageMagick-6/delegates.xml.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/ImageMagick-6/log.xml.sample" in
    /*) sample_file="etc/ImageMagick-6/log.xml.sample" ;;
    *) sample_file="/usr/local/etc/ImageMagick-6/log.xml.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/ImageMagick-6/magic.xml.sample" in
    /*) sample_file="etc/ImageMagick-6/magic.xml.sample" ;;
    *) sample_file="/usr/local/etc/ImageMagick-6/magic.xml.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/ImageMagick-6/mime.xml.sample" in
    /*) sample_file="etc/ImageMagick-6/mime.xml.sample" ;;
    *) sample_file="/usr/local/etc/ImageMagick-6/mime.xml.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/ImageMagick-6/policy.xml.sample" in
    /*) sample_file="etc/ImageMagick-6/policy.xml.sample" ;;
    *) sample_file="/usr/local/etc/ImageMagick-6/policy.xml.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/ImageMagick-6/quantization-table.xml.sample" in
    /*) sample_file="etc/ImageMagick-6/quantization-table.xml.sample" ;;
    *) sample_file="/usr/local/etc/ImageMagick-6/quantization-table.xml.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/ImageMagick-6/thresholds.xml.sample" in
    /*) sample_file="etc/ImageMagick-6/thresholds.xml.sample" ;;
    *) sample_file="/usr/local/etc/ImageMagick-6/thresholds.xml.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/ImageMagick-6/type-dejavu.xml.sample" in
    /*) sample_file="etc/ImageMagick-6/type-dejavu.xml.sample" ;;
    *) sample_file="/usr/local/etc/ImageMagick-6/type-dejavu.xml.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/ImageMagick-6/type-ghostscript.xml.sample" in
    /*) sample_file="etc/ImageMagick-6/type-ghostscript.xml.sample" ;;
    *) sample_file="/usr/local/etc/ImageMagick-6/type-ghostscript.xml.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/ImageMagick-6/type-windows.xml.sample" in
    /*) sample_file="etc/ImageMagick-6/type-windows.xml.sample" ;;
    *) sample_file="/usr/local/etc/ImageMagick-6/type-windows.xml.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/ImageMagick-6/type.xml.sample" in
    /*) sample_file="etc/ImageMagick-6/type.xml.sample" ;;
    *) sample_file="/usr/local/etc/ImageMagick-6/type.xml.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi


script:
  update-mime-database /usr/local/share/mime || true
    update-desktop-database -q > /dev/null || true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/gnome 2>/dev/null || /usr/bin/true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/hicolor 2>/dev/null || /usr/bin/true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/locolor 2>/dev/null || /usr/bin/true


script:
  case "share/icons/gnome/icon-theme.cache" in
  	/*) f="share/icons/gnome/icon-theme.cache" ;;
  	 *) f="/usr/local/share/icons/gnome/icon-theme.cache" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
  	case "share/icons/hicolor/icon-theme.cache" in
  	/*) f="share/icons/hicolor/icon-theme.cache" ;;
  	 *) f="/usr/local/share/icons/hicolor/icon-theme.cache" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
  	case "share/icons/locolor/icon-theme.cache" in
  	/*) f="share/icons/locolor/icon-theme.cache" ;;
  	 *) f="/usr/local/share/icons/locolor/icon-theme.cache" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
    update-mime-database /usr/local/share/mime || true
    update-desktop-database -q > /dev/null || true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/gnome 2>/dev/null || /usr/bin/true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/hicolor 2>/dev/null || /usr/bin/true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/locolor 2>/dev/null || /usr/bin/true


script:
  update-desktop-database -q > /dev/null || true
    update-mime-database /usr/local/share/mime || true
  /sbin/ldconfig -m /usr/local/lib
    glib-compile-schemas /usr/local/share/glib-2.0/schemas > /dev/null || true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/HighContrast 2>/dev/null || /usr/bin/true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/hicolor 2>/dev/null || /usr/bin/true


script:
  case "share/icons/HighContrast/icon-theme.cache" in
  	/*) f="share/icons/HighContrast/icon-theme.cache" ;;
  	 *) f="/usr/local/share/icons/HighContrast/icon-theme.cache" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
  	case "share/icons/hicolor/icon-theme.cache" in
  	/*) f="share/icons/hicolor/icon-theme.cache" ;;
  	 *) f="/usr/local/share/icons/hicolor/icon-theme.cache" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
    update-desktop-database -q > /dev/null || true
    update-mime-database /usr/local/share/mime || true
  /sbin/ldconfig -R
    glib-compile-schemas /usr/local/share/glib-2.0/schemas > /dev/null || true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/HighContrast 2>/dev/null || /usr/bin/true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/hicolor 2>/dev/null || /usr/bin/true


script:
  /sbin/ldconfig -m /usr/local/lib
    case "/usr/local/info/autosprintf.info" in
    /*) file="/usr/local/info/autosprintf.info" ;;
     *) file="/usr/local//usr/local/info/autosprintf.info" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -R
    case "/usr/local/info/autosprintf.info" in
    /*) file="/usr/local/info/autosprintf.info" ;;
     *) file="/usr/local//usr/local/info/autosprintf.info" ;;
    esac
    indexinfo ${file%/*}


script:
  /usr/local/bin/glib-compile-schemas /usr/local/share/glib-2.0/schemas 2>/dev/null || /usr/bin/true
  /usr/local/bin/gio-querymodules /usr/local/lib/gio/modules 2>/dev/null || /usr/bin/true
  /sbin/ldconfig -m /usr/local/lib


script:
  /sbin/ldconfig -m /usr/local/lib
    case "/usr/local/info/gettext.info" in
    /*) file="/usr/local/info/gettext.info" ;;
     *) file="/usr/local//usr/local/info/gettext.info" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -R
    case "/usr/local/info/gettext.info" in
    /*) file="/usr/local/info/gettext.info" ;;
     *) file="/usr/local//usr/local/info/gettext.info" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -m /usr/local/lib
    case "/usr/local/info/readline.info" in
    /*) file="/usr/local/info/readline.info" ;;
     *) file="/usr/local//usr/local/info/readline.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/rluserman.info" in
    /*) file="/usr/local/info/rluserman.info" ;;
     *) file="/usr/local//usr/local/info/rluserman.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/history.info" in
    /*) file="/usr/local/info/history.info" ;;
     *) file="/usr/local//usr/local/info/history.info" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -R
    case "/usr/local/info/readline.info" in
    /*) file="/usr/local/info/readline.info" ;;
     *) file="/usr/local//usr/local/info/readline.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/rluserman.info" in
    /*) file="/usr/local/info/rluserman.info" ;;
     *) file="/usr/local//usr/local/info/rluserman.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/history.info" in
    /*) file="/usr/local/info/history.info" ;;
     *) file="/usr/local//usr/local/info/history.info" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -m /usr/local/lib
    case "/usr/local/info/libffi.info" in
    /*) file="/usr/local/info/libffi.info" ;;
     *) file="/usr/local//usr/local/info/libffi.info" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -R
    case "/usr/local/info/libffi.info" in
    /*) file="/usr/local/info/libffi.info" ;;
     *) file="/usr/local//usr/local/info/libffi.info" ;;
    esac
    indexinfo ${file%/*}


script:
  case "etc/fonts/fonts.conf.sample" in
    /*) sample_file="etc/fonts/fonts.conf.sample" ;;
    *) sample_file="/usr/local/etc/fonts/fonts.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
  /sbin/ldconfig -m /usr/local/lib


script:
  case "etc/fonts/fonts.conf.sample" in
    /*) sample_file="etc/fonts/fonts.conf.sample" ;;
    *) sample_file="/usr/local/etc/fonts/fonts.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi


script:
  #!/bin/sh

  PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin
  export PATH

  if [ "$2" = "POST-INSTALL" ]; then
      echo "Running fc-cache to build fontconfig cache..."
      fc-cache -f -v
      exit 0
  fi


script:
  /sbin/ldconfig -m /usr/local/lib
    case "/usr/local/info/gpgrt.info" in
    /*) file="/usr/local/info/gpgrt.info" ;;
     *) file="/usr/local//usr/local/info/gpgrt.info" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -R
    case "/usr/local/info/gpgrt.info" in
    /*) file="/usr/local/info/gpgrt.info" ;;
     *) file="/usr/local//usr/local/info/gpgrt.info" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -m /usr/local/lib
    case "/usr/local/info/gcrypt.info" in
    /*) file="/usr/local/info/gcrypt.info" ;;
     *) file="/usr/local//usr/local/info/gcrypt.info" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -R
    case "/usr/local/info/gcrypt.info" in
    /*) file="/usr/local/info/gcrypt.info" ;;
     *) file="/usr/local//usr/local/info/gcrypt.info" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -m /usr/local/lib
    case "/usr/local/info/libIDL2.info" in
    /*) file="/usr/local/info/libIDL2.info" ;;
     *) file="/usr/local//usr/local/info/libIDL2.info" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -R
    case "/usr/local/info/libIDL2.info" in
    /*) file="/usr/local/info/libIDL2.info" ;;
     *) file="/usr/local//usr/local/info/libIDL2.info" ;;
    esac
    indexinfo ${file%/*}


script:
  case "etc/orbit2rc.sample" in
    /*) sample_file="etc/orbit2rc.sample" ;;
    *) sample_file="/usr/local/etc/orbit2rc.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
  /sbin/ldconfig -m /usr/local/lib


script:
  case "etc/orbit2rc.sample" in
    /*) sample_file="etc/orbit2rc.sample" ;;
    *) sample_file="/usr/local/etc/orbit2rc.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi


script:
  /sbin/ldconfig -m /usr/local/lib
    case "/usr/local/info/gdbm.info" in
    /*) file="/usr/local/info/gdbm.info" ;;
     *) file="/usr/local//usr/local/info/gdbm.info" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -R
    case "/usr/local/info/gdbm.info" in
    /*) file="/usr/local/info/gdbm.info" ;;
     *) file="/usr/local//usr/local/info/gdbm.info" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -m /usr/local/lib
    case "/usr/local/info/gmp.info" in
    /*) file="/usr/local/info/gmp.info" ;;
     *) file="/usr/local//usr/local/info/gmp.info" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -R
    case "/usr/local/info/gmp.info" in
    /*) file="/usr/local/info/gmp.info" ;;
     *) file="/usr/local//usr/local/info/gmp.info" ;;
    esac
    indexinfo ${file%/*}


script:
  #!/bin/sh
  #
  # $FreeBSD: head/devel/desktop-file-utils/files/pkg-install.in 340719 2014-01-22 15:52:06Z mat $
  #
  # Initialize the desktop directories and MIME cache.

  if [ "$2" != "POST-INSTALL" ]; then
      exit 0
  fi

  ${PKG_PREFIX}/bin/update-desktop-database -q

  exit 0


script:
  #!/bin/sh
  #
  # $FreeBSD: head/devel/desktop-file-utils/files/pkg-deinstall.in 340719 2014-01-22 15:52:06Z mat $
  #
  # Remove leftover mimeinfo.cache files.

  if [ "$2" != "POST-DEINSTALL" ]; then
      exit 0
  fi

  for mdir in /usr/local/share/applications; do
      if [ -f ${mdir}/mimeinfo.cache ]; then
  	rm -f ${mdir}/mimeinfo.cache
      fi
  done

  exit 0


script:
  case "/usr/local/etc/openldap/ldap.conf.sample" in
    /*) sample_file="/usr/local/etc/openldap/ldap.conf.sample" ;;
    *) sample_file="/usr/local//usr/local/etc/openldap/ldap.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
  /sbin/ldconfig -m /usr/local/lib


script:
  case "/usr/local/etc/openldap/ldap.conf.sample" in
    /*) sample_file="/usr/local/etc/openldap/ldap.conf.sample" ;;
    *) sample_file="/usr/local//usr/local/etc/openldap/ldap.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi


script:
  case "/usr/local/info/m4.info" in
    /*) file="/usr/local/info/m4.info" ;;
     *) file="/usr/local//usr/local/info/m4.info" ;;
    esac
    indexinfo ${file%/*}


script:
  case "etc/highlight/filetypes.conf.sample" in
    /*) sample_file="etc/highlight/filetypes.conf.sample" ;;
    *) sample_file="/usr/local/etc/highlight/filetypes.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi


script:
  case "etc/highlight/filetypes.conf.sample" in
    /*) sample_file="etc/highlight/filetypes.conf.sample" ;;
    *) sample_file="/usr/local/etc/highlight/filetypes.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi


script:
  case "/usr/local/info/autoconf.info" in
    /*) file="/usr/local/info/autoconf.info" ;;
     *) file="/usr/local//usr/local/info/autoconf.info" ;;
    esac
    indexinfo ${file%/*}


script:
  case "etc/asound.conf.sample" in
    /*) sample_file="etc/asound.conf.sample" ;;
    *) sample_file="/usr/local/etc/asound.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
  /sbin/ldconfig -m /usr/local/lib


script:
  case "etc/asound.conf.sample" in
    /*) sample_file="etc/asound.conf.sample" ;;
    *) sample_file="/usr/local/etc/asound.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi


script:
  case "/usr/local/info/libtool.info" in
    /*) file="/usr/local/info/libtool.info" ;;
     *) file="/usr/local//usr/local/info/libtool.info" ;;
    esac
    indexinfo ${file%/*}


script:
  case "/usr/local/info/make.info" in
    /*) file="/usr/local/info/make.info" ;;
     *) file="/usr/local//usr/local/info/make.info" ;;
    esac
    indexinfo ${file%/*}


script:
  case "/usr/local/info/automake.info" in
    /*) file="/usr/local/info/automake.info" ;;
     *) file="/usr/local//usr/local/info/automake.info" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -m /usr/local/lib
    case "/usr/local/info/autogen.info" in
    /*) file="/usr/local/info/autogen.info" ;;
     *) file="/usr/local//usr/local/info/autogen.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/autogen.info-1" in
    /*) file="/usr/local/info/autogen.info-1" ;;
     *) file="/usr/local//usr/local/info/autogen.info-1" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/autogen.info-2" in
    /*) file="/usr/local/info/autogen.info-2" ;;
     *) file="/usr/local//usr/local/info/autogen.info-2" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/autogen.info-3" in
    /*) file="/usr/local/info/autogen.info-3" ;;
     *) file="/usr/local//usr/local/info/autogen.info-3" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -R
    case "/usr/local/info/autogen.info" in
    /*) file="/usr/local/info/autogen.info" ;;
     *) file="/usr/local//usr/local/info/autogen.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/autogen.info-1" in
    /*) file="/usr/local/info/autogen.info-1" ;;
     *) file="/usr/local//usr/local/info/autogen.info-1" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/autogen.info-2" in
    /*) file="/usr/local/info/autogen.info-2" ;;
     *) file="/usr/local//usr/local/info/autogen.info-2" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/autogen.info-3" in
    /*) file="/usr/local/info/autogen.info-3" ;;
     *) file="/usr/local//usr/local/info/autogen.info-3" ;;
    esac
    indexinfo ${file%/*}


script:
  #!/bin/sh
  # $FreeBSD: head/textproc/xmlcatmgr/files/pkg-install.in 340719 2014-01-22 15:52:06Z mat $

  PATH=/bin:/usr/bin:/usr/local/bin

  export PATH
  XMLCATMGR=/usr/local/bin/xmlcatmgr
  CATALOG_MASTER_SGML=/usr/local/share/sgml/catalog
  CATALOG_MASTER_XML=/usr/local/share/xml/catalog
  CATALOG_PORTS_SGML=/usr/local/share/sgml/catalog.ports
  CATALOG_PORTS_XML=/usr/local/share/xml/catalog.ports

  case $2 in
  POST-INSTALL)

  if [ ! -r ${CATALOG_MASTER_SGML} ]; then
  	echo " + Creating ${CATALOG_MASTER_SGML}"
  	${XMLCATMGR} -sc ${CATALOG_MASTER_SGML} create
  fi

  if ! ${XMLCATMGR} -sc ${CATALOG_MASTER_SGML} lookup catalog.ports > /dev/null 2>&1; then
  	echo " + Registering CATALOG catalog.ports (SGML)"
  	${XMLCATMGR} -sc ${CATALOG_MASTER_SGML} add CATALOG catalog.ports
  fi

  if [ ! -r ${CATALOG_PORTS_SGML} ]; then
  	echo " + Creating ${CATALOG_PORTS_SGML}"
  	${XMLCATMGR} -sc ${CATALOG_PORTS_SGML} create
  fi

  if [ ! -r ${CATALOG_MASTER_XML} ]; then
  	echo " + Creating ${CATALOG_MASTER_XML}"
  	${XMLCATMGR} -c ${CATALOG_MASTER_XML} create
  fi

  if ! ${XMLCATMGR} -c ${CATALOG_MASTER_XML} lookup ${CATALOG_PORTS_XML} > /dev/null 2>&1 ; then
  	echo " + Registering nextCatalog catalog.ports (XML)"
  	${XMLCATMGR} -c ${CATALOG_MASTER_XML} add nextCatalog ${CATALOG_PORTS_XML}
  fi

  if [ ! -r ${CATALOG_PORTS_XML} ]; then
  	echo " + Creating ${CATALOG_PORTS_XML}"
  	${XMLCATMGR} -c ${CATALOG_PORTS_XML} create
  fi
  ;;
  esac


script:
  #!/bin/sh
  # $FreeBSD: head/textproc/xmlcatmgr/files/pkg-deinstall.in 340719 2014-01-22 15:52:06Z mat $

  PATH=/bin:/usr/bin:/usr/local/bin

  export PATH
  XMLCATMGR=/usr/local/bin/xmlcatmgr
  CATALOG_MASTER_SGML=/usr/local/share/sgml/catalog
  CATALOG_MASTER_XML=/usr/local/share/xml/catalog
  CATALOG_PORTS_SGML=/usr/local/share/sgml/catalog.ports
  CATALOG_PORTS_XML=/usr/local/share/xml/catalog.ports

  case $2 in
  DEINSTALL)

  T=/tmp/catalog.$$

  ${XMLCATMGR} -sc ${CATALOG_MASTER_SGML} remove CATALOG catalog.ports
  ${XMLCATMGR} -sc ${T} create
  if cmp -s ${T} ${CATALOG_MASTER_SGML} ]; then
  	echo " + Removing ${CATALOG_MASTER_SGML}.  It is empty."
  	rm -f ${CATALOG_MASTER_SGML}
  fi
  if cmp -s ${T} ${CATALOG_PORTS_SGML} ]; then
  	echo " + Removing ${CATALOG_PORTS_SGML}.  It is empty."
  	rm -f ${CATALOG_PORTS_SGML}
  fi
  rm -f ${T}

  ${XMLCATMGR} -c ${CATALOG_MASTER_XML} remove nextCatalog ${CATALOG_PORTS_XML}
  ${XMLCATMGR} -c ${T} create
  if cmp -s ${T} ${CATALOG_MASTER_XML} ]; then
  	echo " + Removing ${CATALOG_MASTER_XML}.  It is empty."
  	rm -f ${CATALOG_MASTER_XML}
  fi
  if cmp -s ${T} ${CATALOG_PORTS_XML} ]; then
  	echo " + Removing ${CATALOG_PORTS_XML}.  It is empty."
  	rm -f ${CATALOG_PORTS_XML}
  fi
  rm -f ${T}
  ;;
  esac


script:
  /usr/local/bin/xmlcatmgr -sc /usr/local/share/sgml/catalog.ports add CATALOG /usr/local/share/xml/xmlcharent/catalog
  /usr/local/bin/xmlcatmgr -c /usr/local/share/xml/catalog.ports add nextCatalog /usr/local/share/xml/xmlcharent/catalog.xml


script:
  /usr/local/bin/xmlcatmgr -sc /usr/local/share/sgml/catalog.ports remove CATALOG /usr/local/share/xml/xmlcharent/catalog
  /usr/local/bin/xmlcatmgr -c /usr/local/share/xml/catalog.ports remove nextCatalog /usr/local/share/xml/xmlcharent/catalog.xml


script:
  /usr/local/bin/xmlcatmgr -sc /usr/local/share/sgml/catalog.ports add CATALOG /usr/local/share/xml/sdocbook/1.1/dtd/catalog
  /usr/local/bin/xmlcatmgr -c /usr/local/share/xml/catalog.ports add nextCatalog /usr/local/share/xml/sdocbook/1.1/dtd/catalog.xml


script:
  /usr/local/bin/xmlcatmgr -sc /usr/local/share/sgml/catalog.ports remove /usr/local/share/xml/sdocbook/1.1/dtd/catalog
  /usr/local/bin/xmlcatmgr -c /usr/local/share/xml/catalog.ports remove /usr/local/share/xml/sdocbook/1.1/dtd/catalog.xml


script:
  /usr/local/bin/xmlcatmgr -c /usr/local/share/xml/catalog.ports add nextCatalog /usr/local/share/xml/docbook/catalog.xml
  /usr/local/bin/xmlcatmgr -sc /usr/local/share/sgml/catalog.ports add CATALOG /usr/local/share/xml/docbook/catalog


script:
  /usr/local/bin/xmlcatmgr -c /usr/local/share/xml/catalog.ports remove nextCatalog /usr/local/share/xml/docbook/catalog.xml
  /usr/local/bin/xmlcatmgr -sc /usr/local/share/sgml/catalog.ports remove CATALOG /usr/local/share/xml/docbook/catalog


script:
  /usr/local/bin/xmlcatmgr -sc /usr/local/share/sgml/catalog.ports add CATALOG /usr/local/share/sgml/docbook/catalog


script:
  /usr/local/bin/xmlcatmgr -sc /usr/local/share/sgml/catalog.ports remove CATALOG /usr/local/share/sgml/docbook/catalog


script:
  /sbin/ldconfig -m /usr/local/lib
    case "/usr/local/info/libtasn1.info" in
    /*) file="/usr/local/info/libtasn1.info" ;;
     *) file="/usr/local//usr/local/info/libtasn1.info" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -R
    case "/usr/local/info/libtasn1.info" in
    /*) file="/usr/local/info/libtasn1.info" ;;
     *) file="/usr/local//usr/local/info/libtasn1.info" ;;
    esac
    indexinfo ${file%/*}


script:
  rm -fr /usr/local/share/mime/x-epoc 2>/dev/null || true
  rm -fr /usr/local/share/mime/x-content 2>/dev/null || true
  rm -fr /usr/local/share/mime/video 2>/dev/null || true
  rm -fr /usr/local/share/mime/text 2>/dev/null || true
  rm -fr /usr/local/share/mime/multipart 2>/dev/null || true
  rm -fr /usr/local/share/mime/model 2>/dev/null || true
  rm -fr /usr/local/share/mime/message 2>/dev/null || true
  rm -fr /usr/local/share/mime/inode 2>/dev/null || true
  rm -fr /usr/local/share/mime/image 2>/dev/null || true
  rm -fr /usr/local/share/mime/audio 2>/dev/null || true
  rm -fr /usr/local/share/mime/application 2>/dev/null || true


script:
  case "share/mime/XMLnamespaces" in
  	/*) f="share/mime/XMLnamespaces" ;;
  	 *) f="/usr/local/share/mime/XMLnamespaces" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
  	case "share/mime/aliases" in
  	/*) f="share/mime/aliases" ;;
  	 *) f="/usr/local/share/mime/aliases" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
  	case "share/mime/generic-icons" in
  	/*) f="share/mime/generic-icons" ;;
  	 *) f="/usr/local/share/mime/generic-icons" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
  	case "share/mime/globs" in
  	/*) f="share/mime/globs" ;;
  	 *) f="/usr/local/share/mime/globs" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
  	case "share/mime/globs2" in
  	/*) f="share/mime/globs2" ;;
  	 *) f="/usr/local/share/mime/globs2" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
  	case "share/mime/icons" in
  	/*) f="share/mime/icons" ;;
  	 *) f="/usr/local/share/mime/icons" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
  	case "share/mime/magic" in
  	/*) f="share/mime/magic" ;;
  	 *) f="/usr/local/share/mime/magic" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
  	case "share/mime/mime.cache" in
  	/*) f="share/mime/mime.cache" ;;
  	 *) f="/usr/local/share/mime/mime.cache" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
  	case "share/mime/subclasses" in
  	/*) f="share/mime/subclasses" ;;
  	 *) f="/usr/local/share/mime/subclasses" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
  	case "share/mime/treemagic" in
  	/*) f="share/mime/treemagic" ;;
  	 *) f="/usr/local/share/mime/treemagic" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
  	case "share/mime/types" in
  	/*) f="share/mime/types" ;;
  	 *) f="/usr/local/share/mime/types" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
  	case "share/mime/version" in
  	/*) f="share/mime/version" ;;
  	 *) f="/usr/local/share/mime/version" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true


script:
  #!/bin/sh

  case $2 in
  POST-INSTALL)
  	for mdir in /usr/local/share/mime; do
  	    if [ -d ${mdir} ]; then
  		/usr/local/bin/update-mime-database ${mdir}
  	    fi
  	done
  	exit 0
  	;;
  esac


script:
  #!/bin/sh
  # This script will create the docbook-xsl catalog and will add entries to xml catalog.
  # WARNING: If you change this script, be sure to check pkg-deinstall.in!
  #
  # Based on http://xmlsoft.org/buildDocBookCatalog file.
  #
  # Run the following command to generate a new VERSIONS string:
  # perl -n -e '/Version ([\d.]+) rel/ && print "$1\n"' work/*/ChangeLog |
  #     sort -n | tr '\n' ' '
  #
  # -- Rui Lopes <rui@ruilopes.com>

  XSL_DIR=${PKG_PREFIX}/share/xsl/docbook
  CATALOG_XSL=${XSL_DIR}/catalog.xml

  if [ "$2" != "POST-INSTALL" ]; then
  	exit 0
  fi

  test -r "${CATALOG_XSL}" || {
      echo >&2 "Cannot register non-existent catalog ${CATALOG_XSL}"
      exit 1
  }
  /usr/local/bin/xmlcatmgr -c /usr/local/share/xml/catalog.ports add delegateSystem \
  	http://docbook.sourceforge.net/release/xsl/ \
  	"file://${CATALOG_XSL}"
  /usr/local/bin/xmlcatmgr -c /usr/local/share/xml/catalog.ports add delegateURI \
  	http://docbook.sourceforge.net/release/xsl/ \
  	"file://${CATALOG_XSL}"
  exit 0


script:
  #!/bin/sh
  # This script will remove the docbook-xsl entries added to xml catalog.
  # -- Rui Lopes <rui@ruilopes.com>

  if [ "$2" != "DEINSTALL" ]; then
  	exit 0
  fi

  /usr/local/bin/xmlcatmgr -c /usr/local/share/xml/catalog.ports remove \
  	http://docbook.sourceforge.net/release/xsl/
  exit 0


script:
  /sbin/ldconfig -m /usr/local/lib
  echo '#include <QtCore/modules/qconfig-network.h>' >> /usr/local/include/qt5/QtCore/qconfig-modules.h


script:
  #!/bin/sh
  #
  # $FreeBSD: head/devel/qt5/files/pkg-deinstall.in 346930 2014-03-03 16:50:32Z makc $

  case $2 in
  POST-DEINSTALL)
    sed -i "" '/qconfig-network\.h/ d' \
      /usr/local/include/qt5/QtCore/qconfig-modules.h 2>/dev/null || true
    [ \! -e /usr/local/include/qt5/QtCore/qconfig.h ] &&
    [ \! -s /usr/local/include/qt5/QtCore/qconfig-modules.h ] &&
    ( rm -f /usr/local/include/qt5/QtCore/qconfig-modules.h 2>/dev/null
      rmdir /usr/local/include/qt5/QtCore 2>/dev/null
      rmdir /usr/local/include/qt5 2>/dev/null ) || true
    ;;
  esac


script:
  case "/boot/modules" in
    /*) kmoddir="/boot/modules" ;;
    *) kmoddir="/usr/local//boot/modules" ;;
    esac
    /usr/sbin/kldxref ${kmoddir}
  /sbin/ldconfig -m /usr/local/lib


script:
  case "/boot/modules" in
    /*) kmoddir="/boot/modules" ;;
    *) kmoddir="/usr/local//boot/modules" ;;
    esac
    /usr/sbin/kldxref ${kmoddir}
    case "${kmoddir}" in
    /usr/local/*) ;;
    /boot/modules) ;;
    *) rmdir -p ${kmoddir} 2>/dev/null || true ;;
    esac
  /sbin/ldconfig -R


script:
  #!/bin/sh
  #
  #	$FreeBSD: head/security/cyrus-sasl2/pkg-install 383016 2015-04-02 15:50:49Z ume $
  #
  # Created by: stb@FreeBSD.org for the cyrus imap server
  # Added to the cyrus-sasl port by hetzels@westbend.net

  #set -vx

  PKG_BATCH=${BATCH:=NO}

  PKG_PREFIX=${PKG_PREFIX:=/usr/local}

  SASLDB_NAME=${PKG_PREFIX}/etc/sasldb2.db

  CYRUS_USER=${CYRUS_USER:=cyrus}
  CYRUS_GROUP=${CYRUS_GROUP:=cyrus}

  #
  # create 'cyrus' user and group before installing
  #

  create_user() {
  	USER=${CYRUS_USER}
  	GROUP=${CYRUS_GROUP}
  	PW=/usr/sbin/pw

  	if [ -x /usr/sbin/nologin ]; then
  		shell=/usr/sbin/nologin
  	elif [ -x /sbin/nologin ]; then
  		shell=/sbin/nologin
  	else
  		shell=/nonexistent
  	fi
  	uhome="/nonexistent"

  	if ! ${PW} show group ${GROUP} -q >/dev/null; then
  		gid=60
  		while ${PW} show group -g ${gid} -q >/dev/null; do
  			gid=`expr ${gid} + 1`
  		done
  		if ! ${PW} add group ${GROUP} -g ${gid}; then
  			e=$?
  			echo "*** Failed to add group \`${GROUP}'. Please add it manually."
  			exit ${e}
  		fi
  		echo "*** Added group \`${GROUP}' (id ${gid})"
  	else
  		gid=`${PW} show group ${GROUP} 2>/dev/null | cut -d: -f3`
  	fi

  	if ! ${PW} show user ${USER} -q >/dev/null; then
  		uid=60
  		while ${PW} show user -u ${uid} -q >/dev/null; do
  			uid=`expr ${uid} + 1`
  		done
  		if ! ${PW} add user ${USER} -u ${uid} -g ${gid} -d "${uhome}" \
  				-c "the cyrus mail server" -s "${shell}" -w no \
  				; then
  			e=$?
  			echo "*** Failed to add user \`${USER}'. Please add it manually."
  			exit ${e}
  		fi
  		echo "*** Added user \`${USER}' (id ${uid})"
  	else
  		if ! ${PW} mod user ${USER} -g ${gid}; then
  			e=$?
  			echo "*** Failed to update user \`${USER}'."
  			exit ${e}
  		fi
  		echo "*** Updated user \`${USER}'."
  	fi
  }

  create_sasldb() {
  	if [ ! -f ${SASLDB_NAME} ]; then
  		echo "test" | ${PKG_PREFIX}/sbin/saslpasswd2 -p -c ${CYRUS_USER}
  		if [ `${PKG_PREFIX}/sbin/sasldblistusers2 | wc -l` -eq 0 ] ; then
                          echo "WARNING: Failed to create ${SASLDB_NAME}"
                  else
  			${PKG_PREFIX}/sbin/saslpasswd2 -d ${CYRUS_USER}
  			chown ${CYRUS_USER}:mail ${SASLDB_NAME}
  			chmod 640 ${SASLDB_NAME}
  		fi
  	fi
  }

  case $2 in
  	PRE-INSTALL)
  		create_user
  		;;
  	POST-INSTALL)
  		if [ "${PKG_BATCH}" = "NO" ]; then
  			create_sasldb
  		elif [ ! -f ${SASLDB_NAME} ]; then
  			echo "*** We do not create ${SASLDB_NAME} automatically in"
  			echo "*** BATCH mode.  Please create it by yourself.  It should be"
  			echo "*** owner: ${CYRUS_USER}, group: mail, mode: 0640."
  		fi
  		;;

  esac


script:
  #!/bin/sh
  #
  #	$FreeBSD: head/security/cyrus-sasl2/pkg-deinstall 340719 2014-01-22 15:52:06Z mat $
  #
  # Created by: hetzels@westbend.net

  #set -vx

  PKG_BATCH=${BATCH:=NO}

  PKG_PREFIX=${PKG_PREFIX:=/usr/local}

  SASLDB_NAME=${PKG_PREFIX}/etc/sasldb2.db

  CYRUS_USER=${CYRUS_USER:=cyrus}
  CYRUS_GROUP=${CYRUS_GROUP:=cyrus}

  # delete sasldb database

  delete_sasldb() {
  	if [ -f ${SASLDB_NAME} ] ; then
  		if [ `${PKG_PREFIX}/sbin/sasldblistusers2 | wc -l` -eq 0 ]; then
  			rm ${SASLDB_NAME}
  		else
  			echo "WARNING: Users SASL passwords are in ${SASLDB_NAME}, keeping this file"
  		fi
  	fi
  }

  delete_user() {
  	if pw usershow ${CYRUS_USER} 2>/dev/null 1>&2; then
  		echo "To delete Cyrus user permanently, use 'pw userdel ${CYRUS_USER}'"
  	fi
  	if pw groupshow ${CYRUS_GROUP} 2>/dev/null 1>&2; then
  		echo "To delete Cyrus group permanently, use 'pw groupdel ${CYRUS_GROUP}'"
  	fi

  }

  case $2 in
  	DEINSTALL)
  		delete_sasldb
  		;;
  	POST-DEINSTALL)
  		delete_user
  		;;

  esac


script:
  case "/usr/local/share/fonts/OTF" in
    /*) fontsdir="/usr/local/share/fonts/OTF" ;;
    *) fontsdir="/usr/local//usr/local/share/fonts/OTF" ;;
    esac
    fc-cache -fs ${fontsdir} 2>/dev/null || true
    mkfontscale ${fontsdir} 2>/dev/null || true
    mkfontdir ${fontsdir} 2>/dev/null || true


script:
  case "/usr/local/share/fonts/OTF" in
    /*) fontsdir="/usr/local/share/fonts/OTF" ;;
    *) fontsdir="/usr/local//usr/local/share/fonts/OTF" ;;
    esac
    fc-cache -fs ${fontsdir} 2>/dev/null || true
    mkfontscale ${fontsdir} 2>/dev/null || true
    if [ -e ${fontsdir}/fonts.scale -a "`stat -f '%z' ${fontsdir}/fonts.scale 2>/dev/null`" = '2' ]; then
      rm ${fontsdir}/fonts.scale
    fi
    mkfontdir ${fontsdir} 2>/dev/null || true
    if [ -e ${fontsdir}/fonts.dir -a "`stat -f '%z' ${fontsdir}/fonts.dir 2>/dev/null`" = '2' ]; then
      rm ${fontsdir}/fonts.dir
    fi


script:
  case "/usr/local/share/fonts/OTF" in
    /*) fontsdir="/usr/local/share/fonts/OTF" ;;
    *) fontsdir="/usr/local//usr/local/share/fonts/OTF" ;;
    esac
    fc-cache -fs ${fontsdir} 2>/dev/null || true
    mkfontscale ${fontsdir} 2>/dev/null || true
    mkfontdir ${fontsdir} 2>/dev/null || true
    case "/usr/local/share/fonts/TTF" in
    /*) fontsdir="/usr/local/share/fonts/TTF" ;;
    *) fontsdir="/usr/local//usr/local/share/fonts/TTF" ;;
    esac
    fc-cache -fs ${fontsdir} 2>/dev/null || true
    mkfontscale ${fontsdir} 2>/dev/null || true
    mkfontdir ${fontsdir} 2>/dev/null || true


script:
  case "/usr/local/share/fonts/OTF" in
    /*) fontsdir="/usr/local/share/fonts/OTF" ;;
    *) fontsdir="/usr/local//usr/local/share/fonts/OTF" ;;
    esac
    fc-cache -fs ${fontsdir} 2>/dev/null || true
    mkfontscale ${fontsdir} 2>/dev/null || true
    if [ -e ${fontsdir}/fonts.scale -a "`stat -f '%z' ${fontsdir}/fonts.scale 2>/dev/null`" = '2' ]; then
      rm ${fontsdir}/fonts.scale
    fi
    mkfontdir ${fontsdir} 2>/dev/null || true
    if [ -e ${fontsdir}/fonts.dir -a "`stat -f '%z' ${fontsdir}/fonts.dir 2>/dev/null`" = '2' ]; then
      rm ${fontsdir}/fonts.dir
    fi
    case "/usr/local/share/fonts/TTF" in
    /*) fontsdir="/usr/local/share/fonts/TTF" ;;
    *) fontsdir="/usr/local//usr/local/share/fonts/TTF" ;;
    esac
    fc-cache -fs ${fontsdir} 2>/dev/null || true
    mkfontscale ${fontsdir} 2>/dev/null || true
    if [ -e ${fontsdir}/fonts.scale -a "`stat -f '%z' ${fontsdir}/fonts.scale 2>/dev/null`" = '2' ]; then
      rm ${fontsdir}/fonts.scale
    fi
    mkfontdir ${fontsdir} 2>/dev/null || true
    if [ -e ${fontsdir}/fonts.dir -a "`stat -f '%z' ${fontsdir}/fonts.dir 2>/dev/null`" = '2' ]; then
      rm ${fontsdir}/fonts.dir
    fi


script:
  case "/usr/local/share/fonts/TTF" in
    /*) fontsdir="/usr/local/share/fonts/TTF" ;;
    *) fontsdir="/usr/local//usr/local/share/fonts/TTF" ;;
    esac
    fc-cache -fs ${fontsdir} 2>/dev/null || true
    mkfontscale ${fontsdir} 2>/dev/null || true
    mkfontdir ${fontsdir} 2>/dev/null || true


script:
  case "/usr/local/share/fonts/TTF" in
    /*) fontsdir="/usr/local/share/fonts/TTF" ;;
    *) fontsdir="/usr/local//usr/local/share/fonts/TTF" ;;
    esac
    fc-cache -fs ${fontsdir} 2>/dev/null || true
    mkfontscale ${fontsdir} 2>/dev/null || true
    if [ -e ${fontsdir}/fonts.scale -a "`stat -f '%z' ${fontsdir}/fonts.scale 2>/dev/null`" = '2' ]; then
      rm ${fontsdir}/fonts.scale
    fi
    mkfontdir ${fontsdir} 2>/dev/null || true
    if [ -e ${fontsdir}/fonts.dir -a "`stat -f '%z' ${fontsdir}/fonts.dir 2>/dev/null`" = '2' ]; then
      rm ${fontsdir}/fonts.dir
    fi


script:
  /sbin/ldconfig -m /usr/local/lib
    case "/usr/local/info/nettle.info" in
    /*) file="/usr/local/info/nettle.info" ;;
     *) file="/usr/local//usr/local/info/nettle.info" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -R
    case "/usr/local/info/nettle.info" in
    /*) file="/usr/local/info/nettle.info" ;;
     *) file="/usr/local//usr/local/info/nettle.info" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -m /usr/local/lib
    case "/usr/local/info/mikmod.info" in
    /*) file="/usr/local/info/mikmod.info" ;;
     *) file="/usr/local//usr/local/info/mikmod.info" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -R
    case "/usr/local/info/mikmod.info" in
    /*) file="/usr/local/info/mikmod.info" ;;
     *) file="/usr/local//usr/local/info/mikmod.info" ;;
    esac
    indexinfo ${file%/*}


script:
  #!/bin/sh
  #
  # $FreeBSD$
  #

  PREFIX="${PKG_PREFIX-/usr/local}"

  case $2 in
  POST-INSTALL)
  	if [ -f ${PREFIX}/lib/.nvidia/libGL.so.1 ]; then
  	  /bin/ln -f ${PREFIX}/lib/.nvidia/libGL.so.1 ${PREFIX}/lib/libGL.so
  	  /bin/ln -f ${PREFIX}/lib/.nvidia/libGL.so.1 ${PREFIX}/lib/libGL.so.1
  	else
  	  /bin/ln -f ${PREFIX}/lib/.mesa/libGL.so.1.2.0 ${PREFIX}/lib/libGL.so
  	  /bin/ln -f ${PREFIX}/lib/.mesa/libGL.so.1.2.0 ${PREFIX}/lib/libGL.so.1
  	  /bin/ln -f ${PREFIX}/lib/.mesa/libGL.so.1.2.0 ${PREFIX}/lib/libGL.so.1.2.0
  	fi
  	;;
  esac


script:
  #!/bin/sh
  #
  # $FreeBSD$
  #

  PREFIX="${PKG_PREFIX-/usr/local}"

  case $2 in
  DEINSTALL)
  	/bin/rm -f ${PREFIX}/lib/libGL.so*
  	;;
  esac


script:
  #!/bin/sh
  #
  # $FreeBSD$
  #

  PREFIX="${PKG_PREFIX-/usr/local}"

  case $2 in
  POST-INSTALL)
  	if [ -f ${PREFIX}/lib/.nvidia/libEGL.so.1 ]; then
  	  /bin/ln -f ${PREFIX}/lib/.nvidia/libEGL.so.1 ${PREFIX}/lib/libEGL.so
  	  /bin/ln -f ${PREFIX}/lib/.nvidia/libEGL.so.1 ${PREFIX}/lib/libEGL.so.1
  	else
  	  /bin/ln -f ${PREFIX}/lib/.mesa/libEGL.so.1.0.0 ${PREFIX}/lib/libEGL.so
  	  /bin/ln -f ${PREFIX}/lib/.mesa/libEGL.so.1.0.0 ${PREFIX}/lib/libEGL.so.1
  	  /bin/ln -f ${PREFIX}/lib/.mesa/libEGL.so.1.0.0 ${PREFIX}/lib/libEGL.so.1.0.0
  	fi
  	;;
  esac


script:
  #!/bin/sh
  #
  # $FreeBSD$
  #

  PREFIX="${PKG_PREFIX-/usr/local}"

  case $2 in
  DEINSTALL)
  	/bin/rm -f ${PREFIX}/lib/libEGL.so*
  	;;
  esac


script:
  #!/bin/sh
  #
  # $FreeBSD$
  #

  PREFIX="${PKG_PREFIX-/usr/local}"

  case $2 in
  POST-INSTALL)
  	if [ -f ${PREFIX}/lib/.nvidia/libGLESv2.so.2 ]; then
  	  /bin/ln -f ${PREFIX}/lib/.nvidia/libGLESv2.so.2 ${PREFIX}/lib/libGLESv2.so
  	  /bin/ln -f ${PREFIX}/lib/.nvidia/libGLESv2.so.2 ${PREFIX}/lib/libGLESv2.so.2
  	else
  	  /bin/ln -f ${PREFIX}/lib/.mesa/libGLESv2.so.2.0.0 ${PREFIX}/lib/libGLESv2.so
  	  /bin/ln -f ${PREFIX}/lib/.mesa/libGLESv2.so.2.0.0 ${PREFIX}/lib/libGLESv2.so.2
  	  /bin/ln -f ${PREFIX}/lib/.mesa/libGLESv2.so.2.0.0 ${PREFIX}/lib/libGLESv2.so.2.0.0
  	fi
  	;;
  esac


script:
  #!/bin/sh
  #
  # $FreeBSD$
  #

  PREFIX="${PKG_PREFIX-/usr/local}"

  case $2 in
  DEINSTALL)
  	/bin/rm -f ${PREFIX}/lib/libGLESv2.so*
  	;;
  esac


script:
  echo "===> Creating users and/or groups."
  if ! /usr/sbin/pw groupshow cups >/dev/null 2>&1; then 
    echo "Creating group 'cups' with gid '193'." 
    /usr/sbin/pw groupadd cups -g 193; else echo "Using existing group 'cups'."
  fi
  if ! /usr/sbin/pw usershow cups >/dev/null 2>&1; then 
    echo "Creating user 'cups' with uid '193'." 
    /usr/sbin/pw useradd cups -u 193 -g 193  -c "Cups Owner" -d /nonexistent -s /usr/sbin/nologin 
    else 
  echo "Using existing user 'cups'." 
  fi


script:
  if /usr/sbin/pw usershow cups >/dev/null 2>&1; then  echo "==> You should manually remove the \"cups\" user. "; fi


script:
  case "/var/log/ConsoleKit/history" in
  	/*) f="/var/log/ConsoleKit/history" ;;
  	 *) f="/usr/local//var/log/ConsoleKit/history" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
  /sbin/ldconfig -R


script:
  /usr/local/bin/gdk-pixbuf-query-loaders > /dev/null 2>&1 && /usr/local/bin/gdk-pixbuf-query-loaders > /usr/local/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache 2>/dev/null || /usr/bin/true
  /sbin/ldconfig -R


script:
  echo "===> Creating users and/or groups."
  if ! /usr/sbin/pw groupshow avahi >/dev/null 2>&1; then 
    echo "Creating group 'avahi' with gid '558'." 
    /usr/sbin/pw groupadd avahi -g 558; else echo "Using existing group 'avahi'."
  fi
  if ! /usr/sbin/pw usershow avahi >/dev/null 2>&1; then 
    echo "Creating user 'avahi' with uid '558'." 
    /usr/sbin/pw useradd avahi -u 558 -g 558  -c "Avahi Daemon User" -d /nonexistent -s /usr/sbin/nologin 
    else 
  echo "Using existing user 'avahi'." 
  fi


script:
  dconf update
  /usr/local/bin/gtk-query-immodules-3.0 --update-cache
  /usr/local/bin/gtk-query-immodules-2.0 --update-cache
  /sbin/ldconfig -m /usr/local/lib
    glib-compile-schemas /usr/local/share/glib-2.0/schemas > /dev/null || true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/hicolor 2>/dev/null || /usr/bin/true


script:
  case "share/icons/hicolor/icon-theme.cache" in
  	/*) f="share/icons/hicolor/icon-theme.cache" ;;
  	 *) f="/usr/local/share/icons/hicolor/icon-theme.cache" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
  /usr/local/bin/gtk-query-immodules-3.0 --update-cache
  /usr/local/bin/gtk-query-immodules-2.0 --update-cache
  /sbin/ldconfig -R
    glib-compile-schemas /usr/local/share/glib-2.0/schemas > /dev/null || true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/hicolor 2>/dev/null || /usr/bin/true


script:
  /sbin/ldconfig -m /usr/local/lib
    case "/usr/local/info/gnupg.info" in
    /*) file="/usr/local/info/gnupg.info" ;;
     *) file="/usr/local//usr/local/info/gnupg.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/gnupg.info-1" in
    /*) file="/usr/local/info/gnupg.info-1" ;;
     *) file="/usr/local//usr/local/info/gnupg.info-1" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/gnupg.info-2" in
    /*) file="/usr/local/info/gnupg.info-2" ;;
     *) file="/usr/local//usr/local/info/gnupg.info-2" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -R
    case "/usr/local/info/gnupg.info" in
    /*) file="/usr/local/info/gnupg.info" ;;
     *) file="/usr/local//usr/local/info/gnupg.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/gnupg.info-1" in
    /*) file="/usr/local/info/gnupg.info-1" ;;
     *) file="/usr/local//usr/local/info/gnupg.info-1" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/gnupg.info-2" in
    /*) file="/usr/local/info/gnupg.info-2" ;;
     *) file="/usr/local//usr/local/info/gnupg.info-2" ;;
    esac
    indexinfo ${file%/*}


script:
  #!/bin/sh
  #
  # $FreeBSD$
  #

  if [ "$2" != "POST-INSTALL" ]; then
      exit 0
  fi

  if [ -r ${PKG_PREFIX}/bin/gpg ] || [ -L ${PKG_PREFIX}/bin/gpg ]; then
  	# Skip.
  else
  	ln -s gpg2 ${PKG_PREFIX}/bin/gpg
  fi


script:
  /sbin/ldconfig -m /usr/local/lib
    glib-compile-schemas /usr/local/share/glib-2.0/schemas > /dev/null || true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/mate 2>/dev/null || /usr/bin/true


script:
  case "share/icons/mate/icon-theme.cache" in
  	/*) f="share/icons/mate/icon-theme.cache" ;;
  	 *) f="/usr/local/share/icons/mate/icon-theme.cache" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
  /sbin/ldconfig -R
    glib-compile-schemas /usr/local/share/glib-2.0/schemas > /dev/null || true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/mate 2>/dev/null || /usr/bin/true


script:
  #!/bin/sh

  case $2 in
    POST-INSTALL)
      perl -MXML::SAX -e 'XML::SAX->add_parser(q(XML::SAX::Expat))->save_parsers();'
    ;;
  esac


script:
  #!/bin/sh

  case $2 in
    DEINSTALL)
      perl -MXML::SAX -e 'XML::SAX->remove_parser(q(XML::SAX::Expat))->save_parsers();'
    ;;
  esac


script:
  /usr/local/bin/gio-querymodules /usr/local/lib/mate-panel/modules
  /sbin/ldconfig -m /usr/local/lib
    glib-compile-schemas /usr/local/share/glib-2.0/schemas > /dev/null || true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/hicolor 2>/dev/null || /usr/bin/true


script:
  /sbin/ldconfig -m /usr/local/lib
    glib-compile-schemas /usr/local/share/glib-2.0/schemas > /dev/null || true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/HighContrast 2>/dev/null || /usr/bin/true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/hicolor 2>/dev/null || /usr/bin/true


script:
  case "share/icons/HighContrast/icon-theme.cache" in
  	/*) f="share/icons/HighContrast/icon-theme.cache" ;;
  	 *) f="/usr/local/share/icons/HighContrast/icon-theme.cache" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
  	case "share/icons/hicolor/icon-theme.cache" in
  	/*) f="share/icons/hicolor/icon-theme.cache" ;;
  	 *) f="/usr/local/share/icons/hicolor/icon-theme.cache" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
  /sbin/ldconfig -R
    glib-compile-schemas /usr/local/share/glib-2.0/schemas > /dev/null || true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/HighContrast 2>/dev/null || /usr/bin/true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/hicolor 2>/dev/null || /usr/bin/true


script:
  #!/bin/sh
  #
  # $FreeBSD$
  #

  PREFIX="${PKG_PREFIX-/usr/local}"

  case $2 in
  POST-INSTALL)
  	if [ -f ${PREFIX}/lib/xorg/modules/extensions/.nvidia/libglx.so.1 ]; then
  	  /bin/ln -f ${PREFIX}/lib/xorg/modules/extensions/.nvidia/libglx.so.1 \
  		${PREFIX}/lib/xorg/modules/extensions/libglx.so
  	  /bin/ln -f ${PREFIX}/lib/xorg/modules/extensions/.nvidia/libglx.so.1 \
  		${PREFIX}/lib/xorg/modules/extensions/libglx.so.1
  	else
  	  /bin/ln -f ${PREFIX}/lib/xorg/modules/extensions/.xorg/libglx.so \
  		${PREFIX}/lib/xorg/modules/extensions/libglx.so
  	fi
  	;;
  esac


script:
  #!/bin/sh
  #
  # $FreeBSD$
  #

  PREFIX="${PKG_PREFIX-/usr/local}"

  case $2 in
  DEINSTALL)
  	/bin/rm -rf ${PREFIX}/lib/xorg/modules/extensions/libglx.so*
  	;;
  esac


script:
  /sbin/ldconfig -m /usr/local/lib
  echo '#include <QtCore/modules/qconfig-quick.h>' >> /usr/local/include/qt5/QtCore/qconfig-modules.h


script:
  #!/bin/sh
  #
  # $FreeBSD: head/devel/qt5/files/pkg-deinstall.in 346930 2014-03-03 16:50:32Z makc $

  case $2 in
  POST-DEINSTALL)
    sed -i "" '/qconfig-quick\.h/ d' \
      /usr/local/include/qt5/QtCore/qconfig-modules.h 2>/dev/null || true
    [ \! -e /usr/local/include/qt5/QtCore/qconfig.h ] &&
    [ \! -s /usr/local/include/qt5/QtCore/qconfig-modules.h ] &&
    ( rm -f /usr/local/include/qt5/QtCore/qconfig-modules.h 2>/dev/null
      rmdir /usr/local/include/qt5/QtCore 2>/dev/null
      rmdir /usr/local/include/qt5 2>/dev/null ) || true
    ;;
  esac


script:
  /sbin/ldconfig -m /usr/local/lib
  echo '#include <QtCore/modules/qconfig-opengl.h>' >> /usr/local/include/qt5/QtCore/qconfig-modules.h


script:
  #!/bin/sh
  #
  # $FreeBSD: head/devel/qt5/files/pkg-deinstall.in 346930 2014-03-03 16:50:32Z makc $

  case $2 in
  POST-DEINSTALL)
    sed -i "" '/qconfig-opengl\.h/ d' \
      /usr/local/include/qt5/QtCore/qconfig-modules.h 2>/dev/null || true
    [ \! -e /usr/local/include/qt5/QtCore/qconfig.h ] &&
    [ \! -s /usr/local/include/qt5/QtCore/qconfig-modules.h ] &&
    ( rm -f /usr/local/include/qt5/QtCore/qconfig-modules.h 2>/dev/null
      rmdir /usr/local/include/qt5/QtCore 2>/dev/null
      rmdir /usr/local/include/qt5 2>/dev/null ) || true
    ;;
  esac


script:
  /sbin/ldconfig -m /usr/local/lib
    glib-compile-schemas /usr/local/share/glib-2.0/schemas > /dev/null || true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/hicolor 2>/dev/null || /usr/bin/true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/mate 2>/dev/null || /usr/bin/true


script:
  case "share/icons/hicolor/icon-theme.cache" in
  	/*) f="share/icons/hicolor/icon-theme.cache" ;;
  	 *) f="/usr/local/share/icons/hicolor/icon-theme.cache" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
  	case "share/icons/mate/icon-theme.cache" in
  	/*) f="share/icons/mate/icon-theme.cache" ;;
  	 *) f="/usr/local/share/icons/mate/icon-theme.cache" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
  /sbin/ldconfig -R
    glib-compile-schemas /usr/local/share/glib-2.0/schemas > /dev/null || true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/hicolor 2>/dev/null || /usr/bin/true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/mate 2>/dev/null || /usr/bin/true


script:
  /bin/mkdir -p /compat/linux/etc/pango/i386-redhat-linux-gnu
  /compat/linux/sbin/ldconfig -r /compat/linux


script:
  case "etc/irman.conf.sample" in
    /*) sample_file="etc/irman.conf.sample" ;;
    *) sample_file="/usr/local/etc/irman.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
  /sbin/ldconfig -m /usr/local/lib


script:
  case "etc/irman.conf.sample" in
    /*) sample_file="etc/irman.conf.sample" ;;
    *) sample_file="/usr/local/etc/irman.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi


script:
  case "etc/cups/cups-files.conf.sample" in
    /*) sample_file="etc/cups/cups-files.conf.sample" ;;
    *) sample_file="/usr/local/etc/cups/cups-files.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/cups/cupsd.conf.sample" in
    /*) sample_file="etc/cups/cupsd.conf.sample" ;;
    *) sample_file="/usr/local/etc/cups/cupsd.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/cups/mime.convs.sample" in
    /*) sample_file="etc/cups/mime.convs.sample" ;;
    *) sample_file="/usr/local/etc/cups/mime.convs.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/cups/mime.types.sample" in
    /*) sample_file="etc/cups/mime.types.sample" ;;
    *) sample_file="/usr/local/etc/cups/mime.types.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/cups/snmp.conf.sample" in
    /*) sample_file="etc/cups/snmp.conf.sample" ;;
    *) sample_file="/usr/local/etc/cups/snmp.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/hicolor 2>/dev/null || /usr/bin/true


script:
  case "etc/cups/cups-files.conf.sample" in
    /*) sample_file="etc/cups/cups-files.conf.sample" ;;
    *) sample_file="/usr/local/etc/cups/cups-files.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/cups/cupsd.conf.sample" in
    /*) sample_file="etc/cups/cupsd.conf.sample" ;;
    *) sample_file="/usr/local/etc/cups/cupsd.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/cups/mime.convs.sample" in
    /*) sample_file="etc/cups/mime.convs.sample" ;;
    *) sample_file="/usr/local/etc/cups/mime.convs.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/cups/mime.types.sample" in
    /*) sample_file="etc/cups/mime.types.sample" ;;
    *) sample_file="/usr/local/etc/cups/mime.types.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/cups/snmp.conf.sample" in
    /*) sample_file="etc/cups/snmp.conf.sample" ;;
    *) sample_file="/usr/local/etc/cups/snmp.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
  if /usr/sbin/pw usershow cups >/dev/null 2>&1; then  echo "==> You should manually remove the \"cups\" user. "; fi


script:
  case "etc/pkg.conf.sample" in
    /*) sample_file="etc/pkg.conf.sample" ;;
    *) sample_file="/usr/local/etc/pkg.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
  /sbin/ldconfig -m /usr/local/lib


script:
  case "etc/pkg.conf.sample" in
    /*) sample_file="etc/pkg.conf.sample" ;;
    *) sample_file="/usr/local/etc/pkg.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi


script:
  case "/usr/local/info/wget.info" in
    /*) file="/usr/local/info/wget.info" ;;
     *) file="/usr/local//usr/local/info/wget.info" ;;
    esac
    indexinfo ${file%/*}


script:
  case "/usr/local/info/texi2html.info" in
    /*) file="/usr/local/info/texi2html.info" ;;
     *) file="/usr/local//usr/local/info/texi2html.info" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -m /usr/local/lib
    case "/usr/local/info/recode.info" in
    /*) file="/usr/local/info/recode.info" ;;
     *) file="/usr/local//usr/local/info/recode.info" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -R
    case "/usr/local/info/recode.info" in
    /*) file="/usr/local/info/recode.info" ;;
     *) file="/usr/local//usr/local/info/recode.info" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -m /usr/local/lib
  echo '#include <QtCore/modules/qconfig-multimedia.h>' >> /usr/local/include/qt5/QtCore/qconfig-modules.h


script:
  #!/bin/sh
  #
  # $FreeBSD: head/devel/qt5/files/pkg-deinstall.in 346930 2014-03-03 16:50:32Z makc $

  case $2 in
  POST-DEINSTALL)
    sed -i "" '/qconfig-multimedia\.h/ d' \
      /usr/local/include/qt5/QtCore/qconfig-modules.h 2>/dev/null || true
    [ \! -e /usr/local/include/qt5/QtCore/qconfig.h ] &&
    [ \! -s /usr/local/include/qt5/QtCore/qconfig-modules.h ] &&
    ( rm -f /usr/local/include/qt5/QtCore/qconfig-modules.h 2>/dev/null
      rmdir /usr/local/include/qt5/QtCore 2>/dev/null
      rmdir /usr/local/include/qt5 2>/dev/null ) || true
    ;;
  esac


script:
  ln -sf /usr/local/lib/browser_plugins/gmp-gmpopenh264/gmpopenh264.js /usr/local/lib/firefox-nightly/defaults/pref/ 2>/dev/null || true
  ln -sf /usr/local/lib/browser_plugins/gmp-gmpopenh264/gmpopenh264.js /usr/local/lib/firefox/defaults/pref/ 2>/dev/null || true
  ln -sf /usr/local/lib/browser_plugins/gmp-gmpopenh264/gmpopenh264.js /usr/local/lib/seamonkey/defaults/pref/ 2>/dev/null || true
  /sbin/ldconfig -m /usr/local/lib


script:
  case "lib/firefox-nightly/defaults/pref/gmpopenh264.js" in
  	/*) f="lib/firefox-nightly/defaults/pref/gmpopenh264.js" ;;
  	 *) f="/usr/local/lib/firefox-nightly/defaults/pref/gmpopenh264.js" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
  	case "lib/firefox/defaults/pref/gmpopenh264.js" in
  	/*) f="lib/firefox/defaults/pref/gmpopenh264.js" ;;
  	 *) f="/usr/local/lib/firefox/defaults/pref/gmpopenh264.js" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
  	case "lib/seamonkey/defaults/pref/gmpopenh264.js" in
  	/*) f="lib/seamonkey/defaults/pref/gmpopenh264.js" ;;
  	 *) f="/usr/local/lib/seamonkey/defaults/pref/gmpopenh264.js" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
  /sbin/ldconfig -R


script:
  /sbin/ldconfig -m /usr/local/lib
    case "/usr/local/info/mjpeg-howto.info" in
    /*) file="/usr/local/info/mjpeg-howto.info" ;;
     *) file="/usr/local//usr/local/info/mjpeg-howto.info" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -R
    case "/usr/local/info/mjpeg-howto.info" in
    /*) file="/usr/local/info/mjpeg-howto.info" ;;
     *) file="/usr/local//usr/local/info/mjpeg-howto.info" ;;
    esac
    indexinfo ${file%/*}


script:
  case "share/projectM/config.inp.sample" in
    /*) sample_file="share/projectM/config.inp.sample" ;;
    *) sample_file="/usr/local/share/projectM/config.inp.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
  /sbin/ldconfig -m /usr/local/lib


script:
  case "share/projectM/config.inp.sample" in
    /*) sample_file="share/projectM/config.inp.sample" ;;
    *) sample_file="/usr/local/share/projectM/config.inp.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi


script:
  /sbin/ldconfig -m /usr/local/lib
    case "/usr/local/info/libassetml.info" in
    /*) file="/usr/local/info/libassetml.info" ;;
     *) file="/usr/local//usr/local/info/libassetml.info" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -R
    case "/usr/local/info/libassetml.info" in
    /*) file="/usr/local/info/libassetml.info" ;;
     *) file="/usr/local//usr/local/info/libassetml.info" ;;
    esac
    indexinfo ${file%/*}


script:
  case "/usr/local/info/help2man.info" in
    /*) file="/usr/local/info/help2man.info" ;;
     *) file="/usr/local//usr/local/info/help2man.info" ;;
    esac
    indexinfo ${file%/*}


script:
  case "/usr/local/info/enscript.info" in
    /*) file="/usr/local/info/enscript.info" ;;
     *) file="/usr/local//usr/local/info/enscript.info" ;;
    esac
    indexinfo ${file%/*}


script:
  case "/usr/local/info/bison.info" in
    /*) file="/usr/local/info/bison.info" ;;
     *) file="/usr/local//usr/local/info/bison.info" ;;
    esac
    indexinfo ${file%/*}


script:
  case "/usr/local/info/autoconf-2.13.info" in
    /*) file="/usr/local/info/autoconf-2.13.info" ;;
     *) file="/usr/local//usr/local/info/autoconf-2.13.info" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -m /usr/local/lib
    case "/usr/local/info/a2ps.info" in
    /*) file="/usr/local/info/a2ps.info" ;;
     *) file="/usr/local//usr/local/info/a2ps.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/a2ps.info-1" in
    /*) file="/usr/local/info/a2ps.info-1" ;;
     *) file="/usr/local//usr/local/info/a2ps.info-1" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/a2ps.info-2" in
    /*) file="/usr/local/info/a2ps.info-2" ;;
     *) file="/usr/local//usr/local/info/a2ps.info-2" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/a2ps.info-3" in
    /*) file="/usr/local/info/a2ps.info-3" ;;
     *) file="/usr/local//usr/local/info/a2ps.info-3" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/a2ps.info-4" in
    /*) file="/usr/local/info/a2ps.info-4" ;;
     *) file="/usr/local//usr/local/info/a2ps.info-4" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/a2ps.info-5" in
    /*) file="/usr/local/info/a2ps.info-5" ;;
     *) file="/usr/local//usr/local/info/a2ps.info-5" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/a2ps.info-6" in
    /*) file="/usr/local/info/a2ps.info-6" ;;
     *) file="/usr/local//usr/local/info/a2ps.info-6" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/ogonkify.info" in
    /*) file="/usr/local/info/ogonkify.info" ;;
     *) file="/usr/local//usr/local/info/ogonkify.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/regex.info" in
    /*) file="/usr/local/info/regex.info" ;;
     *) file="/usr/local//usr/local/info/regex.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/regex.info-1" in
    /*) file="/usr/local/info/regex.info-1" ;;
     *) file="/usr/local//usr/local/info/regex.info-1" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/regex.info-2" in
    /*) file="/usr/local/info/regex.info-2" ;;
     *) file="/usr/local//usr/local/info/regex.info-2" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/regex.info-3" in
    /*) file="/usr/local/info/regex.info-3" ;;
     *) file="/usr/local//usr/local/info/regex.info-3" ;;
    esac
    indexinfo ${file%/*}


script:
  /sbin/ldconfig -R
    case "/usr/local/info/a2ps.info" in
    /*) file="/usr/local/info/a2ps.info" ;;
     *) file="/usr/local//usr/local/info/a2ps.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/a2ps.info-1" in
    /*) file="/usr/local/info/a2ps.info-1" ;;
     *) file="/usr/local//usr/local/info/a2ps.info-1" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/a2ps.info-2" in
    /*) file="/usr/local/info/a2ps.info-2" ;;
     *) file="/usr/local//usr/local/info/a2ps.info-2" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/a2ps.info-3" in
    /*) file="/usr/local/info/a2ps.info-3" ;;
     *) file="/usr/local//usr/local/info/a2ps.info-3" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/a2ps.info-4" in
    /*) file="/usr/local/info/a2ps.info-4" ;;
     *) file="/usr/local//usr/local/info/a2ps.info-4" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/a2ps.info-5" in
    /*) file="/usr/local/info/a2ps.info-5" ;;
     *) file="/usr/local//usr/local/info/a2ps.info-5" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/a2ps.info-6" in
    /*) file="/usr/local/info/a2ps.info-6" ;;
     *) file="/usr/local//usr/local/info/a2ps.info-6" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/ogonkify.info" in
    /*) file="/usr/local/info/ogonkify.info" ;;
     *) file="/usr/local//usr/local/info/ogonkify.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/regex.info" in
    /*) file="/usr/local/info/regex.info" ;;
     *) file="/usr/local//usr/local/info/regex.info" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/regex.info-1" in
    /*) file="/usr/local/info/regex.info-1" ;;
     *) file="/usr/local//usr/local/info/regex.info-1" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/regex.info-2" in
    /*) file="/usr/local/info/regex.info-2" ;;
     *) file="/usr/local//usr/local/info/regex.info-2" ;;
    esac
    indexinfo ${file%/*}
    case "/usr/local/info/regex.info-3" in
    /*) file="/usr/local/info/regex.info-3" ;;
     *) file="/usr/local//usr/local/info/regex.info-3" ;;
    esac
    indexinfo ${file%/*}


script:
  echo "===> Creating users and/or groups."
  if ! /usr/sbin/pw groupshow _tss >/dev/null 2>&1; then 
    echo "Creating group '_tss' with gid '601'." 
    /usr/sbin/pw groupadd _tss -g 601; else echo "Using existing group '_tss'."
  fi
  if ! /usr/sbin/pw usershow _tss >/dev/null 2>&1; then 
    echo "Creating user '_tss' with uid '601'." 
    /usr/sbin/pw useradd _tss -u 601 -g 601 -L daemon -c "TrouSerS user" -d /var/empty -s /usr/sbin/nologin 
    else 
  echo "Using existing user '_tss'." 
  fi


script:
  [ -f /usr/local/etc/tcsd.conf ] || cp -p /usr/local/etc/tcsd.conf.dist /usr/local/etc/tcsd.conf
  /sbin/ldconfig -m /usr/local/lib


script:
  cmp -s /usr/local/etc/tcsd.conf /usr/local/etc/tcsd.conf.dist && rm -f /usr/local/etc/tcsd.conf || true
  if /usr/sbin/pw usershow _tss >/dev/null 2>&1; then  echo "==> You should manually remove the \"_tss\" user. "; fi


script:
  echo "===> Creating users and/or groups."
  if ! /usr/sbin/pw groupshow messagebus >/dev/null 2>&1; then 
    echo "Creating group 'messagebus' with gid '556'." 
    /usr/sbin/pw groupadd messagebus -g 556; else echo "Using existing group 'messagebus'."
  fi
  if ! /usr/sbin/pw usershow messagebus >/dev/null 2>&1; then 
    echo "Creating user 'messagebus' with uid '556'." 
    /usr/sbin/pw useradd messagebus -u 556 -g 556  -c "D-BUS Daemon User" -d /nonexistent -s /usr/sbin/nologin 
    else 
  echo "Using existing user 'messagebus'." 
  fi


script:
  if /usr/sbin/pw usershow messagebus >/dev/null 2>&1; then  echo "==> You should manually remove the \"messagebus\" user. "; fi


script:
  echo "===> Creating users and/or groups."
  if ! /usr/sbin/pw groupshow polkitd >/dev/null 2>&1; then 
    echo "Creating group 'polkitd' with gid '565'." 
    /usr/sbin/pw groupadd polkitd -g 565; else echo "Using existing group 'polkitd'."
  fi
  if ! /usr/sbin/pw usershow polkitd >/dev/null 2>&1; then 
    echo "Creating user 'polkitd' with uid '565'." 
    /usr/sbin/pw useradd polkitd -u 565 -g 565  -c "Polkit Daemon User" -d /var/empty -s /usr/sbin/nologin 
    else 
  echo "Using existing user 'polkitd'." 
  fi


script:
  case "etc/dbus-1/system.d/org.freedesktop.PolicyKit1.conf.sample" in
    /*) sample_file="etc/dbus-1/system.d/org.freedesktop.PolicyKit1.conf.sample" ;;
    *) sample_file="/usr/local/etc/dbus-1/system.d/org.freedesktop.PolicyKit1.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
  /sbin/ldconfig -m /usr/local/lib


script:
  case "etc/dbus-1/system.d/org.freedesktop.PolicyKit1.conf.sample" in
    /*) sample_file="etc/dbus-1/system.d/org.freedesktop.PolicyKit1.conf.sample" ;;
    *) sample_file="/usr/local/etc/dbus-1/system.d/org.freedesktop.PolicyKit1.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
  if /usr/sbin/pw usershow polkitd >/dev/null 2>&1; then  echo "==> You should manually remove the \"polkitd\" user. "; fi


script:
  #!/bin/sh

  case $2 in
  POST-INSTALL)
  	/bin/mkdir -p /var/lib/polkit-1/localauthority
  	/bin/mkdir -p ${PKG_PREFIX}/etc/polkit-1/localauthority
  	/bin/mkdir -p ${PKG_PREFIX}/share/polkit-1/rules.d
  	for i in 10-vendor.d 20-org.d 30-site.d 50-local.d 90-mandatory.d; do
  	    /bin/mkdir -p /var/lib/polkit-1/localauthority/${i}
  	    /bin/mkdir -p ${PKG_PREFIX}/etc/polkit-1/localauthority/${i}
  	done
  	/bin/chmod 0700 /var/lib/polkit-1
  	/bin/chmod 0700 ${PKG_PREFIX}/etc/polkit-1
  	exit 0
  	;;
  esac


script:
  echo "===> Creating users and/or groups."
  if ! /usr/sbin/pw groupshow colord >/dev/null 2>&1; then 
    echo "Creating group 'colord' with gid '970'." 
    /usr/sbin/pw groupadd colord -g 970; else echo "Using existing group 'colord'."
  fi
  if ! /usr/sbin/pw usershow colord >/dev/null 2>&1; then 
    echo "Creating user 'colord' with uid '970'." 
    /usr/sbin/pw useradd colord -u 970 -g 970  -c "colord color management daemon" -d /nonexistent -s /usr/sbin/nologin 
    else 
  echo "Using existing user 'colord'." 
  fi


script:
  if /usr/sbin/pw usershow colord >/dev/null 2>&1; then  echo "==> You should manually remove the \"colord\" user. "; fi


script:
  #!/bin/sh

  case $2 in
  POST-INSTALL)
  	/bin/mkdir -p /var/db/colord/icc
  	/bin/chmod 0755 /var/db/colord
  	/usr/sbin/chown colord:colord /var/db/colord
  	/usr/sbin/chown colord:colord /var/db/colord/icc
  	exit 0
  	;;
  esac


script:
  echo "===> Creating users and/or groups."
  if ! /usr/sbin/pw groupshow polkit >/dev/null 2>&1; then 
    echo "Creating group 'polkit' with gid '562'." 
    /usr/sbin/pw groupadd polkit -g 562; else echo "Using existing group 'polkit'."
  fi
  if ! /usr/sbin/pw usershow polkit >/dev/null 2>&1; then 
    echo "Creating user 'polkit' with uid '562'." 
    /usr/sbin/pw useradd polkit -u 562 -g 562  -c "PolicyKit User" -d /nonexistent -s /usr/sbin/nologin 
    else 
  echo "Using existing user 'polkit'." 
  fi


script:
  case "etc/PolicyKit/PolicyKit.conf.sample" in
    /*) sample_file="etc/PolicyKit/PolicyKit.conf.sample" ;;
    *) sample_file="/usr/local/etc/PolicyKit/PolicyKit.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
  /sbin/ldconfig -m /usr/local/lib


script:
  case "etc/PolicyKit/PolicyKit.conf.sample" in
    /*) sample_file="etc/PolicyKit/PolicyKit.conf.sample" ;;
    *) sample_file="/usr/local/etc/PolicyKit/PolicyKit.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
  if /usr/sbin/pw usershow polkit >/dev/null 2>&1; then  echo "==> You should manually remove the \"polkit\" user. "; fi


script:
  case "/var/lib/misc/PolicyKit.reload" in
  	/*) f="/var/lib/misc/PolicyKit.reload" ;;
  	 *) f="/usr/local//var/lib/misc/PolicyKit.reload" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
  /sbin/ldconfig -R


script:
  #!/bin/sh

  case $2 in
  POST-INSTALL)
  	USER=polkit
  	GROUP=${USER}

  	/usr/bin/install -d -o root -m 0770 -g ${GROUP} /var/run/PolicyKit
  	/usr/bin/install -d -o root -m 0770 -g ${GROUP} /var/lib/PolicyKit
  	/usr/bin/install -d -o ${USER} -m 0755 -g wheel /var/lib/PolicyKit-public
  	/bin/mkdir -p /var/lib/misc
  	/usr/bin/touch -f /var/lib/misc/PolicyKit.reload
  	/usr/sbin/chown ${USER}:${GROUP} /var/lib/misc/PolicyKit.reload
  	/bin/chmod 0664 /var/lib/misc/PolicyKit.reload
  	for i in ${PKG_PREFIX}/libexec/polkit-read-auth-helper ${PKG_PREFIX}/libexec/polkit-set-default-helper ${PKG_PREFIX}/libexec/polkit-grant-helper ${PKG_PREFIX}/libexec/polkit-grant-helper-pam ${PKG_PREFIX}/libexec/polkit-explicit-grant-helper ${PKG_PREFIX}/libexec/polkit-revoke-helper /var/lib/misc/PolicyKit.reload; do
  	    /usr/bin/chgrp ${GROUP} ${i}
  	done
  	exit 0
  	;;
  esac


script:
  echo "===> Creating users and/or groups."
  if ! /usr/sbin/pw groupshow haldaemon >/dev/null 2>&1; then 
    echo "Creating group 'haldaemon' with gid '560'." 
    /usr/sbin/pw groupadd haldaemon -g 560; else echo "Using existing group 'haldaemon'."
  fi
  if ! /usr/sbin/pw usershow haldaemon >/dev/null 2>&1; then 
    echo "Creating user 'haldaemon' with uid '560'." 
    /usr/sbin/pw useradd haldaemon -u 560 -g 560  -c "HAL Daemon User" -d /nonexistent -s /usr/sbin/nologin 
    else 
  echo "Using existing user 'haldaemon'." 
  fi


script:
  /usr/local/etc/rc.d/hald stop > /dev/null 2>&1 || true
  rm -f /var/lib/PolicyKit/user-haldaemon.auths 2>/dev/null || true
  rm -f /var/run/hald/hald.pid 2>/dev/null || true
  if /usr/sbin/pw usershow haldaemon >/dev/null 2>&1; then  echo "==> You should manually remove the \"haldaemon\" user. "; fi


script:
  #!/bin/sh

  case $2 in
  POST-INSTALL)
  	USER=haldaemon
  	GROUP=${USER}

  	/usr/bin/install -d -o ${USER} -g ${GROUP} /var/run/hald
  	/usr/bin/install -d -o ${USER} -g ${GROUP} /var/cache/hald
  	/usr/bin/install -d -o ${USER} -g ${GROUP} /var/lib/hal
  	/usr/local/bin/polkit-auth --user ${USER} --grant \
  		org.freedesktop.policykit.read

  	for pair in hal.conf:/usr/local/etc/dbus-1/system.d; do
  		file=`echo $pair | cut -f 1 -d :`
  		destdir=`echo $pair | cut -f 2 -d :`

  		if [ ! -f $destdir/$file ]; then
  	    		mkdir -p $destdir
  			cp -p /usr/local/share/hal/dist/$file $destdir/$file
  		fi
  	done
  	exit 0
  	;;
  esac


script:
  #!/bin/sh

  [ "$2" != DEINSTALL ] && exit 0

  USER=haldaemon

  /usr/local/bin/polkit-auth --user ${USER} --revoke \
  	org.freedesktop.policykit.read

  for pair in hal.conf:/usr/local/etc/dbus-1/system.d; do
  	file=`echo $pair | cut -f 1 -d :`
  	destdir=`echo $pair | cut -f 2 -d :`

  	if cmp -s /usr/local/share/hal/dist/$file $destdir/$file; then
  		rm -f $destdir/$file
  	fi
  done


script:
  [ -f /usr/local/etc/avahi/avahi-daemon.conf ] || cp /usr/local/etc/avahi/avahi-daemon.conf.dist /usr/local/etc/avahi/avahi-daemon.conf
  [ -f /usr/local/etc/avahi/hosts ] || cp /usr/local/etc/avahi/hosts.dist /usr/local/etc/avahi/hosts
  /sbin/ldconfig -m /usr/local/lib


script:
  if cmp -s /usr/local/etc/avahi/avahi-daemon.conf /usr/local/etc/avahi/avahi-daemon.conf.dist; then rm -f /usr/local/etc/avahi/avahi-daemon.conf; fi
  if cmp -s /usr/local/etc/avahi/hosts /usr/local/etc/avahi/hosts.dist; then rm -f /usr/local/etc/avahi/hosts; fi
  if /usr/sbin/pw usershow avahi >/dev/null 2>&1; then  echo "==> You should manually remove the \"avahi\" user. "; fi


script:
  echo "===> Creating users and/or groups."
  if ! /usr/sbin/pw groupshow pulse >/dev/null 2>&1; then 
    echo "Creating group 'pulse' with gid '563'." 
    /usr/sbin/pw groupadd pulse -g 563; else echo "Using existing group 'pulse'."
  fi
  if ! /usr/sbin/pw groupshow pulse-access >/dev/null 2>&1; then 
    echo "Creating group 'pulse-access' with gid '564'." 
    /usr/sbin/pw groupadd pulse-access -g 564; else echo "Using existing group 'pulse-access'."
  fi
  if ! /usr/sbin/pw groupshow pulse-rt >/dev/null 2>&1; then 
    echo "Creating group 'pulse-rt' with gid '557'." 
    /usr/sbin/pw groupadd pulse-rt -g 557; else echo "Using existing group 'pulse-rt'."
  fi
  if ! /usr/sbin/pw usershow pulse >/dev/null 2>&1; then 
    echo "Creating user 'pulse' with uid '563'." 
    /usr/sbin/pw useradd pulse -u 563 -g 563  -c "PulseAudio System User" -d /nonexistent -s /usr/sbin/nologin 
    else 
  echo "Using existing user 'pulse'." 
  fi


script:
  case "etc/pulse/client.conf.sample" in
    /*) sample_file="etc/pulse/client.conf.sample" ;;
    *) sample_file="/usr/local/etc/pulse/client.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/pulse/daemon.conf.sample" in
    /*) sample_file="etc/pulse/daemon.conf.sample" ;;
    *) sample_file="/usr/local/etc/pulse/daemon.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/pulse/default.pa.sample" in
    /*) sample_file="etc/pulse/default.pa.sample" ;;
    *) sample_file="/usr/local/etc/pulse/default.pa.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
    case "etc/pulse/system.pa.sample" in
    /*) sample_file="etc/pulse/system.pa.sample" ;;
    *) sample_file="/usr/local/etc/pulse/system.pa.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if ! [ -f "${target_file}" ]; then
      /bin/cp -p "${sample_file}" "${target_file}" && \
        /bin/chmod u+w "${target_file}"
    fi
  /sbin/ldconfig -m /usr/local/lib


script:
  case "etc/pulse/client.conf.sample" in
    /*) sample_file="etc/pulse/client.conf.sample" ;;
    *) sample_file="/usr/local/etc/pulse/client.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/pulse/daemon.conf.sample" in
    /*) sample_file="etc/pulse/daemon.conf.sample" ;;
    *) sample_file="/usr/local/etc/pulse/daemon.conf.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/pulse/default.pa.sample" in
    /*) sample_file="etc/pulse/default.pa.sample" ;;
    *) sample_file="/usr/local/etc/pulse/default.pa.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
    case "etc/pulse/system.pa.sample" in
    /*) sample_file="etc/pulse/system.pa.sample" ;;
    *) sample_file="/usr/local/etc/pulse/system.pa.sample" ;;
    esac
    target_file="${sample_file%.sample}"
    if cmp -s "${target_file}" "${sample_file}"; then
      rm -f "${target_file}"
    else
      echo "You may need to manually remove ${target_file} if it's no longer needed."
    fi
  if /usr/sbin/pw usershow pulse >/dev/null 2>&1; then  echo "==> You should manually remove the \"pulse\" user. "; fi


script:
  if /usr/sbin/pw usershow avahi >/dev/null 2>&1; then  echo "==> You should manually remove the \"avahi\" user. "; fi


script:
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/hicolor 2>/dev/null || /usr/bin/true


script:
  	case "share/icons/hicolor/icon-theme.cache" in
  	/*) f="share/icons/hicolor/icon-theme.cache" ;;
  	 *) f="/usr/local/share/icons/hicolor/icon-theme.cache" ;;
  	esac
  	/bin/rm -f $f 2>/dev/null || /usr/bin/true
  /usr/local/bin/gtk-update-icon-cache -q -f /usr/local/share/icons/hicolor 2>/dev/null || /usr/bin/true


