On 11/10/2011 10:30 AM, Misty Stanley-Jones wrote:
I'd appreciate it if someone could test this procedure for me. It has worked 
several times now for me on OS X Lion.

Notes:
1. I have not dealt with installing extra brands at all yet.
2. Steps 1-6 are preparatory work and hopefully some of it will be streamlined 
in the future.
3. Everything is stored in /opt/local along with the rest of the Macports 
stuff. This segregates it from your OS install.
4. It is easy to uninstall Macports, and doing so would also take Publican with 
it. See the Macports documentation.
5. At the moment, you have to override some path settings for every Publican 
command you run. The way around this is to create a symbolic link from 
/opt/local/share/publican to /usr/share/publican. This impacts #3 above, but is 
a minimal risk. A longer-term solution to this is underway.
6. The commands below are meant to be pasted into the command line as a single 
line each.


Procedure:

1. Install Xcode from Mac App Store

2. Install Macports from
http://guide.macports.org/chunked/installing.macports.html. Everything you 
install with it goes into /opt/local, away from your normal OS files.

3. Open a terminal.

4. Install dependencies for Publican which are available as ports.
sudo port install docbook-xml docbook-xsl docbook-sgml-4.2 perl5 
bash-completion ImageMagick +perl +no_x11

5. Install Perl modules available as Macports. They will pull in more 
dependencies and install them all under /opt/local.
sudo port install p5-file-pushd p5-config-simple p5-file-find-rule 
p5-file-slurp p5-class-trigger p5-time-hires p5-list-moreutils p5-ipc-run3 
p5-class-accessor p5-test-perl-critic p5-xml-libxslt p5-locale-gettext 
p5-image-size p5-file-copy-recursive p5-datetime p5-archive-zip p5-timedate 
p5-html-format p5-dbd-sqlite p5-xml-simple p5-devel-cover p5-test-pod 
p5-test-pod-coverage p5-template-toolkit

6. Install CPAN modules for dependencies which can't be satisfied with ports. 
The first line forces Makefile::Parser to install even though its tests fail.
sudo cpan -f -i Makefile::Parser
sudo cpan Locale::Maketext::Gettext Locale::PO DateTime::Format::DateParse 
Syntax::Highlight::Engine::Kate XML::TreeBuilder

7. Check out Publican 2.x branch:
svn co http://svn.fedorahosted.org/svn/publican/branches/publican-2x
cd publican-2x/

8. In the publican-2x directory, run:
perl ./Build.PL

9. In the publican-2x directory, run:
./Build

10. Run the following command to install Publican and put all of its bits into 
/opt/local:
sudo ./Build install --install_path datadir=/opt/local/share/publican 
--install_path generated=/opt/local/share/publican/sitetemplate  --install_path 
web=/opt/local/share/publican/sitetemplate --install_path 
templates=/opt/local/share/publican/templates --install_path etc=/opt/local/etc 
--install_path completion=/opt/local/etc/bash_completion.d

11. Create a book.
publican create --name=testbook --common_config=/opt/local/share/publican 
--common_content=/opt/local/share/publican/Common_Content

12. Change to the book's main directory: cd testbook

13. Build the book, pointing to the proper places for things Publican expects 
to find in /usr:
publican build --formats=html --langs=en-US 
--common_config=/opt/local/share/publican 
--common_content=/opt/local/share/publican/Common_Content

14. Open the tmp/en-US/html/index.html in a browser to prove that it built 
properly.

FYI 3 bugs were raised about making this easier:

https://bugzilla.redhat.com/show_bug.cgi?id=752637
https://bugzilla.redhat.com/show_bug.cgi?id=752620
https://bugzilla.redhat.com/show_bug.cgi?id=752640

All have been addressed and are waiting for QA.

If you are testing this and want to avoid FOP, and who wouldn't, you can test wkhtmltopdf. There is a OSX binary on the website [1] make sure you get at least 0.10.0_rc2!

Cheers, Jeff.

1: http://code.google.com/p/wkhtmltopdf/downloads/list

--
"Reply All" why you shouldn't use it: http://www.emailreplies.com/#12replytoall

_______________________________________________
publican-list mailing list
publican-list@redhat.com
https://www.redhat.com/mailman/listinfo/publican-list
Wiki: https://fedorahosted.org/publican

Reply via email to