+if test ! -f /etc/redhat-release; then
+ echo "/etc/redhat-release missing"
+ exit 1
+fi
+if test -z "$DISTRO"; then
+ if grep 'release 6' /etc/redhat-release >/dev/null; then
+ DISTRO="centos/6"
+ else
+ DISTRO="centos/5.5"
+ fi
+fi
+topdir=`rpm --eval "%{_topdir}"`
+BUILD_DIR=${BUILD_DIR:=${topdir}}
+pkg_names=`rpm -q --specfile ${specfile} --queryformat "%{NAME}-%{VERSION}-%{RELEASE}\n"`