From e4f7bda430ec969077828fe12693a36566e8a8c5 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Thu, 8 Jul 2010 01:43:30 -0400 Subject: [PATCH] Packaging - Updated 'update' script. - Began README that provides instructions on how to create packages for OSX. Unfinished. --- package-config/osx/README | 128 ++++++++++++++++++++++++++++++++++++++ package-config/osx/update | 4 ++ 2 files changed, 132 insertions(+) create mode 100644 package-config/osx/README diff --git a/package-config/osx/README b/package-config/osx/README new file mode 100644 index 000000000..54d539be0 --- /dev/null +++ b/package-config/osx/README @@ -0,0 +1,128 @@ +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 diff --git a/package-config/osx/update b/package-config/osx/update index 3204b1d2b..e21a8e2af 100755 --- a/package-config/osx/update +++ b/package-config/osx/update @@ -5,6 +5,7 @@ mkdir -p local/share/doc/task/scripts/bash mkdir -p local/share/doc/task/scripts/vim/ftdetect mkdir -p local/share/doc/task/scripts/vim/syntax mkdir -p local/share/doc/task/scripts/zsh +mkdir -p local/share/doc/task/rc mkdir -p local/share/man/man1 mkdir -p local/share/man/man5 @@ -25,6 +26,9 @@ cp ../../scripts/vim/ftdetect/* local/share/doc/task/scripts/vim/ftdetect cp ../../scripts/vim/syntax/* local/share/doc/task/scripts/vim/syntax cp ../../scripts/zsh/* local/share/doc/task/scripts/zsh +cp ../../doc/rc/*.theme local/share/doc/task/rc +cp ../../doc/rc/holidays* local/share/doc/task/rc + cp ../../doc/man/*.1 local/share/man/man1 cp ../../doc/man/*.5 local/share/man/man5