apcupsd rpm rebuild on CentOS-5

Apcupsd is a daemon for controlling APC UPSes. It can be used for power mangement and controlling most of APC's UPS models on Unix and Windows machines. Apcupsd works with most of APC's Smart-UPS models as well as most simple signalling models such a Back-UPS, and BackUPS-Office. During a power failure, apcupsd will inform the users about the power failure and that a shutdown may occur. If power is not restored, a system shutdown will follow when the battery is exhausted, a timeout (seconds) expires, or runtime expires based on internal APC calculations determined by power consumption rates.

I kept getting failure when rebuilding from source rpm and was able to resolve once the package latex2html was installed. Although, it did not come up with any dependency failure when trying to build the package.

The required packages I had to install were: gd-devel, tetex, tetex-latex, glibc-devel, ghostscript, latex2html.