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 two scripts to be run by the user, build-digikam.sh, which installs
MacPorts and compiles digikam, and make-packages.sh, which... makes a package.
Both should be run from within the digikam-package directory.

* build-digikam.sh:
The build-digikam.sh script downloads and configures a custom non-root install
of MacPorts to /opt/digikam. The package 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).

* make-packages.sh:
Once you've successfully built digikam from MacPorts (I don't think I've done
in one continuous session, without manual intervention), /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 documentation for digikam and showfoto.

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.

make-packages.sh also create the preinstall and postinstall 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, make-package.sh sets the version number, and runs Packages to
put everything together.

* rll.py
Run by make-packages.sh. It is a python script that takes a list of binaries
and libraries supplied by make-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.
