You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
2.0 KiB
52 lines
2.0 KiB
# -*- tcl -*- |
|
# Maintenance Instruction: leave the 999999.xxx.x as is and use 'pmix make' or src/make.tcl to update from <pkg>-buildversion.txt |
|
# |
|
# Please consider using a BSD or MIT style license for greatest compatibility with the Tcl ecosystem. |
|
# Code using preferred Tcl licenses can be eligible for inclusion in Tcllib, Tklib and the punk package repository. |
|
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
|
# (C) 2023 |
|
# |
|
# @@ Meta Begin |
|
# Application %pkg% 999999.0a1.0 |
|
# Meta platform tcl |
|
# Meta license <unspecified> |
|
# @@ Meta End |
|
|
|
|
|
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
|
apply {code { #auto determine package name and version from name and placement of .tm file |
|
foreach base [tcl::tm::list] { |
|
set nsprefix "";#in case sourced directly and not in any of the .tm paths |
|
if {[string match -nocase ${base}* [info script]]} { |
|
set nsprefix [string trimleft [join [lrange [file split [string range [info script] [string length $base]+1 end]] 0 end-1] ::]:: ::] |
|
break |
|
} |
|
} |
|
set ver [join [lassign [split [file rootname [file tail [info script] ]] -] pkgtail] -] |
|
set pkgns ${nsprefix}${pkgtail} |
|
namespace eval $pkgns [string map [list <pkg> $pkgns <ver> $ver] $code] |
|
package provide $pkgns $ver;# only provide package if code evaluated without error |
|
} ::} { |
|
namespace export {[a-z]*} ;# Convention: export all lowercase |
|
#-------------------------------------- |
|
variable pkg "<pkg>" |
|
variable version "<ver>" |
|
#-------------------------------------- |
|
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
|
## Requirements |
|
##e.g package require frobz |
|
|
|
|
|
#proc test {args} {puts "[namespace current]::test got args: $args"} |
|
|
|
|
|
namespace eval [namespace current]::lib { |
|
namespace export {[a-z]*} ;# Convention: export all lowercase |
|
#proc test {args} {puts "[namespace current]::test got args: $args"} |
|
} |
|
|
|
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ |
|
## Ready |
|
} |
|
return |
|
|
|
|