Changeset 874


Ignore:
Timestamp:
Oct 21, 2009, 8:22:12 PM (11 years ago)
Author:
Bruno Cornec
Message:

Second round of Solaris fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r873 r874  
    10411041            chdir "$pbpkg-$pbver" || die "Unable to chdir to $pbpkg-$pbver";
    10421042            symlink "pbconf/$ddir-$dver-$arch","install" || die "Unable to symlink to pbconf/$ddir-$dver-$arch";
    1043             if (-x "install/pbbuild") {
     1043            if (-f "install/pbbuild") {
     1044                chmod 0755,"install/pbbuild";
    10441045                # pkginfo file is mandatory
    10451046                die "Unable to find pkginfo file in pbconf/$ddir-$dver-$arch" if (! -f "install/pkginfo");
     
    10471048                pb_system("install/pbbuild $pkgdestdir","Building software");
    10481049                # Copy complementary files
    1049                 if (-f "install/prototype") {
    1050                     copy("install/prototype", $pkgdestdir)
     1050                if (-f "install/Prototype") {
     1051                    copy("install/Prototype", $pkgdestdir)
    10511052                } else {
    10521053                    # No prototype provided, calculating it
    1053                     open(PROTO,"> install/prototype") || die "Unable to create prototype file";
     1054                    open(PROTO,"> $pkgdestdir/Prototype") || die "Unable to create Prototype file";
    10541055                    print PROTO "i pkginfo\n";
    10551056                    print PROTO "i depend\n" if (-f "install/depend");
     
    10591060                copy("install/pkginfo", $pkgdestdir);
    10601061                pb_system("pkgmk -o -r $pkgdestdir -d $ENV{'PBBUILDDIR'}/$dtype","Packaging $pbpkg","verbose");
    1061                 pb_system("pkgtrans -s $ENV{'PBBUILDDIR'}/$dtype $pbpkg-$pbver.pkg $pbpkg","Transformaing $pbpkg","verbose");
    1062                 pb_system("rm -rf $ENV{'PBBUILDDIR'}/$dtype");
    1063             }
     1062                pb_system("pkgtrans -s $ENV{'PBBUILDDIR'}/$dtype $pbpkg-$pbver.pkg $pbpkg","Transforming $pbpkg","verbose");
     1063                pb_system("rm -rf $ENV{'PBBUILDDIR'}/$dtype $pkgdestdir/install");
     1064            }
     1065            chdir ".." || die "Unable to chdir to parent dir";
     1066            pb_system("rm -rf $pbpkg-$pbver");
    10641067        } else {
    10651068            die "Unknown dtype format $dtype";
     
    10941097}
    10951098
    1096 sub create_solaris_protype {
     1099sub create_solaris_prototype {
    10971100
    10981101    my $uidgid = "bin bin";
    10991102
    1100     print PROTO "d none $_ 0755 $uidgid\n" if (-d $_);
     1103    print PROTO "d none $File::Find::name 0755 $uidgid\n" if (-d $_);
    11011104    if (-x $_) {
    1102         print PROTO "f none $_ 0755 $uidgid\n";
     1105        print PROTO "f none $File::Find::name 0755 $uidgid\n";
    11031106    } elsif (-f $_) {
    1104         print PROTO "f none $_ 0644 $uidgid\n" if (-f $_);
     1107        print PROTO "f none $File::Find::name 0644 $uidgid\n" if (-f $_);
    11051108    }
    11061109}
Note: See TracChangeset for help on using the changeset viewer.