source: branches/stable/tools/svn2tar @ 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 *
  • Property svn:keywords set to Id
File size: 1.9 KB
Line 
1#!/bin/bash
2#
3# Prepare source packages from SVN repository as a tar file
4# Also prepare the documentation which is common as a separate tar files
5#
6# $Id: svn2tar 549 2006-05-13 23:42:49Z bcornec $
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}/SOURCES
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 p in $c; do
38    v=`cat ${SVNBRANCH}/$p/VERSION`
39    echo "Management of $p $v-$REVISION"
40    rm -fr $p-$v
41    svn export ${SVNBRANCH}/$p $p-$v
42    echo "$REVISION" > $p-$v/REVISION
43    echo "Generating SVN log file ..."
44    svn log -v ${SVNBRANCH}/$p > $p-$v/svn.log
45
46    if [ _"`echo $p | grep mondo-doc`" != _"" ]; then
47        cd ${p}-${v}
48        $TOOLHOME/expandver mondorescue-howto.sgml *8
49        make -f Makefile.howto
50        if [ $? != 0 ]; then
51            exit -1
52        fi
53        make -f Makefile.man
54        if [ $? != 0 ]; then
55            exit -1
56        fi
57        cd ..
58    fi
59
60    if [ _"`echo $p | grep -v kernel | grep mindi`" != _"" ]; then
61        v1=`cat ${SVNBRANCH}/mondo-doc/VERSION`
62        if [ ! -d mondo-doc-$v1 ]; then
63            echo "mondo-doc should be created before $p"
64            exit -1
65        fi
66        (cd mondo-doc-$v1 ; make -f Makefile.man install-$p INSTALLDIR=../$p-$v)
67        rm -f $p-$v/rootfs/sbin/parted2fdisk-ia64
68    fi
69    if [ "`echo $p | grep -v doc | grep  mondo`" != "" ]; then
70        v1=`cat ${SVNBRANCH}/mondo-doc/VERSION`
71        if [ ! -d mondo-doc-$v1 ]; then
72            echo "mondo-doc should be created before $p"
73            exit -1
74        fi
75        (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)
76        (cd $p-$v ; echo "Bootstraping mondo ... " ; ./bootstrap)
77    fi
78
79    # Finally creates the tar files
80    echo "Creating $p tar files"
81    tar cfhz ${TOPDIR}/SOURCES/$p-$v-$TAG.tgz $p-$v
82    tar cfhj ${TOPDIR}/SOURCES/$p-$v-$TAG.tar.bz2 $p-$v
83done
Note: See TracBrowser for help on using the repository browser.