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. ...

Get Mac OS X for Unix Geeks now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.