1.7. Installing Paperboy

Paperboy is designed to be very portable and should compile cleanly on any POSIX operating system— that is, Unix or any derivative OSes like Linux, BSD, or Mac OS X. A concise installation guide for Paperboy can be found in the INSTALL file. It should be straightforward, but may be confusing for users unfamiliar with compiling and installing programs.

Because of that potential for confusion, I (Kris) will outline what to do to install on my box, an x86 running Debian GNU/Linux. Be sure to read through the INSTALL file rather than just trying the steps here, especially if you are installing on a different system as there may be special issues you'll need to deal with. But this is how things should look. I will assume that you have already installed all the required libraries and development packages (aka headers).

The first thing to do is download a tarred archive of the project into a directory and untar it, or alternately you can check a copy out from CVS. The CVS builds are newer, but also therefore a bit more unstable; unless you need a specific new feature, or are interested in the development side of the project, it is probably better to just use the official tarred releases. Next, you should run the configuration script. If your installation fails, chances are the required libraries weren't installed properly (or at all) or the Makefile was misconfigured. Try running the configure script again with options that work better (check in the INSTALL file to find out what might be wrong, or ask on our mailing list).


kryptech@debian:~/projects/paperboy/src$ ./configure.pl

        This script will ask you some questions to generate the
        Makefile for compiling the Paperboy RSS project. The
        latest version of the project is available at
        <http://sourceforge.net/projects/paperboy/>.
        Default answers are shown in [brackets], to accept them
        just hit enter.

        The first set of questions has to do with where to
        install things. You can change the paths for specific
        files (manpages, etc) so don't worry about the first
        question too much.

Where files should be installed? [/usr/local]
Where should binary files be installed? [/usr/local/bin]
Where should manpages be installed? [/usr/local/man] /usr/share/man
Where should supplemental files be installed? [/usr/local/lib/paperboy]

        Now I'm going to configure the compiling instructions.
        Unless you're sure you need to change these, the defaults
        will suffice.

Would you like to answer them anyways (y/yes/n/no)? [no]

        Setting default compiler variables... done.
        Setting developer variables... done.
        Updating headers/execpaperboyconfig.h... done.
        Writing paperboy-config... done.
        Writing Makefile... done.
			

If you just hit enter all the way through, you will be taking the default options which should work on most systems. In this case, I used the default options for everything except the manpages (which are located in /usr/share/man for me). If you made a mistake or change your mind, you can always run the script again. After you are content with your configuration settings, you should go ahead and do a 'make' to build the program. Note that if you've installed a version of Paperboy you should uninstall it before running the configure script again.


kryptech@debian:~/projects/paperboy/src$ make
gcc -Wall -O2  -c paperboy-lib/errorhandler.c -o paperboy-lib/errorhandler.o
gcc -Wall -O2  -c paperboy-lib/execpaperboy.c -o paperboy-lib/execpaperboy.o
... etc, etc, etc ...
perl man/pod2man.pl 1 paperboyd `./paperboyd -V` 'Paperboy RSS'
perl man/pod2man.pl 1 'paperboy-config' 1.1.0 'Paperboy RSS'
			

There should be no errors, and minimal warnings. (You can run make with the '-s' flag to suppress all output other than warnings and errors, though you might get bored staring at a blank screen for a while.) It would be nice if you report any warnings—and certainly every error!—you encounter while making so we can fix them. (And if you're savvy enough to figure out a patch for the issue, send those along too.) After you run 'make' everything should be built, and you should be ready to install. You install by doing a 'make install'. You will probably have to become root to do this by doing a 'su' or 'sudo'.


kryptech@debian:~/projects/paperboy/src$ su
Password:
debian:/home/kryptech/projects/paperboy/src# make install
test -d /usr/local/bin || mkdir -p /usr/local/bin
cp paperboy /usr/local/bin/
cp paperboyd /usr/local/bin/
cp paperboy-config /usr/local/bin/
test -d /usr/local/lib/paperboy || mkdir -p /usr/local/lib/paperboy
cp lib/feed2rdf.xsl /usr/local/lib/paperboy/
cp lib/feed2rss.xsl /usr/local/lib/paperboy/
cp lib/paperboy_config.dtd /usr/local/lib/paperboy/
cp lib/rdf_list.dtd /usr/local/lib/paperboy/
cp lib/rss_list.dtd /usr/local/lib/paperboy/
test -d /usr/share/man/man1 || mkdir -p /usr/share/man/man1
cp man/paperboy.1 /usr/share/man/man1/
cp man/paperboyd.1 /usr/share/man/man1/
cp man/paperboy-config.1 /usr/share/man/man1/
test -d /usr/share/man/man3 || mkdir -p /usr/share/man/man3
cp man/paperboy-modules.3 /usr/share/man/man3/
ln -si /usr/local/lib/paperboy/feed2rss.xsl /usr/local/lib/paperboy/feed2universal.xsl
ln: replace `/usr/local/lib/paperboy/feed2universal.xsl'? y
			

If you've installed Paperboy previously some of the commands near the end of the install may ask you whether you want to replace certain files (like the last line above). You probably do want to, though that depends on your circumstances.

Once you've done the above, you're finished; you can now use Paperboy. If you're a Paperboy developer (or hacker), this does not install the developer man pages, so if you want those you should do 'make man-dev' and 'make install-dev' (you may need root access for the install portion again).


kryptech@debian:~/projects/paperboy/src$ make man-dev
gcc -Wall -O2 -o libver paperboy-lib/libver.c -L. -lpaperboy-dev
perl man/pod2man.pl 3 paperboy-dev-errorhandler `./libver errorhandler` 'Paperboy RSS Developers'
perl man/pod2man.pl 3 paperboy-dev-execpaperboy `./libver execpaperboy` 'Paperboy RSS Developers'
perl man/pod2man.pl 3 paperboy-dev-execpaperboyconfig `./libver execpaperboyconfig` 'Paperboy RSS Developers'
perl man/pod2man.pl 3 paperboy-dev-findpaperboy `./libver findpaperboy` 'Paperboy RSS Developers'
perl man/pod2man.pl 3 paperboy-dev-linkedlist `./libver linkedlist` 'Paperboy RSS Developers'
perl man/pod2man.pl 3 paperboy-dev-versioning `./libver versioning` 'Paperboy RSS Developers'
kryptech@debian:~/projects/paperboy/src$ su
Password:
debian:/home/kryptech/projects/paperboy/src# make install-dev
test -d /usr/share/man/man3 || mkdir -p /usr/share/man/man3
cp man/paperboy-dev-errorhandler.3 /usr/share/man/man3/
cp man/paperboy-dev-execpaperboy.3 /usr/share/man/man3/
cp man/paperboy-dev-execpaperboyconfig.3 /usr/share/man/man3/
cp man/paperboy-dev-findpaperboy.3 /usr/share/man/man3/
cp man/paperboy-dev-linkedlist.3 /usr/share/man/man3/
cp man/paperboy-dev-versioning.3 /usr/share/man/man3/
debian:/home/kryptech/projects/paperboy/src#
			

And that's it! To test paperboy and make sure it really is installed, do 'paperboy -h'


kryptech@debian:~/projects/paperboy/src$ paperboy -h
Usage:   paperboy [OPTIONS]
Example: paperboy -f ~/feed.rss -t ~/feed.xsl

File specification:
  -f PATH        path to the XML feed to be parsed
  -o PATH        where to store the output
  -t PATH        path to the XSLT template to apply to the feed
  -u URL         if given, download this feed and store it in the location
                 specified with -f before parsing
  -x PATH        path to dynamic/shared library with user-defined XSLT functions
  -y PATH        if -x is a bridgework to another language,
                 path to libraries in that language

Operation modes:
  -c             do not difference XML files ("clean" up old files)
  -g             download the feeds and exit, no processing is done ("get-only")
  -G             process the feeds normally, but ignore any URLs ("don't-get")
  -j             take multiple feeds and join them

Miscellaneous:
  -h             display this help and exit
  -v             print verbose informational messages.
  -V             print version information and exit
			

If that worked, it should all be functioning correctly. If it doesn't work, ask for help on our mailing list.