English Finnish
Tcl packaging guidelines Tcl-paketoinnin ohjeet
These conventions apply to Tcl packages in Fedora 9 and later. There are some aspects of Tcl in Fedora 7 and Fedora 8 that will conflict with these guidelines.
Naming Conventions
The name for all Tcl/Tk extensions must be prefixed with `+tcl-+`. This rule applies even for Tcl/Tk packages that are already prefixed with `+tcl+` in the name (see examples below). An optional `+Provides: foo+` is recommended to allow selecting the package based on the upstream name, as long as the upstream name is not excessively generic and does not conflict with an existing package name. Tk extensions have the option of adding additional Provides: with the prefix `+tk-+`.
Name: tcl-bwidget
Provides: bwidget = %{version}-%{release}, tk-bwidget = %{version}-%{release}
Name: tcl-tclxml
Provides: tclxml = %{version}-%{release}
Name: tcl-thread
The exception to this naming rule are existing packages that provide both an extension and a shell, such as `+expect+`. However, note that providing a shell is strongly discouraged (see below).
Applications Sovellukset
Tcl and Tk applications *must* use a non-versioned interpreter name in shebang line. This is to prevent any unnecessary dependency on the version of the interpreter being used. Most dependencies are with specific Tcl extensions, not the command line applications. Nevertheless, if an application does require a specific version of Tcl, it should use the standard Tcl package system to express this, as well as an explicit `+Requires: tcl(abi) = 8.x+` in the spec file.
Good: Hyvä:
package require -exact Tcl 8.5
The same rules apply for Tk applications. The non-versioned `+wish+` interpreter name *must* be used.
Extensions Laajennukset
Since Fedora 9, `+%{_libdir}+` and `+%{_datadir}+` have been removed from the search path to optimize package loading times. Instead, Tcl extension packages *must* be installed in `+%{_datadir}/tcl8.x+` if they are noarch packages containing only Tcl code, or `+%{_libdir}/tcl8.x+` if they are arch-specific extensions containing shared libraries. Note that most Tcl extensions are not configured do install in these directories out of the box, and may need to use additional configure switches, patches, or script code in `+%install+` to move the files to the correct location.
Both arch-specific and `+noarch+` Tcl extensions *must* use
Requires: tcl(abi) = 8.6
to indicate which Tcl version (8.5 in F19 and F20, 8.6 in F21+) they were built against. This is necessary because the guidelines below require extensions to be installed into tcl-versioned directories, which are only used by a single version of Tcl. This does impose an inconvenience that all arch-specific and noarch extensions will need to be rebuilt for a new minor version of Tcl, but since new Tcl minor versions only appear once every few years, this should not be such a problematic inconvenience.