#!/bin/sh
# NOTE: Only install this package if necessary

# zic is required to update TZ information
for zone in `find /tmp/tzdata/timezones/ -type f`; do
  if test -r "${zone}"; then
     zic "${zone}"
  fi
done

if test -r /tmp/tzdata/backward ; then
  zic /tmp/tzdata/backward
fi

/usr/sbin/dpkg-reconfigure -f noninteractive tzdata

# update our version file
install -m 0644 -o root -g root -D "$ROOTSRC/tmp/tzdata/version" "$ROOTDST/usr/share/zoneinfo/.version"

exit 0
