This document is based on The previous bacula rhel wiki howtos. To create the RPM packages of Bacula 5.0.3 on RHEL 6.0, or Scientific Linux 6.0, perform this steps:
yum install autoconf automake e2fsprogs-devel gcc-c++ glibc-devel glibc-headers krb5-devel libacl-devel libgomp libstdc++-devel libtermcap-devel libxml2-devel m4 make mysql mysql-devel mysql-server ncurses ncurses-devel openssl-devel perl-DBI php readline-devel redhat-rpm-config rpm-build screen zlib-devel
cd rpm -i bacula-5.0.3-1.src.rpm mkdir rpm_build nano ~/.rpmmacros
%_topdir %(echo ${HOME}/rpm_build) %_tmppath %{_topdir}/tmp
# check what distribution we are %if %{rhat} || %{rhel} %define _dist %(cat /etc/redhat-release)
rpmbuild -ba ~/rpm_build/SPECS/bacula.spec --define "build_mysql 1" --define "build_bat 0" --define "build_rhel5 1"