HaikuPorts
  • Login
  • Preferences
  • Help/Guide
  • Wiki
  • Timeline
  • Roadmap
  • View Tickets
  • Search
  • Port Log
  • Blog

Context Navigation

  • ← Previous Change
  • Wiki History
  • Next Change →

Changes between Initial Version and Version 1 of WritingBepFile


Ignore:
Timestamp:
01/20/13 00:04:49 (2 years ago)
Author:
passick
Comment:

Initial article

Legend:

Unmodified
Added
Removed
Modified
  • WritingBepFile

    v1 v1  
     1This article gives basic overview of writing a .bep file for haikuporter. Prior to reading it, you are advised to read BepFile article. This entry assumes that you have read and understood it. 
     2 
     3== BepFile name == 
     4 
     5BepFile should be named as "Program name"-"Program version".bep format, e.g. `transmission-2.75.bep`, `curl-7.28.1.bep`. Also some additional information can be added to the filename. An example of that case is `libsdl-2.0-hg-cmake.bep` file. From it's name we can notice that version to be built with cmake is going to be downloaded from sdl's mercurial server. 
     6 
     7== How HaikuPorter works == 
     8 
     9HaikuPorter works as follows: 
     10 
     11* Process the arguments passed 
     12* Search for the specified package in ports tree 
     13* Read data from BepFile 
     14* If port is not stable, then warn the user 
     15* Print the `MESSAGE` string from the bep 
     16* Clean the work directory (it is the directory where the downloaded package is unarchived, all the patching and compilation is being done there) (*) 
     17* Warn user about the port dependencies 
     18* Download the sources 
     19* Check that downloaded file's checksum matches with the one specified in the `CHECKSUM_MD5` field of the BepFile (if it is not empty) 
     20* Unpack sources to the work directory 
     21* Patch sources (*) 
     22* Build port (*) 
     23* Install port (*) 
     24* Make redistributable package (*) 
     25* Macke patched archive (*) 
     26* Test the port (*) 
     27 
     28Items marked with (*) are controlled by the commandline arguments, default behaviour is to patch and build. 
     29 
     30== Writing BepFile == 
     31 
     320. Read porting Guidelines 
     331. Download the sources of program you want to build 
     342. Unpack them 
     353. Try to build them 
     36  a. If building fails, find the reason why it does and what files have to be edited in order to be able to be built on Haiku 
     37    * If you cannot solve the problem, create a ticket at the [http://ports.haiku-files.org trac] and add the refernece to it from the PortLog using TracLinks 
     38  b. [#patchfile Make a patch] 
     39  c. If some additional packages are needed prior to building this program, specify them in the `DEPEND` section 
     406. Try installing the package 
     41  a. If it fails, find the reason why and fix it 
     42  b. [#patchfile Make a patch] 
     437. Write `BUILD` section of your BepFile reflecting the steps you have made 
     44  * Don't forget that by default the `BUILD` script is launched from the work directory, so you possibly need to cd in the beginning 
     458. Write `INSTALL` section 
     46  * When adding paths to the BepFile, don't hardcode them. Use [wiki:FindDirectory finddir] instead 
     479. If program has tests, write `TEST` section 
     4810. Add miscellaneous info 
     49  * `DESCRIPTION`, `COPYRIGHT`, `LICENSE` sections can be found on the program's website 
     50  * To calculate `CHECKSUM_MD5` use md5sum utility 
     51  * If gcc4 or gcc2 is mandatory needed in order to compile this program, add warning in the `MESSAGE` section ([http://ports.haiku-files.org/browser//haikuports/trunk/net-p2p/transmission/transmission-2.75.bep example]) 
     52  * You may add multiple links in the `SRC_URI` variable. HaikuPorter will try all of them in the order they are specified, until the working one is found ([http://ports.haiku-files.org/browser//haikuports/trunk/dev-lang/fpc/fpc-2.6.0.bep example]) 
     5311. Open ticket at the [http://ports.haiku-files.org trac] if it is not created yet 
     5412. Add your bep, patch and license files to the ticket 
     55 
     56== License file == 
     57 
     58If project you are porting has license that hasn't been added yet to the haiku's default list of licenses, make a text file with the name of this license containing it's text and add it to the license folder in BepFile's dir ([http://ports.haiku-files.org/browser//haikuports/trunk/app-misc/figlet example]). 
     59 
     60== Patch file == #patchfile 
     61 
     62Patch file should be named same as the .bep, except that it has to have .patch extension and be located in the patch directory ([http://ports.haiku-files.org/browser//haikuports/trunk/games-action/bzflag example]). For more info about creating patch files consult CreatePatch. 

Trac Powered

Powered by Trac 0.13dev-r10686
By Edgewall Software.

Visit the Trac open source project at
http://trac.edgewall.org/