RESUME
Scripts to build binary digiKam packages for Mac OS X

AUTHORS
Shanti <listaccount at revenant dot org>
Gilles Caulier <caulier dot gilles at gmail dot com>

DESCRIPTION
These files and scripts are used to make binary packages of the digiKam
Software Collection packages for OS X. In addition to this README, there are
comments in the scripts that provide some additional explanation for how they
work.

REQUIREMENTS
The scripts build digiKam with MacPorts, so you will need Xcode and the other
prerequisites for Macports. See http://www.macports.org/install.php for details.

You will also need to install Packages software from
http://s.sudre.free.fr/Software/Packages/about.html
which does the actual packaging of the files needed to install digiKam.

HERE THERE BE DRAGONS
Use these scripts at your own risk.  For example, both scripts contain 
"rm -rf" (to clear previous builds) -- a mistake could wipe your drive. There 
is little error checking or validation. I make no claims to be compentent at
coding or packaging, or to the suitability or saftety of the scripts or 
software compiled/packaged using them.

COMPONENTS:
There are 3 scripts to be run by the user, 01-build-macports.sh, which installs
MacPorts and all dependencies, 02-build-digikam.sh which compiles and install digiKam,
and 03-build-packages.sh, which makes a PKG binary installer.

All scripts should be run from within the digikam-package directory.

* 01-build-macports.sh:

This script downloads and configures a custom non-root install
of MacPorts to /opt/digikam. The PKG will install to the same place,
avoiding the confusion associated with relocation and install_name_tool. The
custom location, as opposed to /opt/local, should allow digikam to co-exist
with a standard Macports installation (but probably not another KDE
installation).

* 02-build-digikam.sh:

This script configures, and compile a custom non-root install of digiKam to
/opt/digikam

* 03-build-packages.sh:

Once you've successfully built digiKam, /opt/digikam may contain over 10GB of files.
The make-package.sh script grabs the ~500MB needed to run digiKam and showfoto,
and places them in ~/digikam-package/opt. These include applications documentations
and translations.

This script creates Applescript launch applications for the programs that will
be run by the user (digikam, showfoto, etc), and preinstall/postinstall
scripts in digikam-package/package.

The launcher applications:
     1) load dbus-session with launchctl if it isn't already loaded
     2) launch kded4 if it isn't already running and
     3) set "DYLD_IMAGE_SUFFIX=_debug" if the digikam port was built with  the
       +debug variant.

this script also create the pre-install and post-install scripts that are run
when the package is installed. They delete any pre-existing /opt/digikam,
delete and recreate /Applications/digiKam, and load dbus-system with launchctl.

Finally, this script sets the version number, and runs Packages to
put everything together.

* rll.py

Run by 03-build-packages.sh. It is a python script that takes a list of binaries
and libraries supplied by 03-build-packages.sh and recursively lists the dylibs on
which they depend, and their dependencies, etc.. Adapted with minimal
modification (mostly deleting stuff) from
https://github.com/mixxxdj/mixxx/blob/master/build/osx/otool.py.

LICENSE
rll.py, like the otool.py source from which it has been adapted, is licensed
under GNU General Public License version 2.

The scripts and other contents of this package that I have created are licensed
licensed under the GNU General Public License version 2, or any later version.
