taskwarrior/package-config/osx
Paul Beckingham a66f59a7e1 Packaging
- PDF of OSX packaging instructions.
2010-07-08 21:13:04 -04:00
..
task.pmdoc Packaging for OSX 2010-05-23 11:03:56 -04:00
OSX-packaging.pdf Packaging 2010-07-08 21:13:04 -04:00
README Packaging 2010-07-08 01:43:30 -04:00
update Packaging 2010-07-08 01:43:30 -04:00

How to make an OSX package
--------------------------

Note: This is being written from the OSX 10.6 perspective, and may therefore
      contain steps that are different for 10.5, although I don't recall any
      actual differences.


0. Philosophy

  Only Fredde tags releases.  We only make builds from tagged commits.  We
  only release builds that build cleanly without errors or warnings.  We only
  release builds that pass 100% of the unit tests.


1. Prerequisites

  You will need an Intel Mac, running OSX 10.5 or later.
  You will need to install the Developer Tools, which are found on your OSX DVD.
  You will need git installed, version 1.5 or later.  See http://git-scm.com
  You will need autotools installed.  See http://www.gnu.org/software/autoconf

2. Get the code

  2.1 Clone the task git repository.  It is important that this is a throwaway
    clone of the repository, because we will do (locally) destructive things
    to it.

    $ git clone git://tasktools.org/task.git ~/task-package.git
    ...
    $ cd ~/task-package.git

  2.2 Making sure you have the right version of the code.  This assumes you are
    building task 1.9.2, but any version number is interchangeable.  Check out
    the correct branch, and make sure it is sitting at the correct commit, via
    a tag.

    $ git checkout 1.9.2
    $ git reset --hard v1.9.2

    If there is an error in this step, stop immediately, capture the output, and
    report the errors.

3. Build task

  3.1 First build the task binary.  Note the "-j 2" tells make to use both cores
    in your dual-core Intel CPU, which means faster compiles.  If yo own a quad
    core Mac, use "-j 4".  If you own a single core Mac, just type "make".

    $ autoreconf -f
    $ ./configure
    ...

    If any errors are reported, stop immediately, capture the output, and report
    the errors.
    
    $ make -j 2

    If there are any errors, or there are any warnings generated by the compiler,
    stop immediately, capture the output, and report the problem.  You'll need to
    watch as it builds.

4. Build the test suite

  4.1 The test suite exists to prove that we do not break task features from one
    release to the next.  While this is not a perfect solution, it has saved us
    many times from releasing code that is inferior.

    The first step is to modify the test suite Makefile to remove the Lua line.
    This is because we do not yet have dynamic detection of the Lua library for
    the unit tests.

    $ cd ~/task-package.git/src/tests
    $ vi Makefile

    Any text editor will do, but look for this line (line 5):

      LFLAGS  = -L/usr/local/lib -lncurses -llua

    change it to:

      LFLAGS  = -L/usr/local/lib -lncurses

    Now build the unit tests:

    $ make -j 2
    ...

  4.2 Run all the unit tests.

    $ ./run_all
    Skipping benchmarks
                                                                                
    Pass:     4241
    Fail:        0
    Skipped:     0
    Runtime:    86

    The output should look something like this, with 0 failed, and 0 skipped
    tests.  If there are any failures or skips, stop and mailed the log file,
    named 'all.log' to Paul & Fredde.

5. Assemble the parts

  5.1 There is a script that puts all the files in the right place, ready for
    packaging.  Run this:

    $ cd ~/task-package.git/package-config/osx
    $ ./update

6. Adjust the package details

  6.1 Launch the package manager.

    $ open -a /Developer/Applications/Utilies/PackageManager.app   

  6.2 Close the window that automatically opens.

  6.3 Using the File -> Open menu, open the file

    ~/task-package.git/packag-config/osx/task.pmdoc


  6.x Rename the package

7. Test the package

  7.1 Run the following commands