[publican-list] Install Publican on OS X Lion - Working

Susan Burgess sburgess at redhat.com
Thu Nov 10 05:53:43 UTC 2011


Ok I'll try it when I get home..
though I have a fedora vm which I run publican on on my home iMac..er I mean my kids iMac..

Susan

----- Original Message -----
From: "Misty Stanley-Jones" <misty at redhat.com>
To: "Publican discussions" <publican-list at redhat.com>
Cc: "Engineering Content Services Writing projects." <content-services-list at redhat.com>
Sent: Thursday, November 10, 2011 10:30:17 AM
Subject: [publican-list] Install Publican on OS X Lion - Working

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.

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




More information about the publican-list mailing list