abinfo "Setting lock file path in /etc/apcupsd/apcupsd.conf ..."
sed -e 's#^LOCKFILE .*$#LOCKFILE /var/run/apcupsd#' \
    -i "$PKGDIR"/etc/apcupsd/apcupsd.conf

abinfo "Setting executable bit for /usr/bin/* ..."
chmod -v 755 "$PKGDIR"/usr/bin/*

abinfo "Installing .cgi files to /usr/libexec/cgi-bin ..."
install -dvm755 "$PKGDIR"/usr/libexec/cgi-bin
mv -v "$PKGDIR"/etc/apcupsd/*.cgi \
    "$PKGDIR"/usr/libexec/cgi-bin

abinfo "Dropping /usr/share/hal ..."
rm -rfv "$PKGDIR"/usr/share/hal
