comparison contrib/buildrpm @ 23141:a440166d03fc

contrib: buildrpm checking of md5 checksums of downloaded Python and Docutils
author Mads Kiilerich <madski@unity3d.com>
date Sat, 18 Oct 2014 21:48:38 +0200
parents 9e2e4fc524fd
children 33471119267b
comparison
equal deleted inserted replaced
23140:fbd79c2552a6 23141:a440166d03fc
16 BUILD= 16 BUILD=
17 ;; 17 ;;
18 --withpython | --with-python) 18 --withpython | --with-python)
19 shift 19 shift
20 PYTHONVER=2.7.8 20 PYTHONVER=2.7.8
21 PYTHONMD5=d4bca0159acb0b44a781292b5231936f
21 ;; 22 ;;
22 --rpmbuilddir ) 23 --rpmbuilddir )
23 shift 24 shift
24 RPMBUILDDIR="$1" 25 RPMBUILDDIR="$1"
25 shift 26 shift
74 if [ "$PYTHONVER" ]; then 75 if [ "$PYTHONVER" ]; then
75 ( 76 (
76 cd build 77 cd build
77 PYTHON_SRCFILE=Python-$PYTHONVER.tgz 78 PYTHON_SRCFILE=Python-$PYTHONVER.tgz
78 [ -f $PYTHON_SRCFILE ] || curl -Lo $PYTHON_SRCFILE http://www.python.org/ftp/python/$PYTHONVER/$PYTHON_SRCFILE 79 [ -f $PYTHON_SRCFILE ] || curl -Lo $PYTHON_SRCFILE http://www.python.org/ftp/python/$PYTHONVER/$PYTHON_SRCFILE
80 if [ "$PYTHONMD5" ]; then
81 echo "$PYTHONMD5 $PYTHON_SRCFILE" | md5sum -w -c
82 fi
79 ln -f $PYTHON_SRCFILE $RPMBUILDDIR/SOURCES/$PYTHON_SRCFILE 83 ln -f $PYTHON_SRCFILE $RPMBUILDDIR/SOURCES/$PYTHON_SRCFILE
80 84
81 DOCUTILSVER=`sed -ne "s/^%global docutilsname docutils-//p" $specfile` 85 DOCUTILSVER=`sed -ne "s/^%global docutilsname docutils-//p" $specfile`
82 DOCUTILS_SRCFILE=docutils-$DOCUTILSVER.tar.gz 86 DOCUTILS_SRCFILE=docutils-$DOCUTILSVER.tar.gz
83 [ -f $DOCUTILS_SRCFILE ] || curl -Lo $DOCUTILS_SRCFILE http://downloads.sourceforge.net/project/docutils/docutils/$DOCUTILSVER/$DOCUTILS_SRCFILE 87 [ -f $DOCUTILS_SRCFILE ] || curl -Lo $DOCUTILS_SRCFILE http://downloads.sourceforge.net/project/docutils/docutils/$DOCUTILSVER/$DOCUTILS_SRCFILE
88 DOCUTILSMD5=`sed -ne "s/^%global docutilsmd5 //p" $specfile`
89 if [ "$DOCUTILSMD5" ]; then
90 echo "$DOCUTILSMD5 $DOCUTILS_SRCFILE" | md5sum -w -c
91 fi
84 ln -f $DOCUTILS_SRCFILE $RPMBUILDDIR/SOURCES/$DOCUTILS_SRCFILE 92 ln -f $DOCUTILS_SRCFILE $RPMBUILDDIR/SOURCES/$DOCUTILS_SRCFILE
85 ) 93 )
86 fi 94 fi
87 95
88 rpmspec=$RPMBUILDDIR/SPECS/mercurial.spec 96 rpmspec=$RPMBUILDDIR/SPECS/mercurial.spec