Last change
on this file since 974 was 921, checked in by Bruno Cornec, 18 years ago |
Attempt to deliver Mandriva official 2.2.0 packages from build system
|
-
Property svn:executable
set to
*
|
File size:
1.7 KB
|
Rev | Line | |
---|
[594] | 1 | #!/bin/bash
|
---|
| 2 | #
|
---|
| 3 | # Deliver packages and tgz files to Mandriva
|
---|
| 4 | #
|
---|
| 5 | # $Id$
|
---|
| 6 | #
|
---|
| 7 |
|
---|
[757] | 8 | (
|
---|
[594] | 9 | dname=`dirname $0`
|
---|
| 10 | prem=`echo $dname |cut -c1`
|
---|
| 11 | if [ ${prem} == "/" ]; then
|
---|
| 12 | export TOOLHOME=$dname
|
---|
| 13 | else
|
---|
| 14 | export TOOLHOME=${PWD}/$dname
|
---|
| 15 | fi
|
---|
| 16 |
|
---|
| 17 | . $TOOLHOME/common-env
|
---|
| 18 | . $TOOLHOME/distro-env
|
---|
| 19 | . $TOOLHOME/mdv-env
|
---|
| 20 |
|
---|
| 21 | # We need to get $VER and $TAG
|
---|
| 22 | if [ "$1" = "" ]; then
|
---|
| 23 | LAST=`cat ${TOPDIR}/LAST`
|
---|
| 24 | else
|
---|
| 25 | LAST=$1
|
---|
| 26 | shift
|
---|
| 27 | fi
|
---|
| 28 | VER=`echo $LAST | cut -d- -f1`
|
---|
| 29 | TAG=`echo $LAST | cut -d- -f2`
|
---|
| 30 | echo "Working on ${VER}-$TAG"
|
---|
| 31 |
|
---|
| 32 | if [ "$1" = "" ]; then
|
---|
[825] | 33 | c="mondo-doc mindi mindi-busybox mondo"
|
---|
[594] | 34 | else
|
---|
| 35 | if [ "$1" = "all" ]; then
|
---|
[825] | 36 | c="mindi-kernel mondo-doc mindi mindi-busybox mondo"
|
---|
[594] | 37 | else
|
---|
| 38 | c=$1
|
---|
| 39 | fi
|
---|
| 40 | fi
|
---|
| 41 |
|
---|
| 42 |
|
---|
| 43 | for p in $c; do
|
---|
[921] | 44 | src=${TOPDIR}/${VER}-$TAG/$p-[1-9]*.tar.bz2
|
---|
| 45 | distro=`ls -d ${TOPDIR}/${VER}-$TAG/$p-[1-9]*/distributions/mandriva-* | tail -1`
|
---|
| 46 | spec=${distro}/$p.spec
|
---|
| 47 | echo "Updating Mandriva package in $SVNMDV/$p"
|
---|
| 48 | mkdir -p $SVNMDV/$p/SOURCES $SVNMDV/$p/SPECS
|
---|
| 49 | rm -f $SVNMDV/$p/SOURCES/$p-*.tar.bz2 $SVNMDV/$p/SPECS/$p.spec
|
---|
| 50 | cp -a $src $SVNMDV/$p/SOURCES
|
---|
| 51 | cp -a $spec $SVNMDV/$p/SPECS
|
---|
| 52 | # Use mkrel for mdv
|
---|
| 53 | perl -pi -e "s/^Release:[ \t]+..*/Release: %mkrel $TAG/" $SVNMDV/$p/SPECS/$p.spec
|
---|
| 54 | perl -pi -e 's/ Bruno Cornec <bruno@mondorescue.org>..*/ Bruno Cornec <bcornec@mandriva.org> %{version}-%{release}/' $SVNMDV/$p/SPECS/$p.spec
|
---|
| 55 | # Changelog management
|
---|
| 56 | echo "Committing from $SVNMDV/$p into Mandriva's SVN"
|
---|
| 57 | cd $SVNMDV/$p
|
---|
| 58 | bm
|
---|
| 59 | if [ $? -eq 0 ]; then
|
---|
| 60 | rm -rf BUILD RPMS SRPMS
|
---|
| 61 | #svn ci
|
---|
| 62 | fi
|
---|
[594] | 63 | done
|
---|
| 64 |
|
---|
[921] | 65 | #ssh chroot\${d} "for p in $aspkg; do rpm -ivh \`basename \$p\` ; rpmbuild -ba rpm/SPECS/\$s | tee -a /tmp/mondorescue.log ; done ; sudo ftp\${d}contrib \`egrep '^Wrote:' /tmp/mondorescue.log | grep -v debug | cut -d: -f2\`"
|
---|
[757] | 66 | ) 2>&1 | tee /tmp/pk2mdv.log
|
---|
Note:
See
TracBrowser
for help on using the repository browser.