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.

Creating and Publishing the Tarball

The Fink package system needs a tarball that can be downloaded with the curl utility. To illustrate how to create a Fink package, let’s use the hellow-1.0 program (see Section 12.1 earlier in this chapter). Before you proceed, you should create a tarball named hellow-1.0.tar.gz with the following contents, and move it to the /Users/Shared/hellow/src directory:

hellow-1.0/
hellow-1.0/hellow.1
hellow-1.0/hellow.c
hellow-1.0/Makefile

The curl utility can download this file with the following URL: http://www.jepstone.net/downloads/hellow-1.0.tar.gz. (You could also host your own files on a public web server, FTP server, or a local filesystem by using file: URL.)

Creating the .info File

Next, create a .info file to tell Fink where to download the package from and how to install it. Fink uses this information to download, extract, and compile the source code, and then to generate and install a Debian package (.deb file). This file must be in /sw/fink/dists/local/main/finkinfo, so you’ll need superuser privileges to create it (use the sudo utility to temporarily gain these privileges). Example 12-4 shows /sw/fink/dists/local/main/finkinfo/hellow-1.0.info.

Example 12-4. -The hellow-1.0 info file

Package: hellow Version: 1.0 Revision: 1 Source: http://www.jepstone.net/downloads/%n-%v.tar.gz ...

Get Mac OS X Panther for Unix Geeks, Second Edition 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.