Changeset 872 in ProjectBuilder
- Timestamp:
- Oct 21, 2009, 7:42:58 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb/bin/pb
r865 r872 18 18 use File::stat; 19 19 use File::Temp qw(tempdir); 20 use File::Find; 20 21 use Time::localtime qw(localtime); 21 22 use POSIX qw(strftime); … … 1024 1025 if (-x "install/pbslack") { 1025 1026 pb_distro_installdeps("./install/pbslack",$dtype,$pbupd); 1026 pb_system("./install/pbslack","Building package");1027 pb_system("./install/pbslack","Building software"); 1027 1028 pb_system("sudo /sbin/makepkg -p -l y -c y $pbpkg","Packaging $pbpkg","verbose"); 1029 } 1030 } elsif ($dtype eq "sol") { 1031 # Solaris 1032 $made="$made $dtype/"; 1033 my $soldestdir="/usr/pb/$pbpkg"; 1034 1035 chdir "$ENV{'PBBUILDDIR'}" || die "Unable to chdir to $ENV{'PBBUILDDIR'}"; 1036 # Will host resulting packages 1037 pb_mkdir_p("$dtype"); 1038 pb_system("tar xfz $src","Extracting sources"); 1039 pb_system("tar xfz $src2","Extracting pbconf"); 1040 chdir "$pbpkg-$pbver" || die "Unable to chdir to $pbpkg-$pbver"; 1041 symlink "pbconf/$ddir-$dver-$arch","install" || die "Unable to symlink to pbconf/$ddir-$dver-$arch"; 1042 if (-x "install/pbbuild") { 1043 # pkginfo file is mandatory 1044 die "Unable to find pkginfo file in pbconf/$ddir-$dver-$arch" if (! -f "install/pkginfo"); 1045 # Build 1046 pb_system("install/pbbuild $soldestdir","Building software"); 1047 # Copy complementary files 1048 if (-f "install/prototype") { 1049 copy("install/prototype", $soldestdir) 1050 } else { 1051 # No prototype provided, calculating it 1052 open(PROTO,"> install/prototype") || die "Unable to create prototype file"; 1053 print PROTO "i pkginfo\n"; 1054 print PROTO "i depend\n" if (-f "install/depend"); 1055 find(\&create_solaris_prototype, $soldestdir); 1056 } 1057 copy("install/depend", $soldestdir) if (-f "install/depend"); 1058 copy("install/pkginfo", $soldestdir); 1059 pb_system("pkgmk -o -r $soldestdir -d $ENV{'PBBUILDDIR'}/$dtype","Packaging $pbpkg","verbose"); 1060 pb_system("pkgtrans -s $ENV{'PBBUILDDIR'}/$dtype $pbpkg-$pbver.pkg $pbpkg","Transformaing $pbpkg","verbose"); 1061 pb_system("rm -rf $ENV{'PBBUILDDIR'}/$dtype"); 1028 1062 } 1029 1063 } else { … … 1057 1091 print KEEP "$made\n"; 1058 1092 close(KEEP); 1093 } 1094 1095 sub create_solaris_protype { 1096 1097 my $uiggid = "bin bin"; 1098 1099 print PROTO "d none $_ 0755 $uidgid\n" if (-d $_); 1100 if (-x $_) { 1101 print PROTO "f none $_ 0755 $uidgid\n"; 1102 } elsif (-f $_) { 1103 print PROTO "f none $_ 0644 $uidgid\n" if (-f $_); 1104 } 1059 1105 } 1060 1106
Note:
See TracChangeset
for help on using the changeset viewer.