[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

Ceci est une ancienne révision du document !


Créer un paquet en utilisant un script SlackBuild

Présentation

Il peut se faire que vous vouliez vraiment utiliser une application alors qu'elle n'est pas disponible dans le dépôt de Slackware. En pareil cas vous avez plusieurs options, l'une d'entre elles est d'employer un script SlackBuild pour faire un paquet de l'application à installer. Voilà ce que ce tutoriel va s'efforcer de vous apprendre.


Utiliser un script SlackBuild

Une des premières choses que je fais sur chacune de mes installations Linux, c'est de créer un répertoire caché nommé .build dans mon répertoire /home. Je l'utilise essentiellement pour compiler des applications à la main, ou dans le cas de Slackware, pour installer des scripts SlackBuild (voir Fig 1).

Figure 1 – /home/<user>/.build

Bien, allons-y maintenant. La première chose à faire est d'atteindre SlackBuilds.org avec votre navigateur préféré. Dans la petite zone de recherche, en haut à droite, saisissez le nom de l'application que vous cherchez. Pour ce tutoriel, nous allons utiliser PysolFC, un paquet de plusieurs jeux. Dès que la recherche a abouti, vous êtes à pysolfc SlackBuild page (voir Fig 2).

Figure 2 – Pysolfc SlackBuild Page

Now, the next thing you’ll need to do is download the source (PySolFC-1.1.tar.bz2) and the SlackBuild (pysolfc.tar.gz) into your .build directory (or wherever you want to build your stuff). Untar the SlackBuild script from the command line using this command:

$ tar -xvf pysolfc.tar.gz

Or you can unpack it using your favorite graphical decompression application, like Ark or Xarchiver… use whatever you’re comfortable with.

You’ll now have an uncompressed directory called “pysolfc”. Move the source directory (PySolFC-1.1.tar.bz2) that you downloaded previously into your newly uncompressed pysolfc directory. That’s right. Just grab and drag that source directory right on into the pysolfc directory (see Fig 3).

Figure 3 – Inside the Pysolfc Directory

  • Open your terminal application (Gnome Terminal, Konsole, etc.)
  • Type the following command to make the pysolfc SlackBuild script executable:

$ chmod +x pysolfc.SlackBuild

  • As root (to install globally on your Slackware system so all users can access), type the following command:

# ./pysolfc.SlackBuild

  • If all went well, the SlackBuild script will have created a .tgz package in your /tmp directory. Navigate to the /tmp directory in the terminal:

# cd /tmp

  • Check to see what’s there:

# ls

  • You should see a file called pysolfc-1.1-i486-2_SBo.tgz. Install it using Slackware’s native pkgtool:

# installpkg pysolfc-1.1-i486-2_SBo.tgz

That's it. You'll now find PysolFC in your menu (in Xfce).

Sources

Ce how-to est une version mise en forme de CETTE source originale. Des Copyrights peuvent s'appliquer à l- original. L'auteur autorise ce site à utiliser son document sous cette forme modifiée.

 fr:howtos:slackware_admin:creating_a_package_using_a_slackbuild_script ()
Cette traduction est plus ancienne que la page originale et est peut-être dépassée. Voir ce qui a changé.