2016-11-20 20:01:40 +03:00
|
|
|
INSTRUCTIONS FOR COMPILING AND INSTALLING NANO FROM GIT
|
|
|
|
=======================================================
|
2002-01-23 16:20:20 +03:00
|
|
|
|
2016-11-20 20:01:40 +03:00
|
|
|
The latest changes and fixes for GNU nano are available via git, but
|
|
|
|
building this needs a bit more care than the official tarballs.
|
2002-01-23 16:20:20 +03:00
|
|
|
|
2006-06-25 08:37:05 +04:00
|
|
|
|
|
|
|
Prerequisites
|
|
|
|
-------------
|
|
|
|
|
2022-04-19 12:11:35 +03:00
|
|
|
To successfully compile GNU nano from git, you'll need the following:
|
|
|
|
|
|
|
|
autoconf (version >= 2.69)
|
|
|
|
automake (version >= 1.14)
|
2024-06-17 10:45:23 +03:00
|
|
|
autopoint (version >= 0.20)
|
2022-04-19 12:11:35 +03:00
|
|
|
gcc (version >= 5.0)
|
2024-06-17 10:45:23 +03:00
|
|
|
gettext (version >= 0.20)
|
2022-04-19 12:11:35 +03:00
|
|
|
git (version >= 2.7.4)
|
|
|
|
groff (version >= 1.12)
|
|
|
|
make (any version)
|
|
|
|
pkg-config (version >= 0.22)
|
|
|
|
texinfo (version >= 4.0)
|
2016-11-20 20:01:40 +03:00
|
|
|
|
2020-10-11 17:29:40 +03:00
|
|
|
You will also need to have the header files for ncurses installed,
|
|
|
|
from libncurses-dev on Debian, ncurses-devel on Fedora, or similar.
|
2016-06-04 12:27:15 +03:00
|
|
|
|
2020-10-11 17:29:40 +03:00
|
|
|
These should all be available in your distro's package manager or
|
|
|
|
software center, or otherwise on any GNU mirror.
|
2002-01-23 16:20:20 +03:00
|
|
|
|
2006-06-25 08:37:05 +04:00
|
|
|
|
2022-04-19 12:11:35 +03:00
|
|
|
Clone the source
|
|
|
|
----------------
|
2006-06-25 08:37:05 +04:00
|
|
|
|
2016-11-20 20:01:40 +03:00
|
|
|
To obtain the current nano development branch (called 'master'), use the
|
|
|
|
following command. It will create in your current working directory a
|
|
|
|
subdirectory called 'nano' containing a copy of all of the files:
|
2006-06-25 08:37:05 +04:00
|
|
|
|
2022-04-19 12:11:35 +03:00
|
|
|
$ git clone git://git.savannah.gnu.org/nano.git
|
2004-11-21 20:45:25 +03:00
|
|
|
|
2007-01-28 22:49:05 +03:00
|
|
|
|
2006-06-25 08:37:05 +04:00
|
|
|
Generate the configure script
|
|
|
|
-----------------------------
|
|
|
|
|
|
|
|
Once you have the sources in the "nano" directory,
|
|
|
|
|
|
|
|
$ cd nano
|
|
|
|
$ ./autogen.sh
|
|
|
|
|
|
|
|
This will set up a configure script and a Makefile.in file.
|
|
|
|
|
|
|
|
|
|
|
|
Configure your build
|
|
|
|
--------------------
|
|
|
|
|
|
|
|
To configure your build, run the configure script from the nano source
|
|
|
|
directory:
|
|
|
|
|
|
|
|
$ ./configure [--add-options-here]
|
|
|
|
|
|
|
|
|
|
|
|
Build and install
|
|
|
|
-----------------
|
|
|
|
|
|
|
|
From the nano source directory, build the code with:
|
|
|
|
|
|
|
|
$ make
|
|
|
|
|
2016-04-05 01:46:21 +03:00
|
|
|
Then, once it's done compiling, run:
|
2006-06-25 08:37:05 +04:00
|
|
|
|
|
|
|
$ make install
|
|
|
|
|
2006-07-28 21:06:27 +04:00
|
|
|
which should copy various files (i.e. the nano executable, the info and
|
2006-06-25 08:37:05 +04:00
|
|
|
man pages, and syntax highlighting pattern files) to their appropriate
|
|
|
|
directories.
|
|
|
|
|
|
|
|
If you're installing into the default install directory (/usr/local),
|
|
|
|
you'll need to run that "make install" command with root privileges.
|
|
|
|
|
2004-11-21 20:45:25 +03:00
|
|
|
|
2006-06-25 08:37:05 +04:00
|
|
|
Problems?
|
|
|
|
---------
|
2002-01-23 16:20:20 +03:00
|
|
|
|
2016-08-25 20:34:10 +03:00
|
|
|
Please submit any bugs you find in the code in git via the bug tracker
|
|
|
|
on Savannah (https://savannah.gnu.org/bugs/?group=nano).
|
|
|
|
|
2022-04-19 12:11:35 +03:00
|
|
|
|
2016-08-25 20:34:10 +03:00
|
|
|
Contributing something
|
|
|
|
----------------------
|
|
|
|
|
|
|
|
If you have a fix for a bug, or the code for a new or improved feature,
|
|
|
|
first create a branch off of master:
|
|
|
|
|
|
|
|
$ git checkout -b somename
|
|
|
|
|
2017-11-12 13:54:17 +03:00
|
|
|
Then change the code so it does what you want, and commit it together
|
|
|
|
with your Sign-off:
|
2016-08-25 20:34:10 +03:00
|
|
|
|
|
|
|
$ git commit -as
|
|
|
|
|
2017-11-12 13:54:17 +03:00
|
|
|
In the commit message (after the one-line summary) give a rationale
|
|
|
|
for the change. With your Signed-off-by you declare that the code is
|
|
|
|
yours, or that you are free to reuse it, and that you submit it under
|
|
|
|
the license that covers nano. Then create a patch (or patches):
|
2016-08-25 20:34:10 +03:00
|
|
|
|
|
|
|
$ git format-patch master
|
|
|
|
|
|
|
|
Send that patch (or patches) to <nano-devel@gnu.org>, as an attachment
|
|
|
|
or with git send-email.
|
2017-12-30 13:43:05 +03:00
|
|
|
|
|
|
|
To keep most lines of nano's source code within a width of 80 characters,
|
|
|
|
a tab size of four should be used. So in your nanorc file you may want
|
|
|
|
to include 'set tabsize 4', or you could use -T4 on the command line.
|
|
|
|
To make git display things as intended, you can do:
|
|
|
|
|
2017-12-30 18:38:19 +03:00
|
|
|
$ git config --local core.pager "less -x1,5"
|
2021-09-11 18:50:11 +03:00
|
|
|
|
|
|
|
To see all types that are used in nano's source code colorized as types,
|
|
|
|
you can add these lines to your ~/.nanorc:
|
|
|
|
|
|
|
|
extendsyntax c color green "\<struct (dirent|option|passwd)\>"
|
|
|
|
extendsyntax c color green "\<struct (sigaction|stat|termios)\>"
|
|
|
|
extendsyntax c color green "\<struct (timespec|vt_stat|winsize)\>"
|
|
|
|
extendsyntax c color green "\<([[:lower:]_]+(struct|type)|va_list)\>"
|