Changeset 30391


Ignore:
Timestamp:
Oct 26, 2007, 12:06:16 PM (12 years ago)
Author:
afb@…
Message:

mdmg, meta-package disk image target (#12791)

Location:
trunk/base
Files:
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/base/doc/port.1

    r28170 r30391  
    496496Creates an internet-enabled disk image containing an OS X package of
    497497.Ar portname .
     498.Ss mdmg
     499Creates an internet-enabled disk image containing an OS X metapackage of
     500.Ar portname
     501and its dependencies.
    498502.Ss rpm
    499503Creates an RPM binary package of
  • trunk/base/src/package1.0/Makefile

    r26543 r30391  
    11INSTALLDIR=     ${DESTDIR}${datadir}/macports/Tcl/package1.0
    22
    3 SRCS=   package.tcl portdmg.tcl portmpkg.tcl portpkg.tcl portrpm.tcl \
    4         portsrpm.tcl portdpkg.tcl portunarchive.tcl portarchive.tcl
     3SRCS=   package.tcl portdmg.tcl portmdmg.tcl portmpkg.tcl portpkg.tcl \
     4        portrpm.tcl portsrpm.tcl portdpkg.tcl portunarchive.tcl portarchive.tcl
    55
    66include ../../Mk/macports.autoconf.mk
  • trunk/base/src/package1.0/package.tcl

    r26536 r30391  
    3838package require portmpkg 1.0
    3939package require portdmg 1.0
     40package require portmdmg 1.0
    4041package require portdpkg 1.0
    4142package require portunarchive 1.0
  • trunk/base/src/package1.0/portmdmg.tcl

    r29515 r30391  
    11# et:ts=4
    2 # portdmg.tcl
     2# portmdmg.tcl
    33# $Id$
    44#
     
    3131#
    3232
    33 package provide portdmg 1.0
     33package provide portmdmg 1.0
    3434package require portutil 1.0
    3535
    36 set org.macports.dmg [target_new org.macports.dmg dmg_main]
    37 target_runtype ${org.macports.dmg} always
    38 target_provides ${org.macports.dmg} dmg
    39 target_requires ${org.macports.dmg} pkg
     36set org.macports.mdmg [target_new org.macports.mdmg mdmg_main]
     37target_runtype ${org.macports.mdmg} always
     38target_provides ${org.macports.mdmg} mdmg
     39target_requires ${org.macports.mdmg} mpkg
    4040
    4141set_ui_prefix
    4242
    43 proc dmg_main {args} {
     43proc mdmg_main {args} {
    4444    global portname portversion portrevision package.destpath UI_PREFIX
    4545   
    4646    ui_msg "$UI_PREFIX [format [msgcat::mc "Creating disk image for %s-%s"] ${portname} ${portversion}]"
    4747   
    48     return [package_dmg $portname $portversion $portrevision]
     48    return [package_mdmg $portname $portversion $portrevision]
    4949}
    5050
    51 proc package_dmg {portname portversion portrevision} {
     51proc package_mdmg {portname portversion portrevision} {
    5252    global UI_PREFIX package.destpath portpath
    5353   
     
    6060    set tmp_image ${package.destpath}/${imagename}.tmp.dmg
    6161    set final_image ${package.destpath}/${imagename}.dmg
    62     set pkgpath ${package.destpath}/${portname}-${portversion}.pkg
     62    set mpkgpath ${package.destpath}/${portname}-${portversion}.mpkg
    6363   
    6464    if {[file readable $final_image] && ([file mtime ${final_image}] >= [file mtime ${portpath}/Portfile])} {
     
    6868   
    6969    # size for .dmg
    70     set size [dirSize ${pkgpath}]
     70    set size [dirSize ${mpkgpath}]
    7171    if {[expr ($size < 4194304)]} {
    7272        # there is a minimum of 8292 512 blocks in a dmg
     
    8585    set mount_point [exec mount | grep "${devicename}"]
    8686    regexp {(\/Volumes/[A-Za-z0-9\-\_\s].+)\s\(} $mount_point code mount_point
    87     system "ditto -rsrcFork ${pkgpath} '${mount_point}/${portname}-${portversion}.pkg'"
     87    system "ditto -rsrcFork ${mpkgpath} '${mount_point}/${portname}-${portversion}.mpkg'"
    8888    system "hdiutil detach ${devicename} -quiet"
    8989    if {[system "hdiutil convert ${tmp_image} -format UDCO -o ${final_image} -quiet"] != ""} {
  • trunk/base/src/port/port.tcl

    r30013 r30391  
    21602160    unarchive   action_target
    21612161    dmg         action_target
     2162    mdmg        action_target
    21622163    dpkg        action_target
    21632164    mpkg        action_target
Note: See TracChangeset for help on using the changeset viewer.