Installation Instructions for sysv-rc-conf
==========================================

.5) Debian Users

  If you're a Debian user sysv-rc-conf is already available.

  # apt-get install sysv-rc-conf

1) Install required pre-reqs

  Required libs:

    ncurses

  Required Perl modules:

    Term::ReadKey
    Curses
    Curses::UI

  Optional Perl modules:

    Test::Pod (For Term::ReadKey tests)

1.1) Package Management

  Before going through the trouble of installing all of the above packages
  manually do yourself a favor and see if your systems package management
  has any or all of these packages. So check those rpms, debs, ebuilds, or
  what-have-you.

1.5) Manual installation

  You can get ncurses from <http://www.gnu.org/software/ncurses/ncurses.html>
  Most systems will already have this installed, though you may need to install
  the "development" version of ncurses. On RPM based Linux distros for instance,
  this is probably called ncurses-devel.

  You can get any of the perl modules from CPAN <http://search.cpan.org>

  At the time of this writing (Feb 2004) the current version of Curses.pm
  (version 1.06) fails to compile with Perl 5.8. A new version of Curses is
  said to be expected soon. This patch will make it compile for now (I got it
  from perl-Curses-1.06-7mdk.src.rpm)

--- Curses-1.06/Curses.c.pix    2001-07-25 19:10:38.000000000 +0200
+++ Curses-1.06/Curses.c        2002-08-05 21:56:07.000000000 +0200
@@ -272,7 +272,7 @@
 SV *sv;
 int argnum;
 {
-    if (Perl_sv_isa(sv, "Curses::Window")) {
+    if (sv_isa(sv, "Curses::Window")) {
       WINDOW *ret = (WINDOW *)SvIV((SV*)SvRV(sv));
       return ret;
     }

  So, to install Curses-1.06 with the new patch, and if you saved the patch
  as Curses-perl5.8-fix.diff, you can do the following:

  $ tar xzf Curses-1.06.tar.gz
  $ cd Curses-1.06
  $ patch -p1 < ../Curses-perl5.8-fix.diff
  patching file Curses.c
  $ perl -pi -e 's#^(my \$libs);$#$1="-lncurses -ltermcap -lform -lmenu";#' \
      Makefile.PL
  $ perl -pi -e 's#^(my \$inc);$#$1="-I/usr/include -I/usr/include/ncurses";#' \
      Makefile.PL
  $ perl Makefile.PL MENUS FORMS
  $ make
  # make install

  You can get Term::ReadKey, Curses, and Curses::UI from any CPAN mirror. The
  typical way to install most Perl modules applies.

  # perl -MCPAN -e 'install Term::ReadKey'
  # perl -MCPAN -e 'install Curses::UI'

  If you have problems installing Curses::UI with CPAN, try downloading the
  package and manually running the tests. You'll see they actually do work.

  For instance, I was getting the following error on the 09label test script
  when trying to download and install Curses::UI from CPAN:

  Unable to get Terminal Size. The TIOCGWINSZ ioctl didn't work. The COLUMNS
  and LINES environment variables didn't work.  The resize program didn't work.
  at /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/Term/ReadKey.pm
  line 343.

  But after downloading Curses::UI and manually running the tests
  $ perl -Mblib t/*
  Everything passed just fine. So I just did the normal INSTALL procedure
  listed in Curses::UI's INSTALL file.

  Hopefully that covers all weird cases when trying to install these packages.
  If you have any more insight, feedback would be appreciated.

  Okay, you should be done with the manual installation of the pre-reqs.

2) Edit the Makefile

  By default sysv-rc-conf gets installed to /usr/sbin/sysv-rc-conf and
  the man page goes to /usr/share/man/man8/sysv-rc-conf.8.gz. If that's
  fine with you, skip to step 3.

  If you want to change the installation paths, edit the first two lines of the
  Makefile.

3) Install it

  Once the Makefile is tailored to your liking, install the program.
  # make install

