Guidelines for building CRUX ports

Pkgfile header

To simplify the tasks of maintaining ports repositories and processing Pkgfiles with tools to create overviews, statistics, lists etc., here are some guidelines what headers should contain and what it's structure should be. There are three sections:

1. Mandatory Fields (Fixed Syntax)

 # $Id: $ 
 # Packager: Joe User <joe.user@joeuserweb.net>
 # Maintainer:
 # Description: [single line]
 # URL: http://product.hoster.org

FieldDescription
$Id: $This will be replaced by CVS
Packager:Name and URL of the packager
Maintainer:This field should be left empty, it will be filled out when a maintainer picks up the package
Description:A short description of the port. Should be no longer than one line
URL:Website with more information about the port

2. Optional Fields (Fixed Syntax)

 # Group: group_name
 # Depends on: package1, package2, package3...

FieldDescription
Group:
Use the "Group" field to combine multiple packages to a group. Each package can only be part of one group
Depends on:
A comma separated list of ports this port depends on, on one line. The packages listed here must be in the ports tree with exactly this name. If you have to specify more information like minimal version, do this in the "Random Additions" section, not here. You should specify only direct dependencies (e.g. if A relies on B and B on C, A should not list C as a dependency). List all dependencies you know, even if they seem obvious (like xfree86 for a window manager). You can omit basic packages from base or opt if you are really sure they are installed everywhere (e.g. like zlib, unlike reiserfsprogs).
Note that you don't have to provide a dependency listing, but if you do make sure it's ok

3. Random Additions (Free Syntax)

 # This package is blah blah...
 # Make sure the environment variable $BLAH is set...

you can add any comments here. Try to avoid patterns which could be wrongly parsed as one of the fields above (like "# desc: " etc.)

Example:

 # $Id: $ 
 # Description: KDE Libraries.
 # URL: http://www.kde.org
 # Maintainer:
 # Packager: Daniel Mueller <danm@gmx.li>
 # Depends on: qt3, arts, libxml2, libxslt, libjpeg, libpng
 # Group: kde

 name=kdelibs
 version=3.0.1
 release=1
 source=(ftp://ftp.fu-berlin.de/pub/unix/X11/gui/kde/stable/3.0.1/src/$name-$version.tar.bz2)

 build () {
     cd $name-$version
     ./configure --prefix=/usr --without-alsa \
                 --with-ipv6-lookup=auto --with-ssl \
                 --with-xinerama --enable-mitshm \
                 --enable-final
     make
     make DESTDIR=$PKG install
     cp kab/{kabapi.h,addressbook.h} $PKG/usr/include/
     cp kab/.libs/libkab.a $PKG/usr/lib/
     rm $PKG/usr/include/ltdl.h
     rm -rf $PKG/usr/share/doc $PKG/usr/share/apps/LICENSES
     strip $PKG/usr/bin/*
     gzip -9 $PKG/usr/man/man?/*
 }

General Guidelines

Make sure you also read the official guidelines on how to create ports for CRUX: http://www.fukt.bth.se/~per/crux/doc/handbook.html#Package-Guidelines


Copyright © 2002-07-06 Johannes Winkelmann Valid HTML 4.01!