Benno Schulenberg | 9525323 | 2016-11-20 18:01:40 +0100 | [diff] [blame] | 1 | INSTRUCTIONS FOR COMPILING AND INSTALLING NANO FROM GIT |
| 2 | ======================================================= |
Jordi Mallach | 9045319 | 2002-01-23 13:20:20 +0000 | [diff] [blame] | 3 | |
Benno Schulenberg | 9525323 | 2016-11-20 18:01:40 +0100 | [diff] [blame] | 4 | The latest changes and fixes for GNU nano are available via git, but |
| 5 | building this needs a bit more care than the official tarballs. |
Jordi Mallach | 9045319 | 2002-01-23 13:20:20 +0000 | [diff] [blame] | 6 | |
David Lawrence Ramsey | 5c8d316 | 2006-06-25 04:37:05 +0000 | [diff] [blame] | 7 | |
| 8 | Prerequisites |
| 9 | ------------- |
| 10 | |
Benno Schulenberg | 9525323 | 2016-11-20 18:01:40 +0100 | [diff] [blame] | 11 | To successfully compile GNU nano from git, you'll need the following |
David Lawrence Ramsey | db85ac7 | 2004-10-18 14:13:28 +0000 | [diff] [blame] | 12 | packages: |
Jordi Mallach | 9045319 | 2002-01-23 13:20:20 +0000 | [diff] [blame] | 13 | |
Benno Schulenberg | 0eefd2c | 2016-06-04 11:27:15 +0200 | [diff] [blame] | 14 | - autoconf (version >= 2.61) |
| 15 | - automake (version >= 1.7) |
Benno Schulenberg | 9525323 | 2016-11-20 18:01:40 +0100 | [diff] [blame] | 16 | - autopoint (version >= 0.11.5) |
Benno Schulenberg | 0eefd2c | 2016-06-04 11:27:15 +0200 | [diff] [blame] | 17 | - gettext (version >= 0.11.5) |
| 18 | - git (version >= 2.7.4) |
| 19 | - groff (version >= 1.12) |
Benno Schulenberg | f390eb8 | 2016-06-04 11:20:29 +0200 | [diff] [blame] | 20 | - pkg-config (version >= 0.22) |
Benno Schulenberg | 0eefd2c | 2016-06-04 11:27:15 +0200 | [diff] [blame] | 21 | - texinfo (version >= 4.0) |
Benno Schulenberg | 9525323 | 2016-11-20 18:01:40 +0100 | [diff] [blame] | 22 | - gcc (any version) |
| 23 | - make (any version) |
| 24 | |
| 25 | If you want UTF-8 support, you will also need libncursesw5-dev installed |
David Lawrence Ramsey | 87fbe24 | 2016-11-27 16:55:46 -0600 | [diff] [blame] | 26 | (version >= 5.7), or libslang2-dev (version >= 2.0) if you use --with-slang. |
| 27 | If your system doesn't have 'snprintf' or 'vsnprintf' (which the configure |
| 28 | script will check for), you will also need glib-2.x installed. |
Jordi Mallach | 9045319 | 2002-01-23 13:20:20 +0000 | [diff] [blame] | 29 | |
Benno Schulenberg | 0eefd2c | 2016-06-04 11:27:15 +0200 | [diff] [blame] | 30 | These should all be available in your distro's package manager or software |
Benno Schulenberg | 9525323 | 2016-11-20 18:01:40 +0100 | [diff] [blame] | 31 | center, or otherwise on any GNU mirror. |
Jordi Mallach | 9045319 | 2002-01-23 13:20:20 +0000 | [diff] [blame] | 32 | |
David Lawrence Ramsey | 5c8d316 | 2006-06-25 04:37:05 +0000 | [diff] [blame] | 33 | |
| 34 | Download the source |
| 35 | ------------------- |
| 36 | |
Benno Schulenberg | 9525323 | 2016-11-20 18:01:40 +0100 | [diff] [blame] | 37 | To obtain the current nano development branch (called 'master'), use the |
| 38 | following command. It will create in your current working directory a |
| 39 | subdirectory called 'nano' containing a copy of all of the files: |
David Lawrence Ramsey | 831c640 | 2004-11-21 18:44:23 +0000 | [diff] [blame] | 40 | |
Chris Allegretta | 5cb3f09 | 2016-04-04 18:08:32 -0400 | [diff] [blame] | 41 | $ git clone git://git.savannah.gnu.org/nano.git nano |
David Lawrence Ramsey | b75763e | 2004-11-21 17:45:25 +0000 | [diff] [blame] | 42 | |
David Lawrence Ramsey | 35bd350 | 2007-01-28 19:49:05 +0000 | [diff] [blame] | 43 | |
David Lawrence Ramsey | 5c8d316 | 2006-06-25 04:37:05 +0000 | [diff] [blame] | 44 | Generate the configure script |
| 45 | ----------------------------- |
| 46 | |
| 47 | Once you have the sources in the "nano" directory, |
| 48 | |
| 49 | $ cd nano |
| 50 | $ ./autogen.sh |
| 51 | |
| 52 | This will set up a configure script and a Makefile.in file. |
| 53 | |
| 54 | |
| 55 | Configure your build |
| 56 | -------------------- |
| 57 | |
| 58 | To configure your build, run the configure script from the nano source |
| 59 | directory: |
| 60 | |
| 61 | $ ./configure [--add-options-here] |
| 62 | |
| 63 | |
| 64 | Build and install |
| 65 | ----------------- |
| 66 | |
| 67 | From the nano source directory, build the code with: |
| 68 | |
| 69 | $ make |
| 70 | |
Mike Frysinger | 5cda85c | 2016-04-04 18:46:21 -0400 | [diff] [blame] | 71 | Then, once it's done compiling, run: |
David Lawrence Ramsey | 5c8d316 | 2006-06-25 04:37:05 +0000 | [diff] [blame] | 72 | |
| 73 | $ make install |
| 74 | |
David Lawrence Ramsey | b159f94 | 2006-07-28 17:06:27 +0000 | [diff] [blame] | 75 | which should copy various files (i.e. the nano executable, the info and |
David Lawrence Ramsey | 5c8d316 | 2006-06-25 04:37:05 +0000 | [diff] [blame] | 76 | man pages, and syntax highlighting pattern files) to their appropriate |
| 77 | directories. |
| 78 | |
| 79 | If you're installing into the default install directory (/usr/local), |
| 80 | you'll need to run that "make install" command with root privileges. |
| 81 | |
| 82 | |
| 83 | Problems? |
| 84 | --------- |
Jordi Mallach | 9045319 | 2002-01-23 13:20:20 +0000 | [diff] [blame] | 85 | |
Benno Schulenberg | 3e40e5d | 2016-08-25 19:34:10 +0200 | [diff] [blame] | 86 | Please submit any bugs you find in the code in git via the bug tracker |
| 87 | on Savannah (https://savannah.gnu.org/bugs/?group=nano). |
| 88 | |
| 89 | |
| 90 | Contributing something |
| 91 | ---------------------- |
| 92 | |
| 93 | If you have a fix for a bug, or the code for a new or improved feature, |
| 94 | first create a branch off of master: |
| 95 | |
| 96 | $ git checkout -b somename |
| 97 | |
| 98 | Then change the code so it does what you want, and commit it, with in the |
| 99 | commit message (after the one-line summary) a rationale for the change: |
| 100 | |
| 101 | $ git commit -as |
| 102 | |
| 103 | Then create a patch (or patches): |
| 104 | |
| 105 | $ git format-patch master |
| 106 | |
| 107 | Send that patch (or patches) to <nano-devel@gnu.org>, as an attachment |
| 108 | or with git send-email. |