Changeset 12485 for packaging/centuryegg
- Timestamp:
- 11/12/10 01:08:49 (18 months ago)
- Files:
-
- 1 modified
-
packaging/centuryegg/build-python-rpm (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
packaging/centuryegg/build-python-rpm
r12479 r12485 11 11 fi 12 12 mkdir -p logs rpms srpms 13 rpm_arch=`rpmbuild -E %{_arch} 2>/dev/null` 13 14 if [ $(ls rpms/python$PYTHON_SUFFIX-$PYTHON_VERSION*.rpm | wc -l) -gt 0 ] 14 15 then … … 30 31 then 31 32 cd rpms 32 wget -c ftp://mirror.switch.ch/pool/1/mirror/epel/5/ i386/fakeroot-libs-1.12.2-21.el5.i386.rpm33 wget -c ftp://mirror.switch.ch/pool/1/mirror/epel/5/ i386/fakeroot-1.12.2-21.el5.i386.rpm34 wget -c ftp://mirror.switch.ch/pool/1/mirror/epel/5/ i386/rpmdevtools-6.8-1.el5.noarch.rpm33 wget -c ftp://mirror.switch.ch/pool/1/mirror/epel/5/${rpm_arch}/fakeroot-libs-1.12.2-21.el5.2.${rpm_arch}.rpm 34 wget -c ftp://mirror.switch.ch/pool/1/mirror/epel/5/${rpm_arch}/fakeroot-1.12.2-21.el5.2.${rpm_arch}.rpm 35 wget -c ftp://mirror.switch.ch/pool/1/mirror/epel/5/${rpm_arch}/rpmdevtools-6.8-1.el5.noarch.rpm 35 36 if [ "x`rpm -qa redhat-rpm-config`" == "x" ] 36 37 then … … 43 44 if [ "x`rpm -qa rpmdevtools`" == "x" ] 44 45 then 45 sudo rpm -Uvh fakeroot-{,libs-}1.12.2-21.el5. i386.rpm rpmdevtools-6.8-1.el5.noarch.rpm || exit 146 sudo rpm -Uvh fakeroot-{,libs-}1.12.2-21.el5.${rpm_arch}.rpm rpmdevtools-6.8-1.el5.noarch.rpm || exit 1 46 47 fi 47 48 cd .. … … 72 73 ) 73 74 fi 75 LIBFFI_VERSION=`yum info libffi | grep Version | head -n 1 | sed -e "s/[ \t]\+/ /g" | cut -d ":" -f 2 | cut -d " " -f 2 | sort | tail -n 1` 76 if [ "x$LIBFFI_VERSION" == "x" ] 77 then 78 ( 79 echo Building LibFFI... 80 ./build-libffi-rpm 81 ./install-libffi-rpm 82 ) 83 elif [ "x`rpm -q libffi-devel`" == "x" ] 84 then 85 sudo yum install libffi-devel 86 fi 87 AUTOCONF_VERSION=`yum info autoconf | grep Version | head -n 1 | sed -e "s/[ \t]\+/ /g" | cut -d ":" -f 2 | cut -d " " -f 2 | sort | tail -n 1` 88 if [ "`echo $AUTOCONF_VERSION | cut -d "." -f 1`" == "2" ] && [ `echo $AUTOCONF_VERSION | cut -d "." -f 2` -lt "31" ] 89 then 90 ( 91 echo Building Autoconf 2.31... 92 ./build-autoconf-rpm 93 ./install-autoconf-rpm 94 ) 95 fi 74 96 ( 75 97 cd srpms 76 98 wget -c $PYTHON_SRPM_URL 77 rpm -ivh python-$PYTHON_VERSION*.src.rpm99 rpm -ivh --nomd5 python-$PYTHON_VERSION*.src.rpm 78 100 ) 79 101 DB_VERSION=`yum info db4-devel | grep Version | head -n 1 | sed -e "s/[ \t]\+/ /g" | cut -d ":" -f 2 | cut -d " " -f 2 | sed -e "s/\([0-9]\+\.[0-9]\+\)\..*/\1/"` … … 89 111 fi 90 112 fi 113 # We've made sure libffi-devel is installed, and yum-builddep doesn't detect it 114 sed -ie "/libffi-devel/ s/^/#/" $HOME/rpmbuild/SPECS/python.spec 91 115 # add to changelog 92 116 src_rpm=`rpmbuild -bs --nodeps $HOME/rpmbuild/SPECS/python.spec | sed 's/^Wrote: //'` 93 rpm_arch=`rpmbuild -E %{_arch} 2>/dev/null`94 117 sudo cp -pv /etc/yum.conf{,.builddep.orig} 95 118 sudo python -c "import ConfigParser ; cp = ConfigParser.RawConfigParser() ; cp.read('/etc/yum.conf') ; cp.set('main', 'assumeyes', '1') ; cp.write(open('/etc/yum.conf', 'w'))" … … 97 120 sudo cp -pv /etc/yum.conf{.builddep.orig,} 98 121 rm $src_rpm 99 [[ "$finished" == 1 ]] && exit 122 [[ "$finished" == 1 ]] && exit 1 100 123 # for fedora 6 101 124 # QA_RPATHS to prevent /usr/lib64... sqlite error
