Changeset 621 for devel/pb/bin/pb


Ignore:
Timestamp:
Nov 30, 2008, 1:27:48 AM (11 years ago)
Author:
Bruno Cornec
Message:

Adds function pb_distro_installdeps to automatically istall dependencies on distro before building

File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r620 r621  
    837837            foreach my $f (@specfile) {
    838838                if ($f =~ /\.spec$/) {
     839                    pb_distro_installdeps("$f",$dtype,$pbupd);
    839840                    pb_system("rpmbuild $specialdef --define \'packager $ENV{'PBPACKAGER'}\' --define \"_topdir $ENV{'PBBUILDDIR'}\" -ba $f","Building package with $f under $ENV{'PBBUILDDIR'}","verbose");
    840841                    last;
     
    861862            chmod 0755,"debian/rules";
    862863
     864            pb_distro_installdeps("debian/control",$dtype,$pbupd);
    863865            pb_system("dpkg-buildpackage -us -uc -rfakeroot","Building package","verbose");
    864866            # Get the name of the generated packages
     
    913915            foreach my $f (@ebuildfile) {
    914916                if ($f =~ /\.ebuild$/) {
     917                    pb_distro_installdeps("$f",$dtype,$pbupd);
    915918                    move($f,"$tmpd/$pbpkg-$pbver.ebuild");
    916919                    pb_system("cd $tmpd ; ebuild $pbpkg-$pbver.ebuild clean ; ebuild $pbpkg-$pbver.ebuild digest ; ebuild $pbpkg-$pbver.ebuild package","verbose");
     
    932935            symlink "pbconf/$ddir-$dver-$arch","install" || die "Unable to symlink to pbconf/$ddir-$dver-$arch";
    933936            if (-x "install/pbslack") {
     937                pb_distro_installdeps("./install/pbslack",$dtype,$pbupd);
    934938                pb_system("./install/pbslack","Building package");
    935939                pb_system("sudo /sbin/makepkg -p -l y -c y $pbpkg","Packaging $pbpkg","verbose");
     
    10281032            ($odir,$over,$oarch) = split(/-/,$v);
    10291033        }
    1030         ($ddir, $dver, $dfam, $dtype, $pbsuf, $pbupd) = pb_distro_init($odir,$over);
     1034        ($ddir, $dver, $dfam, $dtype, $pbsuf) = pb_distro_init($odir,$over);
    10311035        pb_log(2,"DEBUG: distro tuple: ".join(',',($ddir, $dver, $dfam, $dtype, $pbsuf))."\n");
    10321036
     
    14491453        my ($name,$ver,$darch) = split(/-/,$v);
    14501454        chomp($darch);
    1451         my ($ddir, $dver, $dfam, $dtype, $pbsuf, $pbupd) = pb_distro_init($name,$ver);
     1455        my ($ddir, $dver, $dfam, $dtype, $pbsuf) = pb_distro_init($name,$ver);
    14521456
    14531457        if ($vetype eq "chroot") {
     
    19861990        pb_system("apt-get -y install wget patch ssh sudo debian-builder dh-make fakeroot ntpdate libmodule-build-perl libdate-manip-perl libmail-sendmail-perl liblocale-gettext-perl","$cmtall");
    19871991    } else  {
    1988         pb_system("apt-get update; apt-get -y install wget patch openssh-server dpkg-dev sudo debian-builder dh-make fakeroot ntpdate libfile-mimeinfo-perl libmodule-build-perl libdate-manip-perl libmail-sendmail-perl liblocale-gettext-perl","$cmtall");
     1992        pb_system("apt-get update; $pbupd wget patch openssh-server dpkg-dev sudo debian-builder dh-make fakeroot ntpdate libfile-mimeinfo-perl libmodule-build-perl libdate-manip-perl libmail-sendmail-perl liblocale-gettext-perl","$cmtall");
    19891993    }
    19901994} elsif ( $dfam eq "gen" ) {
    19911995        #system "emerge -u system";
    1992         pb_system("$pbudp wget sudo ntp DateManip File-MimeInfo Mail-Sendmail Locale-gettext","$cmtall");
     1996        pb_system("$pbupd wget sudo ntp DateManip File-MimeInfo Mail-Sendmail Locale-gettext","$cmtall");
    19931997} else {
    19941998    pb_log(0,"No pkg to install\n");
Note: See TracChangeset for help on using the changeset viewer.