This tutorial is only a snapshot, since the package management system for Haiku is still in development. It may happen, therefore, so that this description in the foreseeable future no longer works as described. We will of course try the tutorial to keep up to date. 

In addition, you should think about when creating HPKG files because these to the package management system, although work on the basis of work today, but this is not guaranteed for the future.


 

Index


 

What is a Haiku Package (HPKG)?

A haiku package is an installation file for the Haiku operating system. By HPKG file an installation of a program is very easy, because you only need to copied it to a fixed point in the system, and then it installs automatically.

back to Index


 

How to install a Haiku package?



To install a Haiku package, you just copied it to:

/boot/home/config/packages


If there is no error message, the package is installed (Unfortunately, there is no notification about a correct installation).

After the program, according to the packet structure to be found in the system. Is there no description included, watch first at /boot/home/config/apps if you can found it here.

If there are problems with the installation, this from the package management system will be displayed.

  • don't activate package...: With this setting the package will be placed in the package folder, but not installed.
  • ignore problem for now: The package will be removed from the package folder.


back to Index


 

How to create a Haiku package? 

In this tutorial we create a haiku package for our HPKGCreator.



To create a Haiku package, make first a new folder on a place of your choice (here hpkg on the Desktop).

In this directory we create a directory named apps.

Now change into the apps folder and create a folder named by the program (here HPKGCreator).

Then copy the program file into this directory.

At the time of this tutorial free spaces are not supported in the program name!


Now go back to the start directory in which you have the apps directory created.

If your program will need additional files, add the needed directories too (e.g. add-ons).

All contents of Haiku Package files are starting from the /boot/home/config directory installed.


Then copy the corresponding files in the created directories.



Now we create in the start directory a new text file called .PackageInfo.

In this text file, we write various information about the program:

name                HPKGCreator 
 version              0.2-1 
 architecture       x86_gcc2 

 summary          "A HPKG Creator" 
 description        "Program to create HPKG files" 
 packager           "Lelldorin <This email address is being protected from spambots. You need JavaScript enabled to view it.>" 
 vendor               "Lelldorin" 

 copyrights         "BeSly Software Solutions" 
 licenses            "Artistic" 

 provides { 
         HPKGCreator = 0.2-1 
} 
  • name: Name of the program
  • version: Version and revision number of the program
  • architecture: Architecture of the system on which the program was compiled
  • summary: Short description of the program
  • description: Description of the program
  • packager: Name of the person who created the package
  • vendor: Name of person or company who are the vendor of the program
  • copyrights: Owner of the copyrights
  • licenses: License of the program
  • provides: Here, the name and the version number is specified


After we have create the .PackageInfo file we starting to create the package file. Now open a Terminal, you can found it in the Applications menu.

cd /boot/home/Desktop/hpkg 


First we change into the start directory. For this purpose, we use the command cd.

package create -b HPKGCreator.hpkg 


Then we create the haiku package.

package add HPKGCreator.hpkg apps 


Then we copy all directories from the start directory into the package file.

If we now have several directories in the start directory, and not just the directory apps as in our example, we would add them with a free space separated (example: package add HPKGCreator.hpkg apps add-ons...).


back to Index


 

How to uninstall a Haiku package?

To uninstall a haiku package, it can be directly removed from the /boot/home/config/packages directory, or you can uses Haiku Depot.

With Haiku Depot should you later install all kinds of programs, drivers, etc. with just one click on a button, and now you can uninstall it too.

Sience the Haiku packages are similar build like HaikuDepot uses data, you can manage programs, installed by hand with it.



To open HaikuDepot select in the Applications menu HaikuDepot.



Search for the program and use the Uninstall button to uninstall it.

back to Index


 

Other sources



back to Index


Tutorial by Christian Albrecht (Lelldorin) May 2014
Made available by BeSly, the Haiku knowledge base.