\input texinfo @c vim: set textwidth=72:
@setfilename INSTALL.info
@include topdocs/defs.texi
@settitle INSTALL
@node Top, , , (dir)

@contents

@chapter INSTALL - how to compile and install GNU Solfege @value{SOLFEGEVERSION} on a GNU like system

This file contains info on how to build and install GNU Solfege.
For run-time info, check the README file and the man page.

The homepage for GNU Solfege, @uref{http://www.solfege.org},
might also be of interest.

@section Download

@subsection Source code
The latest version is available from
@uref{http://download.sourceforge.net/solfege} or (same server, other
look) @uref{http://sourceforge.net/project/showfiles.php?group_id=1465}.

The source code is also available from the GNU ftp sites and their mirrors:
@uref{ftp://alpha.gnu.org/gnu/solfege} and 
@uref{ftp://ftp.gnu.org/gnu/solfege}.

@subsection Precompiled binaries

Precompiled binaries are made available for some releases. I build
the windows installer and the debian package myself. But I am
depending on users to provide binaries for other distributions. The
debian package is available directly from @uref{http://www.debian.org}.
The rest are available from Sourceforge:
@uref{http://download.sourceforge.net/solfege} or
@uref{http://sourceforge.net/project/showfiles.php?group_id=1465}.

@section Requirements

The requirements are listed in the @file{README} file.

@section Configuring and compiling

@example
./configure
make
su -c "make install"
@end example

should work, and will install into

@example
  /usr/local/bin
  /usr/local/share
  /usr/local/lib
  /usr/local/etc/solfege@value{SOLFEGESHORTVERSION}
@end example

Since Solfege require GNU m4 and GNU make, FreeBSD should do something
like this:

@example
M4=/usr/local/bin/gm4 ./configure
gmake
su -c "gmake install"
@end example

If you first try without setting the @env{M4} variable, and see
configure fail, then you have to delete the file @file{config.cache}
before running the example above.

Use the @option{--prefix} and @option{--sysconfdir} command line options
to install elsewhere. For example to install in your home directory:

@example
./configure --prefix=$HOME/usr --sysconfdir=$HOME/etc
make 
make install
@end example

If you just want to run Solfege without installing, do this:
@example
./configure
make
./solfege.py
@end example

The @command{configure} script can be given a number of options to
enable and disable various features. Some of them are described below.
For a complete list, type:

@example
./configure --help
@end example

@subsection @option{--with-buggy-distro}
Use this option if you have problems detecting some of the software that
are required, for example PyGNOME. Using this option will make the
configure script use black magick to check if software are installed
even if the linux distribution (for example RedHat 8.0) does not include
the proper files to check for this.

@subsection @option{--with-local-xmlcatalog}
Use this option if your @file{/etc/xml/catalog} file is broken or
missing. If @file{/etc/xml/catalog} is missing, then @command{xsltproc}
will fetch the DTD using the network. With this option, the build system
will use the file @file{online-docs/stupid_catalog_file.cat} included in
the Solfege source tarball. You might have to edit the file if the file
names is different on your system.

@subsection @option{--without-gnome}
If found by @command{configure}, Solfege will take advantage of
functions in the GNOME libraries. Use this option to build the
application run without GNOME even if the libraries are found.

@subsection @option{--without-gtkhtml}
If found by @command{configure}, Solfege will be built to use gtkhtml2,
the htmlwidget included in GNOME2. Use this option to build the
application to run without gtkhtml2, even if the libraries are found.

@subsection @option{--disable-oss-sound}
Use this if you are compiling on an OS that don't have the OSS.
The default is @option{--enable-oss-sound}.

@section Packaging

@subsection Debian
Rename @file{debian-dir} to @file{debian} and run:

@example
dpkg-buildpackage -rfakeroot -us -uc
@end example

@subsection Rpm-based distributions
I have started to collection spec files for rpm-based distros. I depend
on users of these distributions to send me spec files. Also, I do not
test these spec files myself, so you should send me an update if some of
the Requires or BuildRequires fields are wrong. Please notice that there may be a
difference between version 9 and 9.1 of a distro. Give me the exact
version number!

Here is an example how to build a binary rpm package for Red Hat 9.
Replace the filenames to fit your distro if required.

@example
cp solfege-@value{SOLFEGEVERSION}.tar.gz /usr/src/redhat/SOURCES/
tar zxf solfege-@value{SOLFEGEVERSION}.tar.gz
rpm -bb solfege-@value{SOLFEGEVERSION}/solfege.redhat9.spec
rpm -i /usr/src/redhat/RPMS/i386/solfege-@value{SOLFEGEVERSION}
@end example

Hopefully, binary rpm packages for some distributions will be provided
later.
@bye
