summaryrefslogtreecommitdiff
path: root/INSTALL
blob: 9ac13c9baf882083ae93efdf33f72009ac6a06f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
Installation of libretools is pretty straight-forward:

  $ make
  # make install

As a caveat, by default, if the directory `devtools-par` exists in the
same directory as the `libretools-${version}` directory, and contains
newer files than the libretools directory, they will be copied into
the libretools directory.  See INSTALL-VCS for more details.


Dependencies
------------

Unlike a lot of software, run-time dependencies are not required at
build-time.

Libretools is mostly shell scripts.  It very specifically targets
Parabola GNU/Linux-libre; there are a lot of dependencies, most of
which are undocumented.  Switching away from a GNU user-land is bound
to cause issues.

## Build dependencies

The "unusual" build-time dependencies are:

-------------------------------------------------------------------------------------------
| build dependency | parabola package | notes                                             |
|------------------|------------------|---------------------------------------------------|
| devtools-par     | n/a              | https://git.parabola.nu/packages/devtools-par.git |
| GNU Make         | 'make'           | strict requirement of the AutoThing build system  |
| sed              | 'sed'            | must support Extended Regular Expressions         |
| ronn             | 'ruby-ronn'      | a markdown-to-manpage converter                   |
-------------------------------------------------------------------------------------------

At this time, the build system does not support not building the
documentation; ronn is required.

Additionally, other usual "core utilities" are required:

    cat, chmod, cp, echo, false, find, install, ln, msguniq, rm, tr,
    xgettext

Also, `/bin/sh` must support `{brace,expansion}`.  If it doesn't, find
a shell that does, and configure `make` to use it.  Though, because
libretools is mostly shell scripts, if you deviate too much from a GNU
command-line environment, I suspect that you will run into more
issues.  If I were targeting anything other than Parabola, this would
be a bigger issue.

## Test suite dependencies

If you wish to run the test suite, you will need the "roundup" shell
unit testing program.  On Parabola GNU/Linux-libre it is called
"sh-roundup".  If your operating system doesn't have it, it is
available at <http://bmizerany.github.io/roundup/>.

## Run-time dependencies

Being mostly shell scripts, many external program are used.  The
dependencies of the Parabola GNU/Linux 'parabola-base' meta-package,
are assumed to be implicit dependencies of this script.  If something
isn't used now, that doesn't mean it won't be in the future.

Additionally, the following per-subpackage dependencies are needed:

----------------------------------------------------------------------------------------------
| librelib dependency   | parabola package  | usage                                          |
|-----------------------|-------------------|------------------------------------------------|
| wget                  | 'wget'            | (optional) used by `blacklist.sh`              |
----------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------
| gitget dependency     | parabola package  | usage                                          |
|-----------------------|-------------------|------------------------------------------------|
| git                   | 'git'             | core functionality                             |
| librelib              | provided          | ubiquitous use of `librelib` confs and helpers |
----------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------
| libretools dependency | parabola package  | usage                                          |
|-----------------------|-------------------|------------------------------------------------|
| arch-install-scripts  | 'base'            | used by `mkarchroot`->`pacstrap`               |
| binutils              | 'binutils'        | used by `libremakepkg`->`makepkg`->`strip`     |
| expac                 | 'expac'           | used by `libredbdiff`                          |
| fakeroot              | 'fakeroot'        | used by `libremakepkg`->`makepkg`->`fakeroot`  |
| gitget                | provided          | used by `createworkdir`                        |
| librelib              | provided          | ubiquitous use of `librelib` confs and helpers |
| GNU Make              | 'make'            | used by `librefetch`                           |
| pacman >= v5.0        | 'base'            | used by `libremakepkg`->`makepkg`              |
| pacman-contrib        | 'pacman-contrib'  | used by `librefetch`->`updpkgsums`             |
| namcap                | 'namcap'          | used by `libremakepkg` (currently dissabled)   |
| rsync                 | 'rsync'           | used by `librerelease`,`makechrootpkg.sh`      |
| ssh client            | 'openssh'         | used by `librerelease`                         |
| subversion            | 'subversion'      | used by `diff-unfree`                          |
| systemd               | 'libre/base'      | used by arch-nspawn->systemd-nspawn            |
| chroot-nspawn         | 'nonsystemd/base' | used by arch-nspawn->systemd-nspawn            |
| tokyocabinet          | 'tokyocabinet'    | used by `toru`                                 |
----------------------------------------------------------------------------------------------


Configuration
-------------

This is not a GNU package, there is no `./configure` script.

There are two ways to set configuration variables:
 1. Edit config.mk
 2. Pass `VARIABLE=VALUE` to `make`

The configuration variables mostly match GNU packages, but default
values differ; libretools installs to `prefix=/usr` by default instead
of GNU's `prefix=/usr/local`.


Building and installing subpackages
-----------------------------------

There are several sub-packages you can build and install.

 - gitget     -- A git downloader
 - librelib   -- Generic libraries included
 - libretools -- The main libretools package

This is done by running:

  $ make build-<SUBPACKAGE>
  # make install-<SUBPACKAGE>

In addition to `build-*` and `install-*`, there are these general activities:

 - `copy`    -- copy necessary files from the devtools-par source code
 - `build`   -- build all programs and files
 - `clean`   -- remove generated files
 - `install` -- install everything