? ./base/config.log
? ./base/config.status
? ./base/Makefile
? ./base/Mk/dports.autoconf.mk
? ./base/doc/ports.conf
? ./base/doc/prefix.mtree
? ./base/src/config.h
? ./base/src/darwinports1.0/Darwinports.dylib
? ./base/src/darwinports1.0/darwinports_autoconf.tcl
? ./base/src/pextlib1.0/Pextlib.dylib
? ./base/src/port/port
? ./base/src/port/portall
? ./base/src/port/portindex
? ./base/src/port1.0/portpackage.tcl.jdp.1
? ./base/src/port1.0/portpackage.tcl.jdp.2
? ./base/src/programs/Makefile
RCS file: /Volumes/src/cvs/od/proj/darwinports/base/src/port1.0/portinstall.tcl,v
retrieving revision 1.65
diff -b -u -r1.65 portinstall.tcl
|
|
|
111 | 111 | cd $pwd |
112 | 112 | } |
113 | 113 | |
| 114 | proc run_inst_helper_script {script} { |
| 115 | global workdir prefix |
| 116 | |
| 117 | set script_src [file join [option filespath] [option $script]] |
| 118 | set script_exe [file join $workdir [option $script]] |
| 119 | |
| 120 | if {[file exists $script_src]} { |
| 121 | system "cp $script_src $script_exe" |
| 122 | reinplace "s|@PREFIX@|$prefix|g" $script_exe |
| 123 | system "chmod a+rx ${script_exe}" |
| 124 | system $script_exe |
| 125 | } |
| 126 | } |
| 127 | |
| 128 | |
114 | 129 | proc install_main {args} { |
115 | 130 | global portname portversion portpath categories description long_description homepage depends_run installPlist package-install uninstall workdir worksrcdir prefix UI_PREFIX destroot |
116 | 131 | |
| 132 | # Run preinstall script if it exists |
| 133 | run_inst_helper_script [option preinstall] |
| 134 | |
117 | 135 | # Install ${destroot} contents into / |
118 | 136 | directory_dig ${destroot} ${destroot} |
| 137 | |
| 138 | # Run postinstall script if it exists |
| 139 | run_inst_helper_script [option postinstall] |
119 | 140 | |
120 | 141 | # Package installed successfully, so now we must register it |
121 | 142 | set rhandle [registry_new $portname $portversion] |
RCS file: /Volumes/src/cvs/od/proj/darwinports/base/src/port1.0/portmain.tcl,v
retrieving revision 1.45
diff -b -u -r1.45 portmain.tcl
|
|
|
68 | 68 | default filesdir {files} |
69 | 69 | default filespath {[file join $portpath $filesdir]} |
70 | 70 | default worksrcpath {[file join $workpath $worksrcdir]} |
| 71 | default preinstall {preinstall} |
| 72 | default postinstall {postinstall} |
| 73 | default postremove {postremove} |
71 | 74 | |
72 | 75 | # Compatibility namespace |
73 | 76 | default portname {$name} |
RCS file: /Volumes/src/cvs/od/proj/darwinports/base/src/port1.0/portpackage.tcl,v
retrieving revision 1.44
diff -b -u -r1.44 portpackage.tcl
|
|
|
77 | 77 | set pkg_$variable [set $variable] |
78 | 78 | } |
79 | 79 | } |
| 80 | # Add pre/post install scripts if they exist |
| 81 | |
| 82 | foreach script {preinstall postinstall postremove} { |
| 83 | set script_src [file join [option filespath] [option $script]] |
| 84 | set script_dst "${pkgpath}/Contents/Resources/$script" |
| 85 | |
| 86 | if {[file exists $script_src]} { |
| 87 | system "cp ${script_src} ${script_dst}" |
| 88 | reinplace "s|@PREFIX@|$prefix|g" $script_dst |
| 89 | system "chmod a+rx ${script_dst}" |
| 90 | } |
| 91 | } |
| 92 | |
80 | 93 | write_welcome_html ${pkgpath}/Contents/Resources/Welcome.html $portname $portversion $pkg_long_description $pkg_description $pkg_homepage |
81 | 94 | file copy -force -- ${portresourcepath}/package/background.tiff ${pkgpath}/Contents/Resources/background.tiff |
82 | 95 | system "mkbom ${destpath} ${pkgpath}/Contents/Archive.bom" |