[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
wiki:user:kikinovak [2014/02/08 14:41 (UTC)] – Continued french ==> english translation of "Software Management" article kikinovakwiki:user:kikinovak [2014/02/20 06:38 (UTC)] (current) kikinovak
Line 47: Line 47:
 Stuff I'm currently working on, and which will eventually end up as a page in the Slackware Documentation Project. Stuff I'm currently working on, and which will eventually end up as a page in the Slackware Documentation Project.
  
-===== Software Management ===== 
  
-==== Anatomy of a Slackware package ==== 
  
-A Slackware package is a simple TGZ or TXZ compressed archive containing: 
  
-  * the tree structure of files and directories ; 
-  * post-installation scripts ; 
-  * the package description. 
  
-The name of every package provides a series of informations: 
  
-  * the program name ; 
-  * the program version ; 
-  * the architecture of the package ; 
-  * the build number.  
  
-Here's a few examples: 
  
-  * ''emacs-24.2-i486-1'' 
-  * ''mozilla-firefox-15.0.1-i486-1'' 
-  * ''vim-7.3.645-x86_64-1'' 
  
-==== Managing Slackware packages using the traditional tools ==== 
  
-Since its early releases, Slackware provides a collection of simple tools - the ''pkgtools'' - enabling the user to install, upgrade and remove software packages, as well as build them: 
  
-  * ''installpkg'' 
-  * ''removepkg'' 
-  * ''upgradepkg'' 
-  * ''explodepkg'' 
-  * ''makepkg'' 
  
-=== Installing software packages === 
  
-Install the Emacs editor from the Slackware DVD ((if it's not already installed)): 
  
-<code> 
-# mount /dev/cdrom /mnt/cdrom 
-# cd /mnt/cdrom/slackware/e 
-# installpkg emacs-24.2-i486-1.txz 
-Verifying package emacs-24.2-i486-1.txz. 
-Installing package emacs-24.2-i486-1.txz [ADD]: 
-PACKAGE DESCRIPTION: 
-# emacs (GNU Emacs) 
-# 
-# Emacs is the extensible, customizable, self-documenting real-time 
-# display editor. If this seems to be a bit of a mouthful, an 
-# easier explanation is that Emacs is a text editor and more. At 
-# its core is an interpreter for Emacs Lisp, a dialect of the Lisp 
-# programming language with extensions to support text editing. 
-# This version supports X. 
-# 
-# http://www.gnu.org/software/emacs/ 
-# 
-Executing install script for emacs-24.2-i486-1.txz. 
-Package emacs-24.2-i486-1.txz installed. 
-</code> 
- 
-<note tip>If you're using the CD set, Emacs is on the first CD.</note> 
- 
-=== Checking if a package is installed === 
- 
-The package installation process has created a new entry in ''/var/log/packages'' : 
- 
-<code> 
-# ls /var/log/packages/em* 
-/var/log/packages/emacs-24.2-i486-1 
-</code> 
- 
-Knowing if a package is installed boils down to checking the existence of the corresponding entry in ''/var/log/packages''. Example : 
- 
-<code> 
-# ls /var/log/packages/*firefox* 
-/var/log/packages/mozilla-firefox-15.0.1-i486-1 
-</code> 
- 
-Firefox is installed on the system, in version 15.0.1. Another example : 
- 
-<code> 
-# ls /var/log/packages/kdebase* 
-ls: cannot access /var/log/packages/kdebase*: No such file or directory 
-</code> 
- 
-There is no  ''kdebase-*'' package installed on the system. 
- 
-=== Removing a package === 
- 
-Use ''removepkg'' to remove an installed package. The command can take the simple basename of the package as an argument. Example: 
- 
-<code> 
-# removepkg emacs 
-</code> 
- 
-It's also possible to provide the complete name as an argument. In that case, it's better to call the command from within ''/var/log/packages'' and use tab completion: 
- 
-<code> 
-# cd /var/log/packages 
-# removepkg emacs-24.2-i486-1 
-</code> 
- 
-=== Upgrading a package === 
- 
-Slackware provides security updates for its latest releases. Visit the official site to know more about the latest updates: 
- 
-<code> 
-# links http://www.slackware.com 
-</code> 
- 
-  - Follow the ''ChangeLogs'' link. 
-  - Check out ''Slackware-stable ChangeLog''. 
-  - Read the file ''ChangeLog.txt'' corresponding to the architecture of your system. 
- 
-You can also use the Links browser to fetch updates manually. Before launching Links, create a ''/root/updates'' directory ((This is just an example, of course. Feel free to use any convenient place on your system.)) to store your downloaded updates: 
- 
-<code> 
-# cd 
-# mkdir updates 
-# cd updates/ 
-# links mirrors.slackware.com 
-</code> 
- 
-  - Follow the ''Slackware File Tree'' link. 
-  - Check out the directory corresponding to your release and architecture. 
-  - Change into the ''patches/packages'' directory. 
-  - Download any available updates. 
-   
-Quit Links and install your updates like this : 
- 
-<code> 
-# upgradepkg bind-9.9.1_P4-i486-1_slack14.0.txz 
- 
-+============================================================================== 
-| Upgrading bind-9.9.1_P3-i486-1 package using ./bind-9.9.1_P4-i486-1_slack14.0.txz 
-+============================================================================== 
-Pre-installing package bind-9.9.1_P4-i486-1_slack14.0... 
-Removing package /var/log/packages/bind-9.9.1_P3-i486-1-upgraded-2012-11-21,12:14:32... 
-  --> Deleting /usr/doc/bind-9.9.1-P3/CHANGES 
-  --> Deleting /usr/doc/bind-9.9.1-P3/COPYRIGHT 
-  --> Deleting /usr/doc/bind-9.9.1-P3/FAQ 
-  ... 
-Verifying package bind-9.9.1_P4-i486-1_slack14.0.txz. 
-Installing package bind-9.9.1_P4-i486-1_slack14.0.txz: 
-PACKAGE DESCRIPTION: 
-bind (DNS server and utilities) 
-# 
-# The named daemon and support utilities such as dig, host, and 
-# nslookup.  Sample configuration files for running a simple caching 
-# nameserver are included.  Documentation for advanced name server 
-# setup can be found in /usr/doc/bind-9.x.x/. 
-# 
-Executing install script for bind-9.9.1_P4-i486-1_slack14.0.txz. 
-Package bind-9.9.1_P4-i486-1_slack14.0.txz installed. 
-   
-Package bind-9.9.1_P3-i486-1 upgraded with new package 
-./bind-9.9.1_P4-i486-1_slack14.0.txz. 
-</code> 
- 
-Another example : 
- 
-<code> 
-# upgradepkg iptables-1.4.14-i486-2_slack14.0.txz 
-</code> 
- 
-=== Know more about the contents of a package === 
- 
-Every package has a corresponding entry in ''/var/log/packages''. These are all simple text files providing information about the contents of the respective packages. Example: 
- 
-<code> 
-# less /var/log/packages/wget-1.14-i486-1 
-PACKAGE NAME:     wget-1.14-i486-1 
-COMPRESSED PACKAGE SIZE:     478.5K 
-UNCOMPRESSED PACKAGE SIZE:     2.0M 
-PACKAGE LOCATION: /var/log/mount/slackware/n/wget-1.14-i486-1.txz 
-PACKAGE DESCRIPTION: 
-wget: wget (a non-interactive network retriever) 
-wget: 
-wget: GNU Wget is a free network utility to retrieve files from the  
-wget: World Wide Web using HTTP and FTP, the two most widely used Internet 
-wget: protocols.  It works non-interactively, thus enabling work in the 
-wget: background after having logged off. 
-wget: 
-wget: The author of Wget is Hrvoje Niksic <hniksic@srce.hr>. 
-wget: 
-wget: 
-wget: 
-FILE LIST: 
-./ 
-install/ 
-install/slack-desc 
-install/doinst.sh 
-usr/ 
-usr/bin/ 
-usr/bin/wget 
-usr/man/ 
-usr/man/man1/ 
-usr/man/man1/wget.1.gz 
-usr/info/ 
-usr/info/wget.info.gz 
-... 
-</code> 
- 
-==== Managing Slackware packages with slackpkg ==== 
- 
-The ''slackpkg'' utility has been officially included in Slackware since the 13.0 release. It enables the user to manage Slackware packages much more comfortably. 
- 
-A few remarks: 
- 
-  - Only official Slackware packages are handled by ''slackpkg''. 
-  - Third-party packages can be managed if you use Matteo Rossini's ''slackpkg+'' plugin. 
-  - Dependencies still have to be managed manually. 
- 
-=== Initial configuration === 
- 
-Edit ''/etc/slackpkg/mirrors'' and comment out //one and only one// package source, for example: 
- 
-<code> 
-# /etc/slackpkg/mirrors 
-... 
-# FRANCE (FR) 
-ftp://mirror.ovh.net/mirrors/ftp.slackware.com/slackware-14.0/ 
-# http://mirror.ovh.net/mirrors/ftp.slackware.com/slackware-14.0/ 
-</code> 
- 
-<note warning>If you are using a stable release of Slackware, don't get the section wrong and uncomment a mirror from ''Slackware-current''. If you do that, you will upgrade to a development version of Slackware!</note> 
- 
-If you prefer managing packages locally without the benefit of updates, you can still use the Slackware installation DVD as a package source. In that case, you will have to configure the default mount point: 
- 
-<code> 
-# /etc/slackpkg/mirrors  
-... 
-#---------------------------------------------------------------- 
-# Local CD/DVD drive 
-#---------------------------------------------------------------- 
-cdrom://mnt/cdrom/ 
-... 
-</code> 
- 
-Don't forget to mount the DVD before calling ''slackpkg'': 
- 
-<code> 
-# mount /dev/cdrom /mnt/cdrom 
-</code> 
- 
-Update the information on available packages: 
- 
-<code> 
-# slackpkg update 
-</code> 
- 
-<note>Note that the above command does not install any package updates. It only updates the internal list of packages you //can// install.</note> 
- 
-<note tip>It's always a good idea to invoke ''slackpkg update'' before searching, installing or updating a package, so the system's informations about available packages are up to date.</note> 
- 
-=== Installing packages === 
- 
-Example with a single package: 
- 
-<code> 
-# slackpkg install mplayerplug-in 
-</code> 
- 
-Confirm the installation in the subsequent screen, and the package is automatically downloaded and installed. 
- 
-You can also provide several packages as an argument: 
- 
-<code> 
-# slackpkg install mplayerplug-in bittorrent 
-</code> 
- 
-You can also manage whole package groups: 
- 
-<code> 
-# slackpkg install kde 
-</code> 
- 
-Another example for package groups: 
- 
-<code> 
-# slackpkg install xfce 
-</code> 
- 
-=== Remove packages === 
- 
-Example with a single package: 
- 
-<code> 
-# slackpkg remove mplayerplug-in 
-</code> 
- 
-As above, confirm the removal of the package in the subsequent screen. 
- 
-Remove several packages at once: 
- 
-<code> 
-# slackpkg remove mplayerplug-in bittorrent 
-</code> 
- 
-Likewise, you can remove a whole package group: 
- 
-<code> 
-# slackpkg remove kde 
-</code> 
- 
-Or: 
- 
-<code> 
-# slackpkg remove xfce 
-</code> 
- 
-=== Upgrading packages === 
- 
-When a package update is available, you can install it using the following command: 
- 
-<code> 
-# slackpkg upgrade iptables 
-</code> 
- 
-Update several packages at once: 
- 
-<code> 
-# slackpkg upgrade mozilla-firefox mozilla-thunderbird 
-</code> 
- 
-It is common practice to keep your whole system up to date: 
- 
-<code> 
-# slackpkg upgrade-all 
-</code> 
- 
-=== Search for specific packages or files === 
- 
-Search for a specific package: 
- 
-<code> 
-# slackpkg search k3b     
-Looking for k3b in package list. Please wait... DONE 
-The list below shows all packages with name matching "k3b". 
-[uninstalled] - k3b-2.0.2_20120226.git-i486-1 
-</code> 
- 
-If the package is already installed, here's what you get: 
- 
-<code> 
-# slackpkg search Terminal 
-Looking for Terminal in package list. Please wait... DONE 
-The list below shows all packages with name matching "Terminal". 
-[ installed ] - Terminal-0.4.8-i486-1 
-</code> 
- 
-You can also search for individual files. The search will eventually display on or several packages containing the file in question: 
- 
-<code> 
-# slackpkg file-search libncurses.so 
-Looking for libncurses.so in package list. Please wait... DONE 
-The list below shows the packages that contains "libncurses\.so" file. 
-[ installed ] - aaa_elflibs-14.0-i486-4 
-[ installed ] - ncurses-5.9-i486-1 
-</code> 
- 
-If you want to know more about the content of a package: 
- 
-<code> 
-# slackpkg info mesa 
- 
-PACKAGE NAME:  mesa-8.0.4-i486-1.txz 
-PACKAGE LOCATION:  ./slackware/x 
-PACKAGE SIZE (compressed):  19208 K 
-PACKAGE SIZE (uncompressed):  83930 K 
-PACKAGE DESCRIPTION: 
-mesa: mesa (a 3-D graphics library) 
-mesa: 
-mesa: Mesa is a 3-D graphics library with an API very similar to that of 
-mesa: another well-known 3-D graphics library.  :-)  The Mesa libraries are 
-mesa: used by X to provide both software and hardware accelerated graphics. 
-mesa: 
-mesa: Mesa was written by Brian Paul. 
-mesa: 
-</code> 
- 
-=== Cleaning the system === 
- 
-Remove all third-party packages: 
- 
-<code> 
-# slackpkg clean-system 
-</code> 
- 
-If you decide to keep some of the packages, simply unselect them in the subsequent screen. 
- 
-You can also use ''slackpkg'' to repair a damaged package. Let's say I accidentally deleted the file ''/usr/bin/glxgears''. First, I have to search for the package providing that file: 
- 
-<code> 
-# slackpkg file-search glxgears 
-Looking for glxgears in package list. Please wait... DONE 
-The list below shows the packages that contains "glxgears" file. 
-[ installed ] - mesa-8.0.4-i486-1 
-</code> 
- 
-With this information, I can simply reinstall the package: 
- 
-<code> 
-# slackpkg reinstall mesa 
-</code> 
- 
-==== Rebuild official packages ==== 
- 
-Slackware provides the entire system's source code in the ''source'' directory. Every binary system package will have his corresponding source directory. These source directories usually contain: 
- 
-  * the source code for the application or the library; 
-  * its fabrication recipe in the shape of a ''*.SlackBuild'' file; 
-  * the package description in a ''slack-desc'' file; 
-  * eventually, a post-installation script named ''doinst.sh''; 
-  * various other files like patches, custom menu entries, etc. 
- 
-=== Build a package from source === 
- 
-In the example below, we will build the ''Terminal'' application from the source code provided by Slackware. You might want to remove the corresponding package if it is installed. 
- 
-<note warning>The ''Terminal'' package is Xfce's terminal. In Slackware 14.1, the package has been renamed to ''xfce4-terminal''.</note> 
- 
-<code> 
-# removepkg Terminal 
-</code> 
- 
-Choose an appropriate place on your system to store the source code and the scripts, for example: 
- 
-<code> 
-# cd 
-# mkdir -pv source/Terminal 
-mkdir: created directory 'source' 
-mkdir: created directory 'source/Terminal' 
-# cd source/Terminal/ 
-# links mirrors.slackware.com 
-</code> 
- 
-Fetch the content from the ''source/xfce/Terminal'' directory on a Slackware mirror. Here's what we get: 
- 
-<code> 
-# ls -lh  
-total 1,4M 
--rw-r--r-- 1 root root  821 nov.  24 15:09 slack-desc 
--rw-r--r-- 1 root root 1,4M nov.  24 15:11 Terminal-0.4.8.tar.xz 
--rw-r--r-- 1 root root 3,6K nov.  24 15:10 Terminal.SlackBuild 
-</code> 
- 
-Make the ''Terminal.SlackBuild'' file executable and start the building process: 
- 
-<code> 
-# chmod +x Terminal.SlackBuild 
-# ./Terminal.SlackBuild 
-</code> 
- 
-The script initiates the package compilation. If everything goes as expected, the operation exits with the following message: 
- 
-<code> 
-Slackware package /tmp/Terminal-0.4.8-i486-1.txz created. 
-</code> 
- 
-Now we can install the resulting package: 
- 
-<code> 
-# installpkg /tmp/Terminal-0.4.8-i486-1.txz 
-</code> 
- 
-=== Modifier un paquet officiel === 
- 
-L'intérêt de recompiler un paquet officiel, c'est de pouvoir le modifier, par exemple en ajoutant ou en retirant certaines fonctionnalités. Dans l'exemple suivant, nous allons recompiler le paquet ''audacious-plugins'' pour modifier le lecteur audio Audacious. Celui-ci comporte deux interfaces graphiques au choix, et nous allons en supprimer une. 
- 
-Pour commencer, supprimer le paquet s'il est installé : 
- 
-<code> 
-# removepkg audacious-plugins 
-</code> 
- 
-Ensuite, créer un endroit pour ranger le code source : 
- 
-<code> 
-# cd /root/source 
-# mkdir audacious-plugins 
-# cd audacious-plugins 
-# links mirrors.slackware.com  
-</code> 
- 
-Récupérer le contenu du répertoire ''source/xap/audacious-plugins'' et rendre le script ''audacious-plugins.SlackBuild'' exécutable : 
- 
-<code> 
-# chmod +x audacious-plugins.SlackBuild 
-# ls -lh 
-total 1,4M 
--rw-r--r-- 1 root root 1,4M nov.  24 15:28 audacious-plugins-3.3.1.tar.xz 
--rwxr-xr-x 1 root root 4,0K nov.  24 15:28 audacious-plugins.SlackBuild* 
--rw-r--r-- 1 root root  892 nov.  24 15:28 slack-desc 
-</code> 
- 
-Maintenant, éditer ''audacious-plugins.SlackBuild'' et ajouter une option : 
- 
-<code> 
-... 
-# Configure: 
-CFLAGS="$SLKCFLAGS" \ 
-CXXFLAGS="$SLKCFLAGS" \ 
-./configure \ 
-  --prefix=/usr \ 
-  --libdir=/usr/lib${LIBDIRSUFFIX} \ 
-  --sysconfdir=/etc \ 
-  --mandir=/usr/man \ 
-  --enable-amidiplug \ 
-  --disable-gtkui \          -> ajouter cette option 
-  --program-prefix= \ 
-  --program-suffix= \ 
-  ${ARCHOPTS} \ 
-  --build=$ARCH-slackware-linux 
-... 
-</code> 
- 
-Il ne reste plus qu'à construire et installer le paquet : 
- 
-<code> 
-# ./audacious-plugins.SlackBuild 
-... 
-Slackware package /tmp/audacious-plugins-3.3.1-i486-1.txz created. 
-# installpkg /tmp/audacious-plugins-3.3.1-i486-1.txz 
-</code> 
- 
-=== Choisir les options de compilation === 
- 
-Le script de configuration des sources (plus exactement la ligne à rallonge qui commence par ''./configure'' dans le SlackBuild) affiche souvent un résumé des options activées ou désactivées. Pour interrompre le processus de construction du paquet et afficher ce résumé, on peut temporairement éditer le SlackBuild comme ceci : 
- 
-<code> 
-... 
-# Configure: 
-CFLAGS="$SLKCFLAGS" \ 
-CXXFLAGS="$SLKCFLAGS" \ 
-./configure \ 
-  --prefix=/usr \ 
-  --libdir=/usr/lib${LIBDIRSUFFIX} \ 
-  --sysconfdir=/etc \ 
-  --mandir=/usr/man \ 
-  --enable-amidiplug \ 
-  --program-prefix= \ 
-  --program-suffix= \ 
-  ${ARCHOPTS} \ 
-  --build=$ARCH-slackware-linux 
- 
-exit 1          -> ajouter cette commande pour interrompre le script 
- 
-# Build and install: 
-make $NUMJOBS || make || exit 1 
-make install DESTDIR=$PKG || exit 1 
-...  
-</code> 
- 
-Lancer le script, qui affichera un résumé de la configuration au bout de 
-quelques secondes : 
- 
-<code> 
-# ./audacious-plugins.SlackBuild 
-... 
-Configuration: 
-   
-... 
- 
-Interfaces 
----------- 
-GTK (gtkui):                            yes 
-Winamp Classic (skins):                 yes 
-</code> 
- 
-Les options de configuration sont toutes fournies par le code source lui-même : 
- 
-<code> 
-# tar xvf audacious-plugins-3.3.1.tar.xz 
-# cd audacious-plugins-3.3.1 
-# ./configure --help | less 
-... 
---disable-speedpitch    disable Speed and Pitch effect plugin 
---disable-gtkui         disable GTK interface (gtkui) 
---disable-skins         disable Winamp Classic interface (skins) 
---disable-lyricwiki     disable LyricWiki plugin (default=enabled) 
-... 
-</code> 
- 
-<note tip>Le script se charge déjà de décompresser les sources automatiquement dans ''/tmp''. On peut donc très bien invoquer ''./configure --help | less'' à partir de ce répertoire, sans décompresser les sources dans le répertoire courant.</note> 
- 
-<note>L'activation de certaines fonctionnalités comme par exemple la gestion de certains formats audio propriétaires dépend de la présence de certaines bibliothèques sur le système.</note> 
- 
-Une fois qu'on a choisi toutes les options de configuration, il ne reste plus qu'à supprimer la commande ''exit 1'' du script et lancer la compilation et l'installation : 
- 
-<code> 
-# ./audacious-plugins.SlackBuild 
-... 
-Slackware package /tmp/audacious-plugins-3.3.1-i486-1.txz created. 
-# installpkg /tmp/audacious-plugins-3.3.1-i486-1.txz 
-</code> 
- 
-==== Compiler des paquets tiers ==== 
- 
-Comparé à des distributions comme Ubuntu ou Debian, Slackware n'offre qu'un choix de paquets relativement limité. On en arrivera très vite au point de vouloir installer une application ou une bibliothèque qui n'est pas fournie par la distribution. Dans ce cas, que faire ? 
- 
-Le portail SlackBuilds.org (http://slackbuilds.org) sera sans doute la meilleure adresse pour trouver des paquets tiers. Attention, SlackBuilds.org n'est //pas// un dépôt de paquets binaires. Il s'agit plutôt d'une collection extrêmement bien fournie de scripts de compilation dûment soignés et testés, qui vous permettent de compiler à peu près n'importe quel paquet Slackware en un tournemain.  
- 
-   
-=== Compiler des paquets à partir des scripts de SlackBuilds.org === 
- 
-Dans l'exemple, nous allons compiler et installer le paquet ''cowsay'' à partir des scripts fournis par SlackBuilds.org.  
- 
-Aller dans l'environnement de construction de paquets que nous avons défini plus haut : 
- 
-<code> 
-# cd /root/source 
-</code> 
- 
-À partir de là, télécharger : 
- 
-  - l'archive compressée contenant les scripts pour construire le paquet ; 
-  - l'archive compressée contenant le code source du paquet.  
- 
-Concrètement : 
- 
-<code> 
-# links http://slackbuilds.org 
-</code> 
- 
-  - Dans le champ de recherche en haut à gauche, taper ''cowsay'', placer le curseur sur ''Search'' et confirmer par <key>Entrée</key>. 
-  - Dans la page des résultats de la recherche, suivre le lien ''cowsay''. 
-  - Sur la page de ''cowsay'', télécharger le SlackBuild (''cowsay.tar.gz'') et le code source (''cowsay-3.03.tar.gz'') et quitter Links. 
- 
-<note tip>Alternativement, vous pouvez utiliser ''lynx'' au lieu de ''links''.</note> 
- 
-Voici nos deux archives téléchargées : 
- 
-<code> 
-# ls -l cowsay* 
--rw-r--r-- 1 root root 15136 nov.  25 08:14 cowsay-3.03.tar.gz 
--rw-r--r-- 1 root root  2855 nov.  25 08:14 cowsay.tar.gz 
-</code> 
- 
-Décompresser l'archive contenant les scripts : 
- 
-<code> 
-# tar xvzf cowsay.tar.gz  
-cowsay/ 
-cowsay/cowsay.SlackBuild.patch 
-cowsay/README 
-cowsay/slack-desc 
-cowsay/cowsay.SlackBuild 
-cowsay/cowsay.info 
-</code> 
- 
-À la limite, on peut faire un peu de ménage et supprimer l'archive qui ne sert plus à rien : 
- 
-<code> 
-# rm -f cowsay.tar.gz 
-</code> 
- 
-Puis, déplacer le code source dans le répertoire nouvellement créé : 
- 
-<code> 
-# mv -v cowsay-3.03.tar.gz cowsay/ 
-« cowsay-3.03.tar.gz » -> « cowsay/cowsay-3.03.tar.gz » 
-</code> 
- 
-Voici ce que l'on doit avoir : 
- 
-<code> 
-# tree cowsay 
-cowsay 
-|-- cowsay-3.03.tar.gz 
-|-- cowsay.info 
-|-- cowsay.SlackBuild 
-|-- cowsay.SlackBuild.patch 
-|-- README 
-`-- slack-desc 
-</code> 
- 
-Changer dans le répertoire, vérifier éventuellement si le script ''cowsay.SlackBuild'' est bien exécutable, puis exécuter ce script pour lancer la construction du paquet : 
- 
-<code> 
-# cd cowsay/ 
-# ls -l cowsay.SlackBuild 
--rwxr-xr-x 1 kikinovak users 1475 mai   27  2010 cowsay.SlackBuild* 
-# ./cowsay.SlackBuild 
-... 
-</code> 
- 
-Là encore, si tout se passe bien, l'opération produit un paquet dans ''/tmp'', et plus exactement dans le répertoire ''$OUTPUT'' défini par le script : 
- 
-<code> 
-... 
-Slackware package /tmp/cowsay-3.03-noarch-1_SBo.tgz created. 
-</code> 
- 
-Il ne reste qu'à installer ce paquet avec ''installpkg'' : 
- 
-<code> 
-# installpkg /tmp/cowsay-3.03-noarch-1_SBo.tgz  
-# cowsay Et voilà !  
- ------------- 
-< Et voilà ! > 
- -------------  
-        \   ^__^ 
-          (oo)\_______ 
-            (__)\       )\/\ 
-                ||----w | 
-                ||     || 
-</code> 
- 
-=== Gérer les dépendances de paquets === 
- 
-Certains paquets nécessitent la présence d'autres paquets sur le système pour compiler (//build dependencies//) et/ou fonctionner (//runtime dependencies//) correctement. Dans certains cas, un paquet requis peut lui-même dépendre d'autres paquets, et ainsi de suite.  
- 
-À titre d'exemple, jetons un oeil sur la page de ''libgnomeprint'' de SlackBuilds.org. La description du paquet est suivie d'un avertissement : 
- 
-<code> 
-This requires: libgnomecups. 
-</code> 
- 
-Chaque collection de scripts contient par ailleurs un fichier ''*.info'' qui explicite le ou les paquets requis. Jetons un oeil sur le fichier ''libgnomeprint.info'', et nous y trouvons un champ ''REQUIRES'' : 
- 
-<code> 
-PRGNAM="libgnomeprint" 
-VERSION="2.18.8" 
-HOMEPAGE="http://www.gnome.org" 
-... 
-REQUIRES="libgnomecups" ----> dépendances du paquet 
-... 
-</code> 
- 
-<note>Le champ ''REQUIRES'' a été introduit depuis Slackware 14.0.</note> 
- 
-Cela signifie tout simplement qu'avant de construire le paquet ''libgnomeprint'', nous devons impérativement construire et installer le paquet ''libgnomecups''. 
- 
-En dehors des dépendances requises, un paquet peut également présenter des dépendances optionnelles, qui ajoutent certaines fonctionnalités. L'éditeur Leafpad, par exemple, peut être construit avec les dépendances optionnelles ''libgnomeprint'' et ''libgnomeprintui''. 
  
 ==== Gérer les paquets tiers confortablement avec sbopkg ==== ==== Gérer les paquets tiers confortablement avec sbopkg ====
 wiki:user:kikinovak ()