Changeset 553 in MondoRescue for branches/stable/tools/svn2build
- Timestamp:
- May 18, 2006, 12:40:32 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/tools/svn2build
r551 r553 19 19 . ./svn-env 20 20 21 mkdir -p ${TOPDIR}/SOURCES 21 DEST=${TOPDIR}/${VER}-$TAG 22 mkdir -p $DEST 22 23 23 24 if [ "$1" = "" ]; then … … 31 32 fi 32 33 33 34 # Make it safe for SVN commands 34 35 cd ${BASE}/svn 35 36 … … 37 38 v=`cat ${SVNBRANCH}/$p/VERSION` 38 39 echo "Management of $p $v-$REVISION" 39 rm -fr $p-$v 40 svn export ${SVNBRANCH}/$p $p-$v 41 echo "$REVISION" > $p-$v/REVISION 40 dest="$p-$v-$TAG" 41 rm -fr $dest 42 svn export ${SVNBRANCH}/$p $dest 43 echo "$REVISION" > $dest/REVISION 42 44 echo "Generating SVN log file ..." 43 svn log -v ${SVNBRANCH}/$p > $ p-$v/svn.log45 svn log -v ${SVNBRANCH}/$p > $dest/svn.log 44 46 45 47 for d in `cat ${TOOLHOME}/DISTROS`; do 46 ddir=`echo $d | cut -d_ -f1`47 dver=`echo $d | cut -d_ -f2`48 export ddir=`echo $d | cut -d_ -f1` 49 export dver=`echo $d | cut -d_ -f2` 48 50 echo "Generating build files for $ddir ($dver)" 49 if [ $ddir = "debian" ]; then 50 dfam="debian" 51 dtype="deb" 52 suf=".${dfam}${dver}" 53 BUILDDIR=${TOPDIR}/debian 54 elif [ $ddir = "gentoo" ]; then 55 dfam="gentoo" 56 dtype="ebuild" 57 suf=".${ddir}${dver}" 58 BUILDDIR=${TOPDIR}/ebuild 59 elif [ $ddir = "slackware" ]; then 60 dfam="slack" 61 dtype="tgz" 62 suf=".${dfam}${dver}" 63 BUILDDIR=${TOPDIR}/slack 64 elif [ $ddir = "sles" -o $ddir = "suse" ]; then 65 dfam="suse" 66 dtype="rpm" 67 suf=".${ddir}${dver}" 68 BUILDDIR=${TOPDIR}/SPECS 69 elif [ $ddir = "fedora" -o $ddir = "redhat" -o $ddir = "rhel" ]; then 70 dfam="redhat" 71 dtype="rpm" 72 dver=`echo ${dver} | sed "s/\.//"` 73 if [ $ddir = "fedora" ]; then 74 suf=".fc${dver}" 75 elif [ $ddir = "redhat" ]; then 76 suf=".rh${dver}" 77 else 78 suf=".rhel${dver}" 79 fi 80 BUILDDIR=${TOPDIR}/SPECS 81 elif [ $ddir = "mandrake" -o $ddir = "mandriva" ]; then 82 dfam="mandriva" 83 dtype="rpm" 84 suf=".`echo $dver | sed 's/\.//'`mdk" 85 BUILDDIR=${TOPDIR}/SPECS 86 else 87 dfam="unknown" 88 dtype="unknown" 89 BUILDDIR=${TOPDIR}/SPECS 90 suf="unknown" 91 fi 51 . $TOOLHOME/distro-env 92 52 93 53 # Create conf file dir … … 101 61 EOF 102 62 103 mkdir -p $ p-$v/distributions/$ddir104 if [ $dtype= "rpm" ]; then105 if [ -f $ p-$v/distributions/$ddir/spec.m4 ]; then106 inc=$ p-$v/distributions/$ddir/spec.m4107 elif [ -f $ p-$v/distributions/$dfam/spec.m4 ]; then108 inc=$ p-$v/distributions/$dfam/spec.m463 mkdir -p $dest/distributions/$ddir 64 if [ "$dtype" = "rpm" ]; then 65 if [ -f $dest/distributions/$ddir/spec.m4 ]; then 66 inc=$dest/distributions/$ddir/spec.m4 67 elif [ -f $dest/distributions/$dfam/spec.m4 ]; then 68 inc=$dest/distributions/$dfam/spec.m4 109 69 else 110 70 echo "Unable to build the RPM specfile for this distro. Please report to authors" … … 112 72 fi 113 73 echo "Using $inc customization to build SPEC file" 114 m4 /tmp/mondorescue.mc $inc $ p-$v/distributions/rpm/$p.spec > $p-$v/distributions/$ddir/$p.spec74 m4 /tmp/mondorescue.mc $inc $dest/distributions/rpm/$p.spec > $dest/distributions/$ddir/$p.spec 115 75 116 if [ -f $ p-$v/distributions/$ddir/changelog ]; then117 log=$ p-$v/distributions/$ddir/changelog118 elif [ -f $ p-$v/distributions/$dfam/changelog ]; then119 log=$ p-$v/distributions/$dfam/changelog76 if [ -f $dest/distributions/$ddir/changelog ]; then 77 log=$dest/distributions/$ddir/changelog 78 elif [ -f $dest/distributions/$dfam/changelog ]; then 79 log=$dest/distributions/$dfam/changelog 120 80 else 121 81 echo "Unable to build RPM changelog for this distro. Please report to authors" … … 125 85 echo "Using $log customization to build changelog file" 126 86 ddate=`LANG=C ; date "+%a %b %d %Y"` 127 cat > $ p-$v/distributions/$ddir/$p.changelog.new << EOF87 cat > $dest/distributions/$ddir/$p.changelog.new << EOF 128 88 * $ddate Bruno Cornec <bruno@mondorescue.org> VVV-RRR 129 89 - Updated to VVV-r${REVISION} 130 90 131 91 EOF 132 cat $log >> $ p-$v/distributions/$ddir/$p.changelog.new133 m4 /tmp/mondorescue.mc $ p-$v/distributions/$ddir/$p.changelog.new > $p-$v/distributions/$ddir/$p.changelog134 rm -f $ p-$v/distributions/$ddir/$p.changelog.new92 cat $log >> $dest/distributions/$ddir/$p.changelog.new 93 m4 /tmp/mondorescue.mc $dest/distributions/$ddir/$p.changelog.new > $dest/distributions/$ddir/$p.changelog 94 rm -f $dest/distributions/$ddir/$p.changelog.new 135 95 136 elif [ $dtype= "ebuild" ]; then96 elif [ "$dtype" = "ebuild" ]; then 137 97 echo "Gentoo Build" 138 98 else … … 142 102 143 103 if [ _"`echo $p | grep mondo-doc`" != _"" ]; then 144 cd $ {p}-${v}104 cd $dest 145 105 for f in mondorescue-howto.sgml *8; do 146 106 m4 /tmp/mondorescue.mc $f > ${f}.new … … 164 124 exit -1 165 125 fi 166 (cd mondo-doc-$v1 ; make -f Makefile.man install-$p INSTALLDIR=../$ p-$v)167 rm -f $ p-$v/rootfs/sbin/parted2fdisk-ia64126 (cd mondo-doc-$v1 ; make -f Makefile.man install-$p INSTALLDIR=../$dest) 127 rm -f $dest/rootfs/sbin/parted2fdisk-ia64 168 128 fi 169 129 if [ "`echo $p | grep -v doc | grep mondo`" != "" ]; then … … 173 133 exit -1 174 134 fi 175 (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)176 (cd $ p-$v; echo "Bootstraping mondo ... " ; ./bootstrap)135 (cd mondo-doc-$v1 ; make -f Makefile.howto install INSTALLDIR=../$dest/docs/en ; make -f Makefile.man install-$p INSTALLDIR=../$dest/docs/man) 136 (cd $dest ; echo "Bootstraping mondo ... " ; ./bootstrap) 177 137 fi 178 138 179 139 # Finally creates the tar files 180 140 echo "Creating $p tar files" 181 tar cfhz ${ TOPDIR}/SOURCES/$p-$v-$TAG.tar.gz $p-$v182 gzip -cd ${TOPDIR}/SOURCES/$p-$v-$TAG.tar.gz | bzip2 -c3 > ${TOPDIR}/SOURCES/$p-$v-$TAG.tar.bz2183 #tar cfhj ${ TOPDIR}/SOURCES/$p-$v-$TAG.tar.bz2 $p-$v141 tar cfhz ${DEST}/$p-$v-$TAG.tar.gz $dest 142 #gzip -cd ${DEST}/$p-$v-$TAG.tar.gz | bzip2 -c3 > ${DEST}/$p-$v-$TAG.tar.bz2 143 #tar cfhj ${DEST}/$p-$v-$TAG.tar.bz2 $dest 184 144 done 185 145 186 146 rm -f /tmp/mondorescue.mc 147 148 echo "Version delivered :" 149 echo "-------------------" 150 echo "${VER}-$TAG" 151 echo "-------------------" 152 echo "${VER}-$TAG" > ${TOPDIR}/LAST 153 exit 0
Note:
See TracChangeset
for help on using the changeset viewer.