# in-docker-rpm.sh
set -x
-DIST=$1
-STEP=$2
-
-yum install -y wget yum-utils rpm-build gcc gcc-c++ make
-
-rpm --import http://ftp.indexdata.com/pub/yum/centos/$STEP/RPM-GPG-KEY-indexdata
-
-wget http://ftp.indexdata.com/pub/yum/centos/$STEP/indexdata.repo -P /etc/yum.repos.d/
echo "%_topdir /build/rpmbuild" >$HOME/.rpmmacros
echo "%_source_filedigest_algorithm 0" >>$HOME/.rpmmacros
echo "%_binary_filedigest_algorithm 0" >>$HOME/.rpmmacros
-yum-builddep -y SPECS/*.spec
+# rpmbuild wants a user
+groupadd -g 1000 bob
+useradd -u 1000 -g bob bob
+
+rpmbuild -bs --nodeps SPECS/*.spec
+
+yum-builddep -y SRPMS/*.src.rpm
-rpmbuild -ba SPECS/*.spec
+rpmbuild -bb SPECS/*.spec
RET=$?