Changeset 2425


Ignore:
Timestamp:
Apr 9, 2003, 3:55:59 AM (17 years ago)
Author:
kevin
Message:

Create more-compliant Installer packages.

Location:
trunk/base
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/doc/macosx.mtree

    r2074 r2425  
    44#
    55
     6/set type=dir uname=root gname=wheel mode=0755
     7.
     8    usr
     9    ..
     10..
    611/set type=dir uname=root gname=admin mode=0775
    712.
  • trunk/base/src/port1.0/portmpkg.tcl

    r2118 r2425  
    138138       
    139139    write_PkgInfo ${mpkgpath}/Contents/PkgInfo
    140     write_info_file ${mpkgpath}/Contents/Resources/${portname}-${portversion}.info $portname $portversion $description
    141140    mpkg_write_info_plist ${mpkgpath}/Contents/Info.plist $portname $portversion $prefix $dependencies
    142141    write_description_plist ${mpkgpath}/Contents/Resources/Description.plist $portname $portversion $description
  • trunk/base/src/port1.0/portpackage.tcl

    r2118 r2425  
    4747
    4848proc package_main {args} {
    49     global portname portversion package.type package.destpath UI_PREFIX
     49    global portname portversion portrevision package.type package.destpath UI_PREFIX
    5050
    5151    ui_msg "$UI_PREFIX [format [msgcat::mc "Creating package for %s-%s"] ${portname} ${portversion}]"
    5252
    53     return [package_pkg $portname $portversion]
    54 }
    55 
    56 proc package_pkg {portname portversion} {
     53    return [package_pkg $portname $portversion $portrevision]
     54}
     55
     56proc package_pkg {portname portversion portrevision} {
    5757    global portdbpath destpath workpath prefix portresourcepath description package.destpath long_description homepage
    5858
     
    6262    system "mkdir -p -m 0755 ${pkgpath}/Contents/Resources"
    6363    write_PkgInfo ${pkgpath}/Contents/PkgInfo
    64     write_info_file ${pkgpath}/Contents/Resources/${portname}-${portversion}.info $portname $portversion $description
    65     write_info_plist ${pkgpath}/Contents/Info.plist $portname $portversion
     64    write_info_plist ${pkgpath}/Contents/Info.plist $portname $portversion $portrevision
    6665    write_description_plist ${pkgpath}/Contents/Resources/Description.plist $portname $portversion $description
    6766    # long_description, description, or homepage may not exist
     
    7675    file copy -force -- ${portresourcepath}/package/background.tiff ${pkgpath}/Contents/Resources/background.tiff
    7776    system "mkbom ${destpath} ${pkgpath}/Contents/Archive.bom"
    78     system "cd ${pkgpath}/Contents/Resources/ && ln -fs ../Archive.bom ${portname}-${portversion}.bom"
    7977    system "cd ${destpath} && pax -x cpio -w -z . > ${pkgpath}/Contents/Archive.pax.gz"
    80     system "cd ${pkgpath}/Contents/Resources/ && ln -fs ../Archive.pax.gz ${portname}-${portversion}.pax.gz"
    81 
    82     write_sizes_file ${pkgpath}/Contents/Resources/${portname}-${portversion}.sizes ${portname} ${portversion} ${pkgpath} ${destpath}
     78
     79    write_sizes_file ${pkgpath}/Contents/Resources/Archive.sizes ${portname} ${portversion} ${pkgpath} ${destpath}
    8380
    8481    return 0
     
    106103}
    107104
     105# XXX: deprecated
    108106proc write_info_file {infofile portname portversion description} {
    109107        set infofd [open ${infofile} w+]
     
    127125}
    128126
    129 proc write_info_plist {infofile portname portversion} {
    130         set vers [split $portversion "."]
    131         set major [lindex $vers 0]
    132         set minor [lindex $vers 1]
    133         if {$major == ""} {set major "0"}
    134         if {$minor == ""} {set minor "0"}
    135                
     127proc write_info_plist {infofile portname portversion portrevision} {
     128
    136129        set infofd [open ${infofile} w+]
    137130        puts $infofd {<?xml version="1.0" encoding="UTF-8"?>
     
    149142        <string>${portversion}</string>
    150143        <key>IFMajorVersion</key>
    151         <integer>${major}</integer>
     144        <integer>${portrevision}</integer>
    152145        <key>IFMinorVersion</key>
    153         <integer>${minor}</integer>
     146        <integer>0</integer>
    154147        <key>IFPkgFlagAllowBackRev</key>
    155148        <true/>
     
    237230        return -code error [format [msgcat::mc "Error determining installed size: %s"] $result]
    238231    }
    239     if {[catch {set infoSize [file size ${pkgpath}/Contents/Resources/${portname}-${portversion}.info]} result]} {
    240         return -code error [format [msgcat::mc "Error determining info file size: %s"] $result]
     232    if {[catch {set infoSize [file size ${pkgpath}/Contents/Info.plist]} result]} {
     233       return -code error [format [msgcat::mc "Error determining plist file size: %s"] $result]
    241234    }
    242235    if {[catch {set bomSize [file size ${pkgpath}/Contents/Archive.bom]} result]} {
Note: See TracChangeset for help on using the changeset viewer.