source: branches/stable/tools/svn2build @ 549

Last change on this file since 549 was 549, checked in by bcornec, 14 years ago

Build process update:
3 phases work:

svn2tar creates the source tar files instantiated from SVN
svn2build creates all the pkg build scripts for all pkgs from SVN
mkqemu will then uses these results to create the real pkgs

creation of a svn-env containing the SVN part of common-env

  • Property svn:executable set to *
File size: 1.9 KB
Line 
1#!/bin/bash
2#
3# Creates build file for packages from SVN repository
4#
5# $Id$
6#
7
8
9umask 022
10dname=`dirname $0`
11prem=`echo $dname |cut -c1`
12if [ ${prem} == "/" ]; then
13        export TOOLHOME=$dname
14else
15        export TOOLHOME=${PWD}/$dname
16fi
17
18cd $TOOLHOME
19. ./common-env
20. ./svn-env
21
22mkdir -p ${TOPDIR}/SPECS
23
24if [ "$1" = "" ]; then
25        c="mondo-doc mindi mondo"
26else
27    if [ "$1" = "all" ]; then
28            c="mindi-kernel mondo-doc mindi mondo"
29    else
30        c=$1
31    fi
32fi
33
34
35cd ${BASE}/svn
36
37for d in `cat $TOOLHOME/DISTROS`; do
38    for p in $c; do
39        v=`cat ${SVNBRANCH}/$p/VERSION`
40        echo "Management of build of $v-$REVISION"
41        rm -fr $p-$v
42        svn export ${SVNBRANCH}/$p $p-$v
43        echo "$REVISION" > $p-$v/REVISION
44        echo "Generating SVN log file ..."
45        svn log -v ${SVNBRANCH}/$p > $p-$v/svn.log
46   
47        if [ _"`echo $p | grep mondo-doc`" != _"" ]; then
48            cd ${p}-${v}
49            $TOOLHOME/expandver mondorescue-howto.sgml *8
50            make -f Makefile.howto
51            if [ $? != 0 ]; then
52                exit -1
53            fi
54            make -f Makefile.man
55            if [ $? != 0 ]; then
56                exit -1
57            fi
58            cd ..
59        fi
60   
61        if [ _"`echo $p | grep -v kernel | grep mindi`" != _"" ]; then
62            v1=`cat ${SVNBRANCH}/mondo-doc/VERSION`
63            if [ ! -d mondo-doc-$v1 ]; then
64                echo "mondo-doc should be created before $p"
65                exit -1
66            fi
67            (cd mondo-doc-$v1 ; make -f Makefile.man install-$p INSTALLDIR=../$p-$v)
68            rm -f $p-$v/rootfs/sbin/parted2fdisk-ia64
69        fi
70        if [ "`echo $p | grep -v doc | grep  mondo`" != "" ]; then
71            v1=`cat ${SVNBRANCH}/mondo-doc/VERSION`
72            if [ ! -d mondo-doc-$v1 ]; then
73                echo "mondo-doc should be created before $p"
74                exit -1
75            fi
76            (cd mondo-doc-$v1 ; make -f Makefile.howto install INSTALLDIR=../$p-$v/docs/en ; make -f Makefile.man install-$p INSTALLDIR=../$p-$v/docs/man)
77            (cd $p-$v ; echo "Bootstraping mondo ... " ; ./bootstrap)
78        fi
79   
80        # Finally creates the tar files
81        echo "Creating $p tar files"
82        tar cfhz ${TOPDIR}/SOURCES/$p-$v-$TAG.tgz $p-$v
83        tar cfhj ${TOPDIR}/SOURCES/$p-$v-$TAG.tar.bz2 $p-$v
84    done
85done
Note: See TracBrowser for help on using the repository browser.