1 Installation instructions
2 =========================
5 Download a tarball from http://jonas.nitro.dk/tig/releases[] or clone the Tig
6 repository http://github.com/jonas/tig[git://github.com/jonas/tig.git].
8 NB: Do not use tig-2.0.tar because it will fail to compile due to these issues https://github.com/jonas/tig/pull/283 and https://github.com/jonas/tig/issues/337
10 The quick and simple way to install Tig is:
15 By default, `tig` is installed in `$HOME/bin`. To install `tig` elsewhere set
16 `prefix` to the desired path:
18 $ make prefix=/usr/local
19 $ sudo make install prefix=/usr/local
21 Documentation files, such as manpages, are distributed in the release tarballs,
22 and can be installed using:
26 When installing directly from the Tig repository, `make install-doc` will assume
27 that the documentation tool chain is available and build the documentation
28 locally. In case you do not wish to install the required tools, documentation
29 can be installed from the 'release' branch using:
31 $ make install-release-doc
33 Before upgrading, you are advised to read link:NEWS.{docext}[the release notes].
35 Installation using `configure`
36 ------------------------------
38 Optionally, you can use the `configure` script to detect dependencies:
44 If your `iconv` library is not in the default library and include path, you need
45 to pass the `--with-libiconv` option to `configure` to tell it where to look.
47 Note, if you are building from the Tig repository, you need to generate
48 `configure` yourself. First, ensure that `autoconf` is installed on your system,
49 and then run the following command:
53 Installation using Homebrew
54 ---------------------------
55 You can use link:http://brew.sh[Homebrew] to install Tig on OS X:
62 Build settings are read from the file `config.make` and for certain systems also
63 from `contrib/config.make-$kernel`. An example of the latter is Mac OS X, where
64 `contrib/config.make-Darwin` provides out-of-the-box configuration for using the
65 system ncurses library and linking with the iconv library. This makes it easy to
66 configure the build without having to use the `configure` script. As a side
67 note, `configure` itself generates a `config.make` file.
69 Apart from the different standard `make` build variables (`CC`, `CFLAGS`, etc.)
70 and standard `configure` variables (`prefix`, `bindir`, etc.), build settings
71 can be one of the following flags:
73 - `NO_SETENV`: Define this variable to enable work-around for missing
75 - `NO_MKSTEMPS`: Define this variable to enable work-around for missing
77 - `NO_BUILTIN_TIGRC`: Reduce the size of the binary by not including a
78 built-in tigrc. The built-in tigrc is used as a fallback when no
79 `tigrc` is found in the system configuration directory (e.g. `/etc`).
81 The following example `config.make` manually configures Tig to use the ncurses
82 library with wide character support and include the proper ncurses header file
83 (see tig.h for more information):
86 CPPFLAGS = -DHAVE_NCURSESW_CURSES_H
88 For more examples of build settings, see `contrib/config.make` and
94 The following tools and packages are needed:
96 [cols="2<,8<",options="header"]
97 |=============================================================================
99 |git-core |Tig is just a frontend for Git.
100 |ncurses or ncursesw |Be sure to have the development files
101 installed. Usually they are available in a
102 separate package ending with `-dev`.
104 Ncurses with wide character support (ncursesw)
105 is required to properly handle UTF-8 encoded
108 Note for packagers: For Tig's `configure`
109 script to work as expected you should avoid
110 configuring and building ncurses using
112 |iconv |If iconv is not provided by the c library
113 you need to change the Makefile to link it
115 |=============================================================================
117 The following tools and packages are optional and mainly needed for creating the
118 configure script and building documentation:
120 [cols="2<,8<",options="header"]
121 |=============================================================================
123 |readline |Adds support for completion and history in
124 search and command prompts.
125 |autoconf |Contains autoreconf for generating configure
127 |asciidoc (>= 8.4) |Generates HTML and (DocBook) XML from text.
128 |xmlto |Generates manpages and chunked HTML from XML.
129 |DocBook XSL (>= 1.72.0) |Used by xmlto for building manpages.
130 |DocBook (DSSL/Jade) tools |Generates PDF from XML.
131 Also known as docbook-utils.
132 |=============================================================================