blob: d5aeb455f14a28764434670dab89355dd8dc3962 [file] [log] [blame]
Benno Schulenberg95253232016-11-20 18:01:40 +01001INSTRUCTIONS FOR COMPILING AND INSTALLING NANO FROM GIT
2=======================================================
Jordi Mallach90453192002-01-23 13:20:20 +00003
Benno Schulenberg95253232016-11-20 18:01:40 +01004The latest changes and fixes for GNU nano are available via git, but
5building this needs a bit more care than the official tarballs.
Jordi Mallach90453192002-01-23 13:20:20 +00006
David Lawrence Ramsey5c8d3162006-06-25 04:37:05 +00007
8Prerequisites
9-------------
10
Benno Schulenberg95253232016-11-20 18:01:40 +010011To successfully compile GNU nano from git, you'll need the following
David Lawrence Ramseydb85ac72004-10-18 14:13:28 +000012packages:
Jordi Mallach90453192002-01-23 13:20:20 +000013
Benno Schulenberg0eefd2c2016-06-04 11:27:15 +020014- autoconf (version >= 2.61)
15- automake (version >= 1.7)
Benno Schulenberg95253232016-11-20 18:01:40 +010016- autopoint (version >= 0.11.5)
Benno Schulenberg0eefd2c2016-06-04 11:27:15 +020017- gettext (version >= 0.11.5)
18- git (version >= 2.7.4)
19- groff (version >= 1.12)
Benno Schulenbergf390eb82016-06-04 11:20:29 +020020- pkg-config (version >= 0.22)
Benno Schulenberg0eefd2c2016-06-04 11:27:15 +020021- texinfo (version >= 4.0)
Benno Schulenberg95253232016-11-20 18:01:40 +010022- gcc (any version)
23- make (any version)
24
25If you want UTF-8 support, you will also need libncursesw5-dev installed
David Lawrence Ramsey87fbe242016-11-27 16:55:46 -060026(version >= 5.7), or libslang2-dev (version >= 2.0) if you use --with-slang.
27If your system doesn't have 'snprintf' or 'vsnprintf' (which the configure
28script will check for), you will also need glib-2.x installed.
Jordi Mallach90453192002-01-23 13:20:20 +000029
Benno Schulenberg0eefd2c2016-06-04 11:27:15 +020030These should all be available in your distro's package manager or software
Benno Schulenberg95253232016-11-20 18:01:40 +010031center, or otherwise on any GNU mirror.
Jordi Mallach90453192002-01-23 13:20:20 +000032
David Lawrence Ramsey5c8d3162006-06-25 04:37:05 +000033
34Download the source
35-------------------
36
Benno Schulenberg95253232016-11-20 18:01:40 +010037To obtain the current nano development branch (called 'master'), use the
38following command. It will create in your current working directory a
39subdirectory called 'nano' containing a copy of all of the files:
David Lawrence Ramsey831c6402004-11-21 18:44:23 +000040
Chris Allegretta5cb3f092016-04-04 18:08:32 -040041 $ git clone git://git.savannah.gnu.org/nano.git nano
David Lawrence Ramseyb75763e2004-11-21 17:45:25 +000042
David Lawrence Ramsey35bd3502007-01-28 19:49:05 +000043
David Lawrence Ramsey5c8d3162006-06-25 04:37:05 +000044Generate the configure script
45-----------------------------
46
47Once you have the sources in the "nano" directory,
48
49 $ cd nano
50 $ ./autogen.sh
51
52This will set up a configure script and a Makefile.in file.
53
54
55Configure your build
56--------------------
57
58To configure your build, run the configure script from the nano source
59directory:
60
61 $ ./configure [--add-options-here]
62
63
64Build and install
65-----------------
66
67From the nano source directory, build the code with:
68
69 $ make
70
Mike Frysinger5cda85c2016-04-04 18:46:21 -040071Then, once it's done compiling, run:
David Lawrence Ramsey5c8d3162006-06-25 04:37:05 +000072
73 $ make install
74
David Lawrence Ramseyb159f942006-07-28 17:06:27 +000075which should copy various files (i.e. the nano executable, the info and
David Lawrence Ramsey5c8d3162006-06-25 04:37:05 +000076man pages, and syntax highlighting pattern files) to their appropriate
77directories.
78
79If you're installing into the default install directory (/usr/local),
80you'll need to run that "make install" command with root privileges.
81
82
83Problems?
84---------
Jordi Mallach90453192002-01-23 13:20:20 +000085
Benno Schulenberg3e40e5d2016-08-25 19:34:10 +020086Please submit any bugs you find in the code in git via the bug tracker
87on Savannah (https://savannah.gnu.org/bugs/?group=nano).
88
89
90Contributing something
91----------------------
92
93If you have a fix for a bug, or the code for a new or improved feature,
94first create a branch off of master:
95
96 $ git checkout -b somename
97
98Then change the code so it does what you want, and commit it, with in the
99commit message (after the one-line summary) a rationale for the change:
100
101 $ git commit -as
102
103Then create a patch (or patches):
104
105 $ git format-patch master
106
107Send that patch (or patches) to <nano-devel@gnu.org>, as an attachment
108or with git send-email.