Can now make deb/rpm with Docker
[git-tools-moved-to-github.git] / id-deb-build / in-docker-rpm.sh
1 #!/bin/sh
2 # in-docker-rpm.sh
3
4 set -x
5 DIST=$1
6 STEP=$2
7
8 yum install -y wget yum-utils rpm-build gcc gcc-c++ make
9
10 rpm --import http://ftp.indexdata.com/pub/yum/centos/$STEP/RPM-GPG-KEY-indexdata
11
12 wget http://ftp.indexdata.com/pub/yum/centos/$STEP/indexdata.repo -P /etc/yum.repos.d/
13
14 echo "%_topdir /build/rpmbuild" >$HOME/.rpmmacros
15 echo "%_source_filedigest_algorithm   0" >>$HOME/.rpmmacros
16 echo "%_binary_filedigest_algorithm   0" >>$HOME/.rpmmacros
17
18 yum-builddep -y SPECS/*.spec
19
20 rpmbuild -ba SPECS/*.spec
21
22 RET=$?
23
24 exit $RET
25
26 # Local Variables:
27 # mode:shell-script
28 # sh-indentation: 4
29 # sh-basic-offset: 4
30 # End:
31