diff --git a/perl-xCAT/debian/rules b/perl-xCAT/debian/rules index 738db95d3..d98c40834 100755 --- a/perl-xCAT/debian/rules +++ b/perl-xCAT/debian/rules @@ -14,7 +14,6 @@ export DH_COMPAT=5 build: dh_testdir - ./modifyUtils `cat ../Version` `svn info | grep Revision | cut -d" " -f 2` ./db2man clean: @@ -49,6 +48,7 @@ binary-arch: build install chmod 644 `pwd`/debian/perl-xcat/opt/xcat/share/doc/man5/* chmod 644 `pwd`/debian/perl-xcat/opt/xcat/share/man/man7/* chmod 644 `pwd`/debian/perl-xcat/opt/xcat/share/doc/man7/* + ./modifyUtils `cat ../Version` `svn info | grep Revision | cut -d" " -f 2` # dh_installmenu # dh_installdebconf # dh_installlogrotate diff --git a/perl-xCAT/modifyUtils b/perl-xCAT/modifyUtils index c336e0d96..f987e5d6b 100755 --- a/perl-xCAT/modifyUtils +++ b/perl-xCAT/modifyUtils @@ -30,5 +30,10 @@ then sed -e s/"#XCATVERSIONSUBHERE"/". '$VER'"/ -e s/"#XCATSVNBUILDSUBHERE"/". ' (${SVNREF}built $BUILDDATE)'"/ xCAT/Version.pm >xCAT/Version.pm.new mv xCAT/Version.pm.new xCAT/Version.pm else - sed -i -e s/"#XCATVERSIONSUBHERE"/". '$VER'"/ -e s/"#XCATSVNBUILDSUBHERE"/". ' (${SVNREF}built $BUILDDATE)'"/ xCAT/Version.pm + if [ -f "/etc/debian_version" ];then + FILENAME="debian/perl-xcat/opt/xcat/lib/perl/xCAT/Version.pm" + else + FILENAME="xCAT/Version.pm" + fi + sed -i -e s/"#XCATVERSIONSUBHERE"/". '$VER'"/ -e s/"#XCATSVNBUILDSUBHERE"/". ' (${SVNREF}built $BUILDDATE)'"/ $FILENAME fi