Stephen Quinney
and 1 contributors


    LCFG::Build::Tool::DevOSXPkg - LCFG software packaging tool


    This documentation refers to LCFG::Build::Tool::DevOSXPkg version 0.6.6


    my $tool = LCFG::Build::Tool::DevOSXPkg->new( dir => '.' );


    my $tool2 = LCFG::Build::Tool::DevOSXPkg->new_with_options();



This module provides software release tools for the LCFG build suite.

This is a tool to take a development tree (working copy) of the source for a project managed with the LCFG build tools and package it into a gzipped source tar file. Build metadata files for supported platforms (e.g. a specfile for building binary RPMs) are also generated at the same time. It is also possible to do limited autoconf-style macro substitution prior to the source being packaged. This allows the generation of 'pristine' tar files where downstream users will be unaware of the additional source-file processing that has been carried out prior to distribution. A Mac OS X package will then be generated from the gzipped source tar file, assuming CMake is used to build and install the project.

More information on the LCFG build tools is available from the website


The following attributes are modifiable via the command-line (i.e. via @ARGV) as well as the normal way when the Tool object is created. Unless stated the options take strings as arguments and can be used like --foo=bar. Boolean options can be expressed as either --foo or --no-foo to signify true and false values.


A boolean value which indicates whether actions which permanently alter the contents of files should be carried out. The default value is false (0). When running in dry-run mode various you will typically get extra output to the screen showing what would have been done.


A boolean value which indicates whether the actions should attempt to be quieter. The default value is false (0).


The path of the project directory which contains the software for which you want to create a release. If this is not specified then a default value of the current directory (.) will be used. This directory must already contain the LCFG build metadata file (lcfg.yml) for the software.


When a project is packaged for release the generated products (the gzipped source tar file, various build metadata files and possibly binary RPMS, etc) are stored into a directory named after the combination of the full name of the project and the version number. For example, a project named 'foo' with version '1.2.3' would have an output directory of 'foo-1.2.3'. You should note that if the base attribute is specified in the metadata file (this is the case for LCFG components) then that is also used. If the previous example was an LCFG component it would have a directory named 'lcfg-foo-1.2.3'.

This attribute controls the parent directory into which that generated directory will be placed. The default on a Unix system is $HOME/lcfgbuild/ which will be created if it does not already exist.


This is a boolean value which controls whether CMake build files will be created when the source code for the project is packaged. The default is to take the setting from gencmake option in the buildinfo section of the LCFG build metadata file.


This is a boolean value which controls whether source files will be translated BEFORE they are packaged. The default is to take the setting from translate_before_pack option in the buildinfo section of the LCFG build metadata file.


This is a boolean value which controls whether input files will be removed after they have been translated. They are only removed if the input and output filenames do not match (e.g. foo.cin becomes foo). The default is to take the setting from remove_input_after_translate option in the buildinfo section of the LCFG build metadata file.


This is a boolean value which controls whether the Mac OS X package contains a payload, or only scripts to be executed as part of the install action. The default is to take the setting from the nopayload option in the buildinfo section of the LCFG build metadata file.

The following methods are not modifiable by the command-line, they are however directly modifiable via the Tool object if necessary. Typically you will only need to query these attributes, they are automatically created when you need them using values for some of the other command-line attributes.


This is a reference to the current project metadata object, see LCFG::Build::PkgSpec for full details.


This is a reference to the current version-control object, see LCFG::Build::VCS for full details.



This method first calls the execute() method in LCFG::Build::Tool::DevPack to generate a gzipped source tar file and the build metadata files for the various supported platforms (e.g. a specfile for creating binary RPMs). Once that is done the binary packages for MacOSX are created from the source tar file using CMake and pkgbuild.


Immediately fails (i.e. dies) and displays the message.


Logs the message to the screen if the quiet attribute has not been specified. A message string is prefixed with 'LCFG: ' to help visually separate it from other output.


This module is Moose powered and uses MooseX::App::Cmd to handle command-line options.

The following modules from the LCFG build tools suite are also required: LCFG::Build::Tool::DevPack, LCFG::Build::PkgSpec, LCFG::Build::VCS and VCS helper module for your preferred version-control system.

For building packages you will also need LCFG::Build::Utils::OSXPkg.


LCFG::Build::Tools, LCFG::Build::Skeleton, lcfg-reltool(1), pkgbuild(1)


This is the list of platforms on which we have tested this software. We expect this software to work on any Unix-like platform which is supported by Perl.

Mac OS X 10.7


There are no known bugs in this application. Please report any problems to, feedback and patches are also always very welcome.


    Kenneth MacDonald <>
    Stephen Quinney <>


    Copyright (C) 2008-2012 University of Edinburgh. All rights reserved.

This library is free software; you can redistribute it and/or modify it under the terms of the GPL, version 2 or later.