Blame README.GIT

Packit 1ac44c
INSTRUCTIONS FOR COMPILING AND INSTALLING NANO FROM GIT
Packit 1ac44c
=======================================================
Packit 1ac44c
Packit 1ac44c
The latest changes and fixes for GNU nano are available via git, but
Packit 1ac44c
building this needs a bit more care than the official tarballs.
Packit 1ac44c
Packit 1ac44c
Packit 1ac44c
Prerequisites
Packit 1ac44c
-------------
Packit 1ac44c
Packit 1ac44c
To successfully compile GNU nano from git, you'll need the following
Packit 1ac44c
packages:
Packit 1ac44c
Packit 1ac44c
- autoconf    (version >= 2.69)
Packit 1ac44c
- automake    (version >= 1.14)
Packit 1ac44c
- autopoint   (version >= 0.18.3)
Packit 1ac44c
- gettext     (version >= 0.18.3)
Packit 1ac44c
- git         (version >= 2.7.4)
Packit 1ac44c
- groff       (version >= 1.12)
Packit 1ac44c
- pkg-config  (version >= 0.22)
Packit 1ac44c
- texinfo     (version >= 4.0)
Packit 1ac44c
- gcc         (any version)
Packit 1ac44c
- make        (any version)
Packit 1ac44c
Packit 1ac44c
If you want UTF-8 support, you will also need libncursesw5-dev installed
Packit 1ac44c
(version >= 5.7), or libslang2-dev (version >= 2.0) if you use --with-slang.
Packit 1ac44c
Packit 1ac44c
These should all be available in your distro's package manager or software
Packit 1ac44c
center, or otherwise on any GNU mirror.
Packit 1ac44c
Packit 1ac44c
Packit 1ac44c
Download the source
Packit 1ac44c
-------------------
Packit 1ac44c
Packit 1ac44c
To obtain the current nano development branch (called 'master'), use the
Packit 1ac44c
following command.  It will create in your current working directory a
Packit 1ac44c
subdirectory called 'nano' containing a copy of all of the files:
Packit 1ac44c
Packit 1ac44c
    $ git clone git://git.savannah.gnu.org/nano.git nano
Packit 1ac44c
Packit 1ac44c
Packit 1ac44c
Generate the configure script
Packit 1ac44c
-----------------------------
Packit 1ac44c
Packit 1ac44c
Once you have the sources in the "nano" directory,
Packit 1ac44c
Packit 1ac44c
    $ cd nano
Packit 1ac44c
    $ ./autogen.sh
Packit 1ac44c
Packit 1ac44c
This will set up a configure script and a Makefile.in file.
Packit 1ac44c
Packit 1ac44c
Packit 1ac44c
Configure your build
Packit 1ac44c
--------------------
Packit 1ac44c
Packit 1ac44c
To configure your build, run the configure script from the nano source
Packit 1ac44c
directory:
Packit 1ac44c
Packit 1ac44c
    $ ./configure [--add-options-here]
Packit 1ac44c
Packit 1ac44c
Packit 1ac44c
Build and install
Packit 1ac44c
-----------------
Packit 1ac44c
Packit 1ac44c
From the nano source directory, build the code with:
Packit 1ac44c
Packit 1ac44c
    $ make
Packit 1ac44c
Packit 1ac44c
Then, once it's done compiling, run:
Packit 1ac44c
Packit 1ac44c
    $ make install
Packit 1ac44c
Packit 1ac44c
which should copy various files (i.e. the nano executable, the info and
Packit 1ac44c
man pages, and syntax highlighting pattern files) to their appropriate
Packit 1ac44c
directories.
Packit 1ac44c
Packit 1ac44c
If you're installing into the default install directory (/usr/local),
Packit 1ac44c
you'll need to run that "make install" command with root privileges.
Packit 1ac44c
Packit 1ac44c
Packit 1ac44c
Problems?
Packit 1ac44c
---------
Packit 1ac44c
Packit 1ac44c
Please submit any bugs you find in the code in git via the bug tracker
Packit 1ac44c
on Savannah (https://savannah.gnu.org/bugs/?group=nano).
Packit 1ac44c
Packit 1ac44c
Packit 1ac44c
Contributing something
Packit 1ac44c
----------------------
Packit 1ac44c
Packit 1ac44c
If you have a fix for a bug, or the code for a new or improved feature,
Packit 1ac44c
first create a branch off of master:
Packit 1ac44c
Packit 1ac44c
    $ git checkout -b somename
Packit 1ac44c
Packit 1ac44c
Then change the code so it does what you want, and commit it together
Packit 1ac44c
with your Sign-off:
Packit 1ac44c
Packit 1ac44c
    $ git commit -as
Packit 1ac44c
Packit 1ac44c
In the commit message (after the one-line summary) give a rationale
Packit 1ac44c
for the change.  With your Signed-off-by you declare that the code is
Packit 1ac44c
yours, or that you are free to reuse it, and that you submit it under
Packit 1ac44c
the license that covers nano.  Then create a patch (or patches):
Packit 1ac44c
Packit 1ac44c
    $ git format-patch master
Packit 1ac44c
Packit 1ac44c
Send that patch (or patches) to <nano-devel@gnu.org>, as an attachment
Packit 1ac44c
or with git send-email.
Packit 1ac44c
Packit 1ac44c
To keep most lines of nano's source code within a width of 80 characters,
Packit 1ac44c
a tab size of four should be used.  So in your nanorc file you may want
Packit 1ac44c
to include 'set tabsize 4', or you could use -T4 on the command line.
Packit 1ac44c
To make git display things as intended, you can do:
Packit 1ac44c
Packit 1ac44c
    $ git config --local core.pager "less -x1,5"