SliTaz GNU/Linux official and community documentation wiki.
.png

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:guides:makingtazpackages [2016/01/10 10:38]
linea tiny edits
en:guides:makingtazpackages [2016/01/28 15:07] (current)
brianperry
Line 3: Line 3:
 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). 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 compressedand that .cpio.lzma folder is itself cpio'​ed together with the receipt, ​files.listmd5sum, and description.txt into a cpio file renamed as filename.tazpkg+Thenit automatically puts all of the files you included in /fs/ into the correct place on the hard disk, overwriting the old files bearing the same name, ... It knows where to place them as you use the exact same path of the files as the path the files are installed to on your harddisk (so if for instance, you want the package to copy a file called foo.bar to /usr/shareput foo.bar into /​fs/​usr/​share/​ in the package).
  
-So, with this, we're all ready now to make a tazpackage: \\  +After that, it executes the compile rules, genpkg rules, ... (assuming you packed it with tazwok; if packed with tazpkg it won't call these rules !) 
-    * 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):+So, with this, we're all ready now to make a tazpackage ​ourselves: \\  
 +    * put all the files/​folders you need in /fs/path_of_files/​ ; make sure the fs contents only contains binaries, scripts, configuration files, ... It should not contain source files, license, readme'​s,​ ... Compress the files 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 cpio.lzma folder in the receipt (you can find these by right-clicking-->​properties in PCManFm on the file). Also put in the following lines (replace "​text"​ with your commands; for more rules, see http://​doc.slitaz.org/​en:​cookbook:​receipt):
  
 <note tip> <note tip>
-# Rules to gen a SliTaz package suitable for Tazpkg.+compile_rules() 
 +
 + text 
 +
 genpkg_rules() genpkg_rules()
 { {
Line 16: Line 22:
 } }
  
-pre_remove()+post_remove()
 { {
  text  text
Line 31: Line 37:
     * 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, ...)     * 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, ...)+    * compress the fs.cpio;​lzma file together with the receipt, files.list, md5sum, and description.txt into a cpio file renamed as filename.tazpkg . Do so 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 make the package by using the tazpkg pack command; to see what that does exactly, see http://​hg.slitaz.org/​tazpkg/​file/​3af642cd5e69/​modules/​pack . In general it will make the md5 checksum and the filelist, and update the filesizes declared in the receipt. If you have already made the description and receipt it will also make the finished tazpackage in /home/tux (make sure you also pre-made the fs folder with the files therein for it to make a working tazpackage). Note that the wok too can be of use here (see http://​doc.slitaz.org/​en:​oldcookbook:​wok). 
 + 
 +Once you have made a package, you can put it on a personal ftp site/​webspace,​ or you can upload it to the slitaz package database using mercurial. See http://​doc.slitaz.org/​en:​oldcookbook:​wok on how to do this.
  
-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+Also note you may also want to read: \\  
 +http://​hg.slitaz.org/​tazpkg/​raw-file/tip/doc/tazpkg.en.html \\  
 +http://​hg.slitaz.org/​cookutils/​raw-file/​tip/​doc/​cookutils.en.html
 
en/guides/makingtazpackages.1452418723.txt.gz · Last modified: 2016/01/10 10:38 by linea