This is alpha software. Use at your own risk! |
Requirements
There are several things you need to build and run clicraft. These dependencies are described below.
The versions and implementations of tools described in this section are known to work with clicraft. If you have these requirements and are unable to build build and run clicraft with a different or older set of tools, I’d love to hear about it so I can update this document.
Build Dependencies
To build clicraft from source, you need the following:
In order to build the documentation, you will also need this optional dependency:
-
AsciiDoc version 8.8.6 or greater
Runtime Dependencies
Clicraft needs these programs in order to successfully run:
Clicraft has several optional features with these additional dependencies:
Quick Install
The procedure for installing from source, briefly, is
./configure && make && make install
If a package for your distribution is available, you should probably use that instead. If no package is available for your system and you are unable to create one, you may want to read the detailed instructions below for installing from source.
Install
From A Package
Installing from a package with your distribution’s package manager is the recommended and preferred way of installing clicraft. Listed below are the distributions that packages are available for.
- Arch Linux (pacman pkg)
-
Several
PKGBUILD
scripts are available in the AUR. Instructions for creating pacman packages from aPKGBUILD
usingmakepkg
can be found on this ArchWiki page. - Debian, Ubuntu (dpkg/apt deb)
-
A .deb for clicraft can be created in the dist/ directory using
autoconf && ./configure && make deb
. It can then be installed withdpkg -i
. - RHEL, CentOS (yum/rpm)
-
An rpm for clicraft can be created in the dist/ directory using
autoconf && ./configure && make rpm
. It can then be installed withrpm -i
oryum localinstall
. - Other Distributions
-
If your distribution is not listed above, a package is unfortunately not available for you. If are willing and able to package clicraft for your distribution, patches for including your build script in the clicraft source repository are most welcome. Otherwise, you’ll most likely have to install from source.
From Source
Commands in this section are preceded with a $ if they should be run
as a regular unprivileged user, or # if they should be run as root |
The current clicraft codebase can be fetched with
$ git clone git://github.com/DMBuce/clicraft.git
In order to build from a specific branch, you can use
$ git checkout branch
To build a specific version, you can use
$ git checkout version
or download
the zip or tarball from GitHub and extract it into a directory named
clicraft
. If you don’t know what branch or version to use, you can safely
ignore the previous two commands.
For the rest of these instructions, you’ll need to switch directories into the source distribution.
$ cd clicraft
Next, you’ll need to generate a configure
script. This is easily
accomplished with
$ autoconf
At this point, you could install clicraft with these three commands
$ ./configure
$ make
# make install
You may, however, want to read the output of ./configure --help
in order to
set appropriate paths and options for your system. You may also want to make
use of the DESTDIR
make variable in order to perform a staged install. The
procedure for using these features is described for several common scenarios
below.
User installation under $HOME
To install clicraft as a regular user, you should choose an empty directory
under $HOME
that you have write access to.
In this example, I have chosen to install clicraft to the $HOME/clicraft
directory. If that directory does not exist, you can create it using
$ mkdir $HOME/clicraft
Then, you can configure clicraft to be installed to that directory using
$ ./configure --prefix=$HOME/clicraft \
--sysconfdir=$HOME/clicraft/etc \
--libexecdir=$HOME/clicraft/lib \
--localstatedir=$HOME/clicraft/srv \
--enable-shortdirs
Finally, you can install clicraft with
$ make && make install
Install as an Admin to /usr/local
Installing clicraft using this method is not recommended. In most circumstances, installing as a user or with your package manager is the preferred procedure. |
If you are an administrator with root privileges, you can choose to install
clicraft to the system. In most linux distributions, /usr/local
is reserved
for software installed by the administrator, so it is recommended you install
clicraft to this directory. The rest of this section assumes that this is the
directory where you are installing to.
As a regular, unprivileged user (NOT root), run
$ ./configure --prefix=/usr/local \
--sysconfdir=/usr/local/etc \
--libexecdir=/usr/local/lib \
--localstatedir=/var/local
Clicraft’s Makefile supports the DESTDIR
make variable, so you can stage the
installation. To do this, choose a staging directory that you have write
access to. In this example, I have chosen /tmp/staging
. If that directory
does not exist, you can create it using
$ mkdir /tmp/staging
Then, you can stage clicraft for installation. As a regular, unprivileged user (NOT root), run
$ make && make DESTDIR=/tmp/staging install
Now, you can inspect the contents of /tmp/staging
for sanity. Note that at
this time, the clicraft executable won’t actually work. Once you are
satisfied, you can copy the contents of this directory to your system in order
to complete the installation. As root, run something like the following
# cp -R /tmp/staging/* /usr/local
Configuration
At this point, clicraft should be installed and working. If it is, you can get
basic usage info by running clicraft help
. For information on clicraft usage
and configuration, refer to the clicraft(1) and
clicraft.conf(5) man pages.