This is an old revision of the document!
Before starting on making slitaz packages, we'll begin with a quick overview of how a package installs programs:
When you click on a package to install (in tazweb), you tell the system to automatically download the package to /var/lib/tazpkg/5.0/packages/. It then automatically un-cpio's itself to ~/fs/ (or /home/tux/fs/ when using the absolute path).
Next, the packages are compressed: a folder called “fs” is cpio'ed and lzma compressed, and that .cpio.lzma folder is itself cpio'ed together with the receipt, files.list, md5sum, and description.txt into a cpio file renamed as filename.tazpkg
So, with this, we're all ready now to make a tazpackage:
- put all the files/folders you need in /fs/ and compress this as cpio, and then as lzma (do this using the cpio-command “cpio -o -H newc –quiet ”, and the lzma-command “xz –format=lzma fs.cpio.lzma fs.cpio” or alternatively with a gui-based compression utility (like xarchiver, …)
- put the file size details of the copi.lzma folder in the receipt (you can find these by right-clicking–>properties in PCManFm on the file). Also put the following lines (replace “text” with your commands):
text
}
pre_remove() {
text
}
- make the files.list file by cd-ing to your tazpkg's fs folder, and then using following commands:
find . -type f -print > ../files.list find . -type l -print >> ../files.list cd ..; sed -i s/'^.'/''/ files.list
- make the md5 file by typing the command “md5sum filename”, or by using a program (on windows, you can use winmd5, FCIV, certutil, hashtab, hashcheck, …)
- compress the whole by using the cpio compress command: cpio -oH < fs.cpio.lzma receipt files.list md5sum description.txt > filename.tazpkg or using a gui-based compression utility (like xarchiver, …)
Alternatively, you can also do it using the tazpkg pack command; to see what that does exactly, see http://hg.slitaz.org/tazpkg/file/3af642cd5e69/modules/pack