If you take the previous example, you would have a number of files under /tmp/pkg/usr/local - in the case of your module only one file, but it could be any number of files in any number of folders.
Originally /usr/local/tce.installed/extension_name was used as a flag to indicate that an extension called "extension_name" is already loaded. If your extension contains a script named /usr/local/tce.installed/extension_name, then it will run when the extension is loaded.
To create the script, first create the folder: $ sudo mkdir /tmp/pkg/usr/local/tce.installed
$ sudo chmod 775 /tmp/pkg/usr/local/tce.installed
$ sudo chown root:staff /tmp/pkg/usr/local/tce.installed
..then use vi, beaver or similar to write a script and save it as /usr/local/tce.installed/extension_name, then make it executable: $ sudo chmod +x /tmp/pkg/usr/local/tce.installed/extension_name
..and use squashfs to make the tcz as before