nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

README.hacking (3643B)


      1 INSTRUCTIONS FOR COMPILING AND INSTALLING NANO FROM GIT
      2 =======================================================
      3 
      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.
      6 
      7 
      8 Prerequisites
      9 -------------
     10 
     11 To successfully compile GNU nano from git, you'll need the following:
     12 
     13     autoconf    (version >= 2.69)
     14     automake    (version >= 1.14)
     15     autopoint   (version >= 0.20)
     16     gcc         (version >= 5.0)
     17     gettext     (version >= 0.20)
     18     git         (version >= 2.7.4)
     19     groff       (version >= 1.12)
     20     make        (any version)
     21     pkg-config  (version >= 0.22)
     22     texinfo     (version >= 4.0)
     23 
     24 You will also need to have the header files for ncurses installed,
     25 from libncurses-dev on Debian, ncurses-devel on Fedora, or similar.
     26 
     27 These should all be available in your distro's package manager or
     28 software center, or otherwise on any GNU mirror.
     29 
     30 
     31 Clone the source
     32 ----------------
     33 
     34 To obtain the current nano development branch (called 'master'), use the
     35 following command.  It will create in your current working directory a
     36 subdirectory called 'nano' containing a copy of all of the files:
     37 
     38     $ git clone git://git.savannah.gnu.org/nano.git
     39 
     40 
     41 Generate the configure script
     42 -----------------------------
     43 
     44 Once you have the sources in the "nano" directory,
     45 
     46     $ cd nano
     47     $ ./autogen.sh
     48 
     49 This will set up a configure script and a Makefile.in file.
     50 
     51 
     52 Configure your build
     53 --------------------
     54 
     55 To configure your build, run the configure script from the nano source
     56 directory:
     57 
     58     $ ./configure [--add-options-here]
     59 
     60 
     61 Build and install
     62 -----------------
     63 
     64 From the nano source directory, build the code with:
     65 
     66     $ make
     67 
     68 Then, once it's done compiling, run:
     69 
     70     $ make install
     71 
     72 which should copy various files (i.e. the nano executable, the info and
     73 man pages, and syntax highlighting pattern files) to their appropriate
     74 directories.
     75 
     76 If you're installing into the default install directory (/usr/local),
     77 you'll need to run that "make install" command with root privileges.
     78 
     79 
     80 Problems?
     81 ---------
     82 
     83 Please submit any bugs you find in the code in git via the bug tracker
     84 on Savannah (https://savannah.gnu.org/bugs/?group=nano).
     85 
     86 
     87 Contributing something
     88 ----------------------
     89 
     90 If you have a fix for a bug, or the code for a new or improved feature,
     91 first create a branch off of master:
     92 
     93     $ git checkout -b somename
     94 
     95 Then change the code so it does what you want, and commit it together
     96 with your Sign-off:
     97 
     98     $ git commit -as
     99 
    100 In the commit message (after the one-line summary) give a rationale
    101 for the change.  With your Signed-off-by you declare that the code is
    102 yours, or that you are free to reuse it, and that you submit it under
    103 the license that covers nano.  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.
    109 
    110 To keep most lines of nano's source code within a width of 80 characters,
    111 a tab size of four should be used.  So in your nanorc file you may want
    112 to include 'set tabsize 4', or you could use -T4 on the command line.
    113 To make git display things as intended, you can do:
    114 
    115     $ git config --local core.pager "less -x1,5"
    116 
    117 To see all types that are used in nano's source code colorized as types,
    118 you can add these lines to your ~/.nanorc:
    119 
    120     extendsyntax c color green "\<struct (dirent|option|passwd)\>"
    121     extendsyntax c color green "\<struct (sigaction|stat|termios)\>"
    122     extendsyntax c color green "\<struct (timespec|vt_stat|winsize)\>"
    123     extendsyntax c color green "\<([[:lower:]_]+(struct|type)|va_list)\>"