root/packaging/centuryegg/build-xorg-x11-util-macros-rpm

Revision 12636, 1.7 KB (checked in by build, 13 months ago)

New installs needed on Centos 4 for Python 2.6

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:mime-type set to text/plain
Line 
1#!/bin/bash
2XORGMACROS_VERSION=1.0.2-4
3XORGMACROS_MAJOR_VERSION=$(echo $XORGMACROS_VERSION | cut -d "-" -f 1)
4mkdir -p logs rpms srpms
5rpm_arch=`rpmbuild -E %{_arch} 2>/dev/null`
6if [ -f rpms/xorg-x11-util-macros-$XORGMACROS_VERSION.${rpm_arch}.rpm ]
7then
8    echo "Not building xorg-x11-util-macros as rpms/xorg-x11-util-macros-$XORGMACROS_VERSION.${rpm_arch}.rpm already exists"
9    exit
10fi
11if [ -f /etc/fedora-release ]
12then
13        sudo yum -y install rpmdevtools || exit
14        SETUPTREE=rpmdev-setuptree
15elif [ -f /etc/redhat-release ]
16then
17        sudo yum -y install fedora-rpmdevtools || exit
18        SETUPTREE=fedora-buildrpmtree
19        REDHAT_VERSION=`cat /etc/redhat-release | cut -d " " -f 3 | cut -d "." -f 1`
20fi
21$SETUPTREE || exit
22(
23cd srpms
24wget -c http://mirror.centos.org/centos/5/os/SRPMS/xorg-x11-util-macros-$XORGMACROS_VERSION.fc6.src.rpm
25rpm -ivh --nomd5 xorg-x11-util-macros-$XORGMACROS_MAJOR_VERSION*.src.rpm
26)
27# add to changelog
28src_rpm=`rpmbuild -bs --nodeps $HOME/rpmbuild/SPECS/xorg-x11-util-macros.spec | sed 's/^Wrote: //'`
29sudo cp -pv /etc/yum.conf{,.builddep.orig}
30sudo python -c "import ConfigParser ; cp = ConfigParser.RawConfigParser() ; cp.read('/etc/yum.conf') ; cp.set('main', 'assumeyes', '1') ; cp.write(open('/etc/yum.conf', 'w'))"
31sudo yum-builddep $src_rpm || finished=1
32sudo cp -pv /etc/yum.conf{.builddep.orig,}
33rm $src_rpm
34[[ "$finished" == 1 ]] && exit
35QA_RPATHS=0x0001 rpmbuild  -ba ~/rpmbuild/SPECS/xorg-x11-util-macros.spec >logs/build-xorg-x11-util-macros.log 2>&1
36result=$?
37tail logs/build-xorg-x11-util-macros.log
38cp -pv ~/rpmbuild/RPMS/noarch/xorg-x11-util-macros-*$XORGMACROS_MAJOR_VERSION*.rpm rpms/
39cp -pv ~/rpmbuild/SRPMS/xorg-x11-util-macros-$XORGMACROS_MAJOR_VERSION*.rpm rpms/
Note: See TracBrowser for help on using the browser.