Changeset 5 in ProjectBuilder for devel/pb/bin/cms2build.pl
- Timestamp:
- Jul 29, 2007, 12:50:34 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb/bin/cms2build.pl
r4 r5 8 8 use strict; 9 9 use common.pm; 10 use p roj.pm;10 use pb.pm; 11 11 use cms.pm; 12 12 13 set_env();14 15 VER=`cat ${TOOLHOME}/VERSION`16 TAG=`cat ${TOOLHOME}/TAG`17 my $DEST=$ENV{'TOPDIR'}."/".$VER."-".$TAG18 13 TEST="false" 19 14 OPT="" … … 37 32 38 33 # Make it safe for CMS commands 39 cd ${ TOOLHOME}/..34 cd ${PBROOT}/.. 40 35 41 36 for pkg in $c; do 42 37 p=$PKGDIR[ 43 v=`cat ${ TOOLHOME}/../$p/VERSION`44 tag=`cat ${ TOOLHOME}/../$p/TAG`38 v=`cat ${PBROOT}/../$p/VERSION` 39 tag=`cat ${PBROOT}/../$p/TAG` 45 40 echo "Management of $p $v-$tag (rev $REVISION)" 46 41 dest="$DEST/$p-$v" 47 42 rm -fr $dest 48 $CMSEXP $OPT ${ TOOLHOME}/../$p $dest43 $CMSEXP $OPT ${PBROOT}/../$p $dest 49 44 echo "$REVISION" > $dest/REVISION 50 45 echo "Generating SVN log file ..." 51 $SVNLOG $OPT -v ${ TOOLHOME}/../$p > $dest/history.log46 $SVNLOG $OPT -v ${PBROOT}/../$p > $dest/history.log 52 47 53 for d in `cat ${ TOOLHOME}/DISTROS`; do48 for d in `cat ${PBROOT}/DISTROS`; do 54 49 export ddir=`echo $d | cut -d_ -f1` 55 50 export dver=`echo $d | cut -d_ -f2` 56 51 echo "Generating build files for $ddir ($dver)" 57 . $ TOOLHOME/distro-env52 . $PBROOT/distro-env 58 53 59 54 ddd=`LANG=C ; date '+%Y-%m-%d'` 60 cat > $P ROJTMP/mondorescue.mc << EOF55 cat > $PBTMP/mondorescue.mc << EOF 61 56 define(\`TTT', ${tag})dnl 62 57 define(\`RRR', ${tag}${suf})dnl … … 77 72 78 73 if [ $ddir = "fedora" ]; then 79 $ TOOLHOME/mkchangelog.pl fc $p $PROJTMP/$p-fc.spec80 m4 $P ROJTMP/mondorescue.mc $inc $dest/distributions/rpm/$p.spec $MONDOTMP/$p-fc.spec > $dest/distributions/${ddir}-$dver/$p-fc.spec74 $PBROOT/mkchangelog.pl fc $p $PBTMP/$p-fc.spec 75 m4 $PBTMP/mondorescue.mc $inc $dest/distributions/rpm/$p.spec $MONDOTMP/$p-fc.spec > $dest/distributions/${ddir}-$dver/$p-fc.spec 81 76 fi 82 $ TOOLHOME/mkchangelog.pl $dtype $p $PROJTMP/$p.spec77 $PBROOT/mkchangelog.pl $dtype $p $PBTMP/$p.spec 83 78 if [ $? -ne 0 ]; then 84 79 echo "Unable to create changelog for ${ddir}-$dver/$p.spec" 85 80 exit -1 86 81 fi 87 m4 $P ROJTMP/mondorescue.mc $inc $dest/distributions/rpm/$p.spec $MONDOTMP/$p.spec > $dest/distributions/${ddir}-$dver/$p.spec82 m4 $PBTMP/mondorescue.mc $inc $dest/distributions/rpm/$p.spec $MONDOTMP/$p.spec > $dest/distributions/${ddir}-$dver/$p.spec 88 83 if [ _"`/bin/arch`" = _"x86_64" ] && [ $ddir = "rhel" ]; then 89 84 # Bug on x86_64 on _sysconfdir on rhel4 at least … … 91 86 fi 92 87 93 rm -f $P ROJTMP/$p.spec88 rm -f $PBTMP/$p.spec 94 89 elif [ "$dtype" = "ebuild" ]; then 95 m4 $P ROJTMP/mondorescue.mc $dest/distributions/$dfam/$p.ebuild > $dest/distributions/${ddir}-$dver/$p-$v.ebuild90 m4 $PBTMP/mondorescue.mc $dest/distributions/$dfam/$p.ebuild > $dest/distributions/${ddir}-$dver/$p-$v.ebuild 96 91 elif [ "$dtype" = "tgz" ]; then 97 m4 $P ROJTMP/mondorescue.mc $dest/distributions/$dfam/slack-desc > $dest/distributions/${ddir}-$dver/slack-desc92 m4 $PBTMP/mondorescue.mc $dest/distributions/$dfam/slack-desc > $dest/distributions/${ddir}-$dver/slack-desc 98 93 elif [ "$dtype" = "port" ]; then 99 m4 $P ROJTMP/mondorescue.mc $dest/distributions/$dfam/Makefile > $dest/distributions/${ddir}-$dver/Makefile94 m4 $PBTMP/mondorescue.mc $dest/distributions/$dfam/Makefile > $dest/distributions/${ddir}-$dver/Makefile 100 95 elif [ "$dtype" = "deb" ]; then 101 96 if [ -f $dest/distributions/$ddir/rules ]; then … … 109 104 exit -1 110 105 fi 111 m4 $P ROJTMP/mondorescue.mc $inc > $dest/distributions/${ddir}-$dver/rules112 $ TOOLHOME/mkchangelog.pl $dtype $p $dest/distributions/${ddir}-$dver/changelog106 m4 $PBTMP/mondorescue.mc $inc > $dest/distributions/${ddir}-$dver/rules 107 $PBROOT/mkchangelog.pl $dtype $p $dest/distributions/${ddir}-$dver/changelog 113 108 if [ $? -ne 0 ]; then 114 109 echo "Unable to create changelog for ${ddir}-$dver/changelog" … … 125 120 cd $dest 126 121 for f in mondorescue-howto.sgml *8; do 127 m4 $P ROJTMP/mondorescue.mc $f > ${f}.new122 m4 $PBTMP/mondorescue.mc $f > ${f}.new 128 123 mv ${f}.new $f 129 124 done … … 146 141 147 142 if [ _"`echo $p | grep -vE 'kernel|busybox' | grep mindi`" != _"" ]; then 148 v1=`cat ${ TOOLHOME}/../mondo-doc/VERSION`143 v1=`cat ${PBROOT}/../mondo-doc/VERSION` 149 144 if [ ! -d mondo-doc-$v1 ]; then 150 145 echo "mondo-doc should be created before $p" … … 155 150 fi 156 151 if [ "`echo $p | grep -v doc | grep mondo`" != "" ]; then 157 v1=`cat ${ TOOLHOME}/../mondo-doc/VERSION`152 v1=`cat ${PBROOT}/../mondo-doc/VERSION` 158 153 if [ ! -d mondo-doc-$v1 ]; then 159 154 echo "mondo-doc should be created before $p" … … 177 172 done 178 173 179 rm -rf $P ROJTMP174 rm -rf $PBTMP 180 175 181 176 echo "Version delivered :"
Note:
See TracChangeset
for help on using the changeset viewer.