home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


Book HomeMac OS X for Unix GeeksSearch this book

6.2. Creating Fink Packages

You can create your own Fink packages by identifying a source archive and creating a .info file in your /sw/fink/dists/local/main/finkinfo directory.

6.2.3. Creating the .info File

Next, you need a .info file to tell Fink where to download the package and how to install it. Fink can use this information to download, extract, and compile the source code, and then generate and install a Debian package (.deb file). To create the file in /sw/fink/dists/local/main/finkinfo, you'll need superuser privileges (use the sudo utility to temporarily gain these privileges). Example 6-3 shows hellow-1.0.info.

Example 6-3. The hellow-1.0 info file

Package: hellow
Version: 1.0
Revision: 1
Source: file:///Users/Shared/%n-%v.tar.gz
CompileScript: make
InstallScript: mkdir -p %i/bin
 cp %n %i/bin
 mkdir -p %i/share/man/man1
 cp %n.1 %i/share/man/man1/%n.1
Description: Hello, World program
DescDetail: <<
Prints a friendly greeting to you and your friends.
<<
License: Public Domain
Maintainer: Brian Jepson <bjepson@oreilly.com>

The hellow-1.0.info file includes several entries, described in the following list. See the Fink Packaging Manual on http://fink.sourceforge.net/doc/packaging/ for more details.

Package
The name of the package.

Version
The package version.

Revision
The package revision number.

Source
The URL of the source distribution. You can use percent expansion in the name. (In this example, %n is the name of the package and %v is the package version.) See the Fink Packaging Manual for more percent expansions.

CompileScript
The command (or commands) needed to compile the source package. The command(s) may span multiple lines, but must begin after the colon.

InstallScript
The command (or commands) that install the compiled package. The command(s) may span multiple lines, but must begin after the colon.

Description
A short description of the package.

DescDetail
A longer description of the package, enclosed with << >>.

License
The license used by the package. See the Fink Packaging Manual for information on available licenses.

Maintainer
The name and email address of the maintainer.



Library Navigation Links

Copyright © 2003 O'Reilly & Associates. All rights reserved.