User Tools

Site Tools


bsd

Crossfire on BSD

Crossfire should compile and run on any BSD variant that supports its various dependencies. Many BSD variants also support automatic package-like installation from source as well as pre-built binary packages. As with any other package management system, the version provided with each variant may lag behind the latest official release.

Sometimes it may be desirable to manually build the latest development sources from SVN. Please refer to the Crossfire Compile Guide as well as the BSD-specific section that follows below.

FreeBSD

Ports (from source)

As root, execute the following commands:

# cd /usr/ports/games/crossfire-server && make install clean
# cd /usr/ports/games/crossfire-client && make install clean

Alternatively, if you prefer to use 'portmaster':

# portmaster games/crossfire-server
# portmaster games/crossfire-client

Or if you wish to use 'portupgrade':

# portinstall games/crossfire-server
# portinstall games/crossfire-client

Crossfire, as well as its dependencies, will automatically be downloaded, patched, configured, built, and installed from source.

Package (pre-built binary)

As root, execute the following commands:

# pkg_add crossfire-server
# pkg_add crossfire-client

Alternatively, if you are using 'pkgng':

# pkg install crossfire-server
# pkg install crossfire-client

Crossfire, as well as its dependencies, will be downloaded and installed from a pre-built binary package.

OpenBSD

At the time of writing (2013/08/12) OpenBSD only carries the X11 client in its ports collection. To install it, execute the following command:

$ sudo pkg_add crossfire-client

NetBSD

To install the server, execute the following commands as root:

# cd /usr/pkgsrc/games/crossfire-server && make install clean

To install the client, execute one of the following commands as root:

# cd /usr/pkgsrc/games/crossfire-client && make install clean
# cd /usr/pkgsrc/games/crossfire-client-gtk && make install clean
# cd /usr/pkgsrc/games/crossfire-client-gtk2 && make install clean

Installing from Sources

WARNING: This section assumes that you have basic working knowledge about compiling software as well about your specific system.

In general, Crossfire can be built and installed much like any other software package. If you have installed software from sources before, then you are in good shape to skip down below. The basic process is to 1) install dependencies, 2) obtain the Crossfire sources, 3) configure the build, 4) build/install, and 5) do a bit of post-installation configuration.

1. Installing Dependencies

Crossfire requires mostly the same dependencies as those listed under the “*nix” section of the Crossfire Compile Guide. Please note that BSD does not split packages into 'devel' and 'non-devel' versions, “python” is just “python”, not “python-devel”. Some dependencies may be omitted if you are only running either the client or the server. If you are running a desktop environment, chances are that most dependencies are already installed for you.

(To be written…)

2. Obtaining the Crossfire Sources

Follow the “Download” instructions in the Crossfire Compile Guide.

3. Configuring the Build

Before you begin, you are strongly recommended to pick a custom directory to install Crossfire in. By default, Crossfire will install itself in '/usr/games/crossfire', which may be used by the base system. To keep everything separate, you should install Crossfire to a custom prefix such as '/opt'.

Crossfire uses GNU Autotools as its build system. If you are installing from SVN, you will need to generate a 'configure' script by running:

$ autoreconf -i

On most Linux distributions, “/bin/sh” is a symbolic link to “/bin/bash”, which implements a superset of the features required by POSIX. A small number of checks in the Crossfire server build system are written using bash-specific features, and thus is required for the 'configure' script to run. You should already have bash installed from the previous sections; after ensuring you have bash installed execute the following command:

$ env CONFIG_SHELL=/usr/local/bin/bash ./configure --prefix ${PUT_YOUR_CUSTOM_PREFIX_HERE}

To configure the client, execute the following command (bash is not needed for the client):

$ ./configure --prefix ${PUT_YOUR_CUSTOM_PREFIX_HERE}

Once complete, the 'configure' script will print a summary of your configuration options. After reviewing these settings, proceed to the next step.

4. Building and Installing

This part is easy; just type 'make install' and go grab yourself a cup of coffee. Crossfire has been tested to build with BSD Make, but in case it fails you can try rebuilding using GNU Make (the default 'make' on Linux) by running 'gmake' instead of 'make'.

5. Post-Installation Configuration

This section is mainly intended for setting up automatic startup scripts. If you don't mind starting the server manually, you may skip this section and configure Crossfire normally.

(To be written…)

bsd.txt · Last modified: 2013/08/12 20:37 (external edit)