![]() |
![]() |
Installing the Source Package on Mac OS X |
Note: This process was developed using Report Magic 2.05 on Mac OS X 10.0.3 Server and was written by Jim Powell.
Disclaimer: I am not an expert at this. This information is mainly based on my experience with trying to install Report Magic on my own system so I can't guarantee that this is the best way of going about this. If you have any recommendations on how to improve this documentation please send them to Wadsack-Allen Digital Group Support.
I would highly recommend installing the Developer Tools packages if you have not already done so. I don't know of any dependencies however so it isn't required.
This is a command line process so if you have not familiarized yourself in some fashion with Terminal, the command line, and at least one text editor like vi, emacs, pico, etc. then you should probably do so before hand, but hopefully this guide will invlove minimal effort
Enable root user using NetInfo Manager if you have not done so already. Download the latest Report Magic Source Package from http://www.reportmagic.org/ (or your nearest mirror) and follow the online installation documentation and refer to this document for any changes that need to be made for compiling on OS X.
The following components will need to be installed (in this order):
System Libraries:
Perl Modules:
Use tar -xzf <archive name>
to decompress the downloaded archives.
mv zlib-1.1.3 zlib mv libpng-1.0.12 libpng
cd
to
libpng. Copy the appropriate makefile:cp ./scripts/makefile.macosx ./Makefile
./configure
edit the resulting Makefile so that
LIBTOOL = /usr/bin/glibtool
CFLAGS=-O -DHAVE_LIBPNG -DHAVE_LIBJPEG LIBS=-lgd -lpng -lz -lm (I have not gotten the inclusion of -ljpeg to work at the time I write this) INCLUDEDIRS=-I. -I/usr/local/include -I/usr/local/lib -I/Users/Shared/jpeg -I/Users/Shared/zlib -I/Users/Shared/libpng LIBDIRS=-L. -L/usr/local/lib -L/usr/local/bin -L/Users/Shared/jpeg -L/Users/Shared/zlib -L/Users/Shared/libpng
This should complete the system library requirements needed to install and run the
necessary Perl modules. At the time of this writing I could not get the autoloading
feature of the rmagic/Install.PL
script to download the necessary modules
[this appears to be an issue in the Mac OS X ftp implementation] so I installed the
modules manually. Below I have made note of any necessary changes.
For the most part I did as little as possible so I could get things up and running, but you may wish to make changes to the resulting Makefiles for each module after running Makefile.PL to change where the module is installed, etc.
GD:: modules:Before compiling you need to update you ranlib database as root with:
ranlib /usr/local/lib/*.a
[assuming this is where you installed the
library files, which is the default]
Now you can continue by issuing perl Makefile.PL
, make
,
make test
, and make install
Assuming that you were able to compile libgd successfully you should not encounter any major problems compiling the GD, GD::Text, GD::Graph, or GD::Graph3d modules. You should expect some of the subtests for each module to fail but it's nothing to worry about as long as the majority succeed.
HTML::TagSet should be installed before HTML::Parser. HTML::Parser includes the HTML::Entities module that Report Magic uses.
Once you've installed all the modules go back to where you left the Report Magic Source
Package archive and untar it if you haven't already done so. cd
into the
resulting directory. If you have a specific directory (e.g. /Library/WebServer/Documents/
,
so you can access the resulting reports via a browser [note there may be some security
issue with putting Report Magic in your webserver documents directory]) that you want
the Report Magic directory to be installed to, then edit the $DEST
variable of the
Install.PL
script.
If you don't install into /Library/WebServer/Documents/
then you will need to change the
output destination of Report Magic in the rmagic.ini
file so that it will generate the
reports into a directory that is accessible from your webservers root directory.
Issue the perl Install.PL -no_modules
command
Go to the directory that was just installed called "rmagic" and in there you will find
the rmagic.sample
and sample.dat
files. The rmagic.sample
is an example settings file, so just run the rmagic.pl
application to
test your installation and make sure everything works. You should end up with a
"reports" directory below your installation directory containing all the reports.
If everything goes as planned you should now be the proud administrator of a much more flexible report formatter. To start customizing Report Magic for your own server see the Quick Start page