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 Both sides next revision
en:cookbook:receipt [2011/11/03 21:30]
linea Tiny typos
en:cookbook:receipt [2012/04/06 12:09]
linea
Line 2: Line 2:
  
  
-This document describes the opportunities offered by the recipes used by Tazwok ​to compile and generate packages for SliTaz and Tazpkg through The wok and tools. The recipe for a package is also used by Tazpkg to install/​uninstall and provide information about a .tazpkg package. Each recipe begins with a comment in English:+This document describes the opportunities offered by the recipes used by Cookutils ​to compile and generate packages for SliTaz and Tazpkg through The wok and tools. The recipe for a package is also used by Tazpkg to install/​uninstall and provide information about a .tazpkg package. Each recipe begins with a comment in English:
  
 <​file>#​ SliTaz package receipt </​file>​ <​file>#​ SliTaz package receipt </​file>​
Line 21: Line 21:
  
  
-Tazwok ​also knows how to use various optional variables. It can, for example, use the name of another source package. There are also variables that are used by Tazpkg to manage dependencies or provide information about the package.+Cookutils ​also knows how to use various optional variables. It can, for example, use the name of another source package. There are also variables that are used by Tazpkg to manage dependencies or provide information about the package.
  
-  * **$DEPENDS:​** Set dependencies,​ there may be several dependencies separated by a space or on several lines. This variable is used mainly by Tazpkg when installing the package and Tazwok ​to build large packages such as Xorg. Example for Clex which depends on ncurses:+  * **$DEPENDS:​** Set dependencies,​ there may be several dependencies separated by a space or on several lines. This variable is used mainly by Tazpkg when installing the package and Cookutils ​to build large packages such as Xorg. Example for Clex which depends on ncurses:
  
 <​file>​DEPENDS="​ncurses"</​file>​ <​file>​DEPENDS="​ncurses"</​file>​
  
-  * **$BUILD_DEPENDS:​** Set compilation dependencies,​ again separated by a space or several lines. This variable is used by Tazwok ​during the cooking of a package. Example:+  * **$BUILD_DEPENDS:​** Set compilation dependencies,​ again separated by a space or several lines. This variable is used by Cookutils ​during the cooking of a package. Example:
  
 <​file>​BUILD_DEPENDS="​ncurses-dev"</​file>​ <​file>​BUILD_DEPENDS="​ncurses-dev"</​file>​
Line 35: Line 35:
 <​file>​TARBALL="​$PACKAGE-$VERSION.tar.gz"</​file>​ <​file>​TARBALL="​$PACKAGE-$VERSION.tar.gz"</​file>​
  
-  * **$WEB_SITE :** The official website of the package. It may be that some libraries have no website, in this case, there is no need to specify a URL. Note Tazwok ​and Tazpkg both expect to find a URL with the complete HTTP: +  * **$WEB_SITE :** The official website of the package. It may be that some libraries have no website, in this case, there is no need to specify a URL. Note Cookutils ​and Tazpkg both expect to find a URL with the complete HTTP: 
  
 <​file>​WEB_SITE="​http://​www.clex.sk/"</​file>​ <​file>​WEB_SITE="​http://​www.clex.sk/"</​file>​
  
-  * **$WGET_URL :** URL to download the source file. In general the variable $TARBALL should be used to facilitate the updating of the package without changing the $VERSION. Using a configuration file, Tazwok ​also configures by default 3 mirrors: $GNU_MIRROR for the GNU mirror, $SF_MIRROR for SourceForge and XORG_MIRROR for mirroring the graphical server Xorg. Example for Clex:+  * **$WGET_URL :** URL to download the source file. In general the variable $TARBALL should be used to facilitate the updating of the package without changing the $VERSION. Using a configuration file, Cookutils ​also configures by default 3 mirrors: $GNU_MIRROR for the GNU mirror, $SF_MIRROR for SourceForge and XORG_MIRROR for mirroring the graphical server Xorg. Example for Clex:
  
 <​file>​WGET_URL="​http://​www.clex.sk/​download/​$TARBALL"</​file>​ <​file>​WGET_URL="​http://​www.clex.sk/​download/​$TARBALL"</​file>​
Line 58: Line 58:
   * **$SELF_INSTALL (obsolete):​** Certain packages use commands provided by the package itself in the post_install function. To install this package into a directory other than root and still be able to use these commands, the package must have been installed in / in earlier stages. The line: //​SELF_INSTALL=1//​ alerts tazpkg to this feature. This variable is depreciated. The command __//chroot "​$1/"​ a_package_command//​__ in post_install does the job.   * **$SELF_INSTALL (obsolete):​** Certain packages use commands provided by the package itself in the post_install function. To install this package into a directory other than root and still be able to use these commands, the package must have been installed in / in earlier stages. The line: //​SELF_INSTALL=1//​ alerts tazpkg to this feature. This variable is depreciated. The command __//chroot "​$1/"​ a_package_command//​__ in post_install does the job.
  
-===== Variables generated by Tazwok ​=====+===== Variables generated by Cookutils ​=====
  
-Certain factors are known only during the cooking of a package or after the package has been cooked. ​Tazwok ​will add them to the recipe automatically.+Certain factors are known only during the cooking of a package or after the package has been cooked. ​Cookutils ​will add them to the recipe automatically.
  
   * **$PACKED_SIZE :** Tazpkg file size.   * **$PACKED_SIZE :** Tazpkg file size.
Line 66: Line 66:
   * **$UNPACKED_SIZE :** Space taken up by the package after installation.   * **$UNPACKED_SIZE :** Space taken up by the package after installation.
  
-  * **$EXTRAVERSION :** Some packages have 2 different versions. This is in case of modules added to the Linux kernel, such as squashfs, because the module depends on the version of the kernel with which it was compiled. In this case $EXTRAVERSION contains the kernel version and Tazwok ​determines the module from the contents of **/​lib/​modules**.+  * **$EXTRAVERSION :** Some packages have 2 different versions. This is in case of modules added to the Linux kernel, such as squashfs, because the module depends on the version of the kernel with which it was compiled. In this case $EXTRAVERSION contains the kernel version and Cookutils ​determines the module from the contents of **/​lib/​modules**.
  
 ===== Variables used in functions ===== ===== Variables used in functions =====
Line 86: Line 86:
 ===== Functions ===== ===== Functions =====
  
-A recipe may contain 4 functions. ​Tazwok ​knows how to deal with functions containing compilation rules (compile_rules) and rules used to generate a package (genpkg_rules). These functions may contain all sorts of GNU/Linux standard commands, such as sed, awk, patch and variables automatically configured.+A recipe may contain 4 functions. ​Cookutils ​knows how to deal with functions containing compilation rules (compile_rules) and rules used to generate a package (genpkg_rules). These functions may contain all sorts of GNU/Linux standard commands, such as sed, awk, patch and variables automatically configured.
  
 === compile_rules() === === compile_rules() ===
  
-To compile a package you can use the variable $src to move (cd) in the directory of sources and use $CONFIGURE_ARGS to include arguments from the Tazwok ​configuration file. To build the package you usually launch '​make'​ without any arguments, and to install the package into the directory _pkg: it's necessary to use the command 'make DESTDIR=$PWD/​_pkg install'​. Generic example:+To compile a package you can use the variable $src to move (cd) in the directory of sources and use $CONFIGURE_ARGS to include arguments from the Cookutils ​configuration file. To build the package you usually launch '​make'​ without any arguments, and to install the package into the directory _pkg: it's necessary to use the command 'make DESTDIR=$PWD/​_pkg install'​. Generic example:
  
 <​file>​ <​file>​
Line 120: Line 120:
 === pre_install() and post_install()=== === pre_install() and post_install()===
  
-These functions are initiated by Tazpkg when installing the package. They must be defined before generating the .tazpkg package with Tazwok. If no rules are given for these functions, they have no raison d'etre and can be removed. Example using echo to display some text (no function should be empty):+These functions are initiated by Tazpkg when installing the package. They must be defined before generating the .tazpkg package with Cookutils. If no rules are given for these functions, they have no raison d'etre and can be removed. Example using echo to display some text (no function should be empty):
  
 <​file>​ <​file>​
Line 136: Line 136:
 === pre_remove() and post_remove() === === pre_remove() and post_remove() ===
  
-These functions are initiated by Tazpkg when removing the package. They must be defined before generating the .tazpkg package with Tazwok. If no rules are given for these functions, they have no raison d'etre and can be removed. Example using echo to display some text (no function should be empty):+These functions are initiated by Tazpkg when removing the package. They must be defined before generating the .tazpkg package with Cookutils. If no rules are given for these functions, they have no raison d'etre and can be removed. Example using echo to display some text (no function should be empty):
  
 <​file>​ <​file>​
Line 149: Line 149:
 } }
 </​file>​ </​file>​
- 
-=== clean_wok() (deprecated) === 
- 
-This is useless with latest cookutils, source are all uncompressed in wok/​pkg/​source to keep build wok clean and structured. 
- 
-This function helps to define additional commands to be run when cleaning the wok, it is useful to delete files or directories that are not supported by Tazwok: 
- 
-<​file>​ 
-# clean commands for Tazwok. 
-clean_wok() 
-{ 
- rm -rf $WOK/​$PACKAGE/​vim71 
-} 
-</​file>​ 
- 
 
en/cookbook/receipt.txt ยท Last modified: 2017/04/24 17:05 by hgt