Hex Artifact Content

Artifact 0757f2f9f01ecae8ee642bffe56cf2e6bb6fc709:


0000: 23 21 2f 62 69 6e 2f 62 61 73 68 0a 23 20 53 68  #!/bin/bash.# Sh
0010: 65 6c 6c 20 53 63 72 69 70 74 20 74 6f 20 6d 61  ell Script to ma
0020: 6b 65 20 4d 61 63 20 4f 53 20 58 20 52 65 6c 65  ke Mac OS X Rele
0030: 61 73 65 73 20 6f 66 20 43 41 43 4b 65 79 0a 23  ases of CACKey.#
0040: 20 4b 65 6e 6e 65 74 68 20 56 61 6e 20 41 6c 73   Kenneth Van Als
0050: 74 79 6e 65 0a 23 20 6b 65 6e 6e 65 74 68 2e 6c  tyne.# kenneth.l
0060: 2e 76 61 6e 61 6c 73 74 79 6e 65 40 75 73 61 63  .vanalstyne@usac
0070: 65 2e 61 72 6d 79 2e 6d 69 6c 0a 43 41 43 4b 45  e.army.mil.CACKE
0080: 59 5f 56 45 52 53 49 4f 4e 3d 60 63 61 74 20 63  Y_VERSION=`cat c
0090: 6f 6e 66 69 67 75 72 65 2e 61 63 20 7c 20 67 72  onfigure.ac | gr
00a0: 65 70 20 41 43 5f 49 4e 49 54 20 7c 20 63 75 74  ep AC_INIT | cut
00b0: 20 2d 64 20 22 20 22 20 2d 66 20 32 20 7c 20 73   -d " " -f 2 | s
00c0: 65 64 20 27 73 5f 29 5f 5f 27 60 0a 0a 23 20 43  ed 's_)__'`..# C
00d0: 68 65 63 6b 20 74 6f 20 73 65 65 20 69 66 20 77  heck to see if w
00e0: 65 27 72 65 20 62 75 69 6c 64 69 6e 67 20 6f 6e  e're building on
00f0: 20 4d 61 63 20 4f 53 20 58 20 31 30 2e 37 20 22   Mac OS X 10.7 "
0100: 4c 69 6f 6e 22 0a 69 66 20 5b 20 22 60 75 6e 61  Lion".if [ "`una
0110: 6d 65 20 2d 72 20 7c 20 63 75 74 20 2d 64 20 2e  me -r | cut -d .
0120: 20 2d 66 20 31 60 22 20 3d 20 22 31 31 22 20 5d   -f 1`" = "11" ]
0130: 3b 20 74 68 65 6e 0a 09 4c 49 4f 4e 42 55 49 4c  ; then..LIONBUIL
0140: 44 3d 31 0a 66 69 0a 0a 23 20 55 73 61 67 65 20  D=1.fi..# Usage 
0150: 66 75 6e 63 74 69 6f 6e 0a 75 73 61 67 65 28 29  function.usage()
0160: 20 7b 0a 09 65 63 68 6f 20 22 55 73 61 67 65 3a   {..echo "Usage:
0170: 20 62 75 69 6c 64 5f 6f 73 78 2e 73 68 20 3c 74   build_osx.sh <t
0180: 61 72 67 65 74 3e 22 0a 09 65 63 68 6f 20 57 68  arget>"..echo Wh
0190: 65 72 65 20 74 61 72 67 65 74 20 69 73 20 6f 6e  ere target is on
01a0: 65 20 6f 66 3a 0a 09 65 63 68 6f 20 22 20 20 20  e of:..echo "   
01b0: 20 70 61 6e 74 68 65 72 20 20 2d 20 28 42 75 69   panther  - (Bui
01c0: 6c 64 73 20 31 30 2e 33 20 4c 69 62 72 61 72 79  lds 10.3 Library
01d0: 20 66 6f 72 20 50 50 43 47 33 29 20 28 4c 45 47   for PPCG3) (LEG
01e0: 41 43 59 29 22 0a 09 65 63 68 6f 20 22 20 20 20  ACY)"..echo "   
01f0: 20 74 69 67 65 72 20 20 2d 20 28 42 75 69 6c 64   tiger  - (Build
0200: 73 20 55 6e 69 76 65 72 73 61 6c 20 31 30 2e 34  s Universal 10.4
0210: 20 4c 69 62 72 61 72 79 20 66 6f 72 20 50 50 43   Library for PPC
0220: 47 33 2f 69 33 38 36 29 20 28 4c 45 47 41 43 59  G3/i386) (LEGACY
0230: 29 22 0a 09 65 63 68 6f 20 22 20 20 20 20 6c 65  )"..echo "    le
0240: 6f 70 61 72 64 20 20 2d 20 28 42 75 69 6c 64 73  opard  - (Builds
0250: 20 55 6e 69 76 65 72 73 61 6c 20 31 30 2e 35 20   Universal 10.5 
0260: 4c 69 62 72 61 72 79 20 66 6f 72 20 50 50 43 47  Library for PPCG
0270: 34 2f 69 33 38 36 29 22 0a 09 65 63 68 6f 20 22  4/i386)"..echo "
0280: 20 20 20 20 73 6e 6f 77 6c 65 6f 70 61 72 64 20      snowleopard 
0290: 20 2d 20 28 42 75 69 6c 64 73 20 55 6e 69 76 65   - (Builds Unive
02a0: 72 73 61 6c 20 31 30 2e 36 20 4c 69 62 72 61 72  rsal 10.6 Librar
02b0: 79 20 66 6f 72 20 69 33 38 36 2f 78 38 36 5f 36  y for i386/x86_6
02c0: 34 29 22 0a 09 65 63 68 6f 20 22 20 20 20 20 6c  4)"..echo "    l
02d0: 69 6f 6e 20 20 2d 20 28 42 75 69 6c 64 73 20 55  ion  - (Builds U
02e0: 6e 69 76 65 72 73 61 6c 20 31 30 2e 37 20 4c 69  niversal 10.7 Li
02f0: 62 72 61 72 79 20 66 6f 72 20 69 33 38 36 2f 78  brary for i386/x
0300: 38 36 5f 36 34 29 22 0a 09 65 63 68 6f 20 22 20  86_64)"..echo " 
0310: 20 20 20 61 6c 6c 20 2d 20 28 42 75 69 6c 64 73     all - (Builds
0320: 20 66 6f 72 20 61 6c 6c 20 73 75 70 70 6f 72 74   for all support
0330: 65 64 20 74 61 72 67 65 74 73 29 22 0a 09 65 63  ed targets)"..ec
0340: 68 6f 20 22 20 20 20 20 6c 65 67 61 63 79 20 2d  ho "    legacy -
0350: 20 28 42 75 69 6c 64 73 20 66 6f 72 20 61 6c 6c   (Builds for all
0360: 20 73 75 70 70 6f 72 74 65 64 20 74 61 72 67 65   supported targe
0370: 74 73 20 6f 6c 64 65 72 20 74 68 61 6e 20 31 30  ts older than 10
0380: 2e 37 29 22 0a 09 65 63 68 6f 20 22 20 20 20 20  .7)"..echo "    
0390: 63 6c 65 61 6e 20 2d 20 28 43 6c 65 61 6e 73 20  clean - (Cleans 
03a0: 75 70 29 22 0a 09 65 63 68 6f 20 22 52 75 6e 20  up)"..echo "Run 
03b0: 66 72 6f 6d 20 43 41 43 4b 65 79 20 42 75 69 6c  from CACKey Buil
03c0: 64 20 52 6f 6f 74 2e 22 0a 09 65 78 69 74 20 24  d Root."..exit $
03d0: 3f 0a 7d 0a 0a 23 20 43 6c 65 61 6e 20 75 70 20  ?.}..# Clean up 
03e0: 66 75 6e 63 74 69 6f 6e 0a 63 6c 65 61 6e 28 29  function.clean()
03f0: 20 7b 0a 09 72 6d 20 2d 66 20 62 75 69 6c 64 2f   {..rm -f build/
0400: 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64  cackey_osx_build
0410: 2f 63 61 63 6b 65 79 2e 64 79 6c 69 62 0a 09 72  /cackey.dylib..r
0420: 6d 20 2d 72 66 20 6d 61 63 62 75 69 6c 64 0a 09  m -rf macbuild..
0430: 72 6d 20 2d 72 66 20 62 75 69 6c 64 2f 63 61 63  rm -rf build/cac
0440: 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64 2f 2a 2e  key_osx_build/*.
0450: 70 6d 64 6f 63 0a 09 6d 61 6b 65 20 64 69 73 74  pmdoc..make dist
0460: 63 6c 65 61 6e 0a 7d 0a 0a 23 20 44 69 72 65 63  clean.}..# Direc
0470: 74 6f 72 79 20 63 72 65 61 74 69 6f 6e 20 66 75  tory creation fu
0480: 6e 63 74 69 6f 6e 0a 6d 61 6b 65 64 69 72 28 29  nction.makedir()
0490: 20 7b 0a 09 69 66 20 5b 20 22 60 75 6e 61 6d 65   {..if [ "`uname
04a0: 20 2d 72 20 7c 20 63 75 74 20 2d 64 20 2e 20 2d   -r | cut -d . -
04b0: 66 20 31 60 22 20 2d 6c 74 20 22 31 30 22 20 5d  f 1`" -lt "10" ]
04c0: 3b 20 74 68 65 6e 0a 09 09 4c 49 42 54 4f 4f 4c  ; then...LIBTOOL
04d0: 44 49 52 3d 2f 44 65 76 65 6c 6f 70 65 72 2f 75  DIR=/Developer/u
04e0: 73 72 2f 73 68 61 72 65 2f 6c 69 62 74 6f 6f 6c  sr/share/libtool
04f0: 0a 09 65 6c 73 65 0a 09 09 4c 49 42 54 4f 4f 4c  ..else...LIBTOOL
0500: 44 49 52 3d 2f 44 65 76 65 6c 6f 70 65 72 2f 75  DIR=/Developer/u
0510: 73 72 2f 73 68 61 72 65 2f 6c 69 62 74 6f 6f 6c  sr/share/libtool
0520: 2f 63 6f 6e 66 69 67 0a 09 66 69 0a 09 69 66 20  /config..fi..if 
0530: 5b 20 21 20 2d 64 20 6d 61 63 62 75 69 6c 64 20  [ ! -d macbuild 
0540: 5d 3b 20 74 68 65 6e 0a 09 09 6d 6b 64 69 72 20  ]; then...mkdir 
0550: 6d 61 63 62 75 69 6c 64 0a 09 09 6d 6b 64 69 72  macbuild...mkdir
0560: 20 6d 61 63 62 75 69 6c 64 2f 50 61 6e 74 68 65   macbuild/Panthe
0570: 72 0a 09 09 6d 6b 64 69 72 20 6d 61 63 62 75 69  r...mkdir macbui
0580: 6c 64 2f 54 69 67 65 72 0a 09 09 6d 6b 64 69 72  ld/Tiger...mkdir
0590: 20 6d 61 63 62 75 69 6c 64 2f 4c 65 6f 70 61 72   macbuild/Leopar
05a0: 64 0a 09 09 6d 6b 64 69 72 20 6d 61 63 62 75 69  d...mkdir macbui
05b0: 6c 64 2f 53 6e 6f 77 6c 65 6f 70 61 72 64 0a 09  ld/Snowleopard..
05c0: 09 6d 6b 64 69 72 20 6d 61 63 62 75 69 6c 64 2f  .mkdir macbuild/
05d0: 4c 69 6f 6e 0a 09 09 6d 6b 64 69 72 20 6d 61 63  Lion...mkdir mac
05e0: 62 75 69 6c 64 2f 70 6b 67 0a 09 66 69 0a 09 69  build/pkg..fi..i
05f0: 66 20 5b 20 21 20 2d 66 20 63 6f 6e 66 69 67 2e  f [ ! -f config.
0600: 67 75 65 73 73 20 5d 3b 20 74 68 65 6e 0a 09 09  guess ]; then...
0610: 63 70 20 24 7b 4c 49 42 54 4f 4f 4c 44 49 52 7d  cp ${LIBTOOLDIR}
0620: 2f 63 6f 6e 66 69 67 2e 67 75 65 73 73 20 2e 0a  /config.guess ..
0630: 09 66 69 0a 09 69 66 20 5b 20 21 20 2d 66 20 63  .fi..if [ ! -f c
0640: 6f 6e 66 69 67 2e 73 75 62 20 5d 3b 20 74 68 65  onfig.sub ]; the
0650: 6e 0a 09 09 63 70 20 24 7b 4c 49 42 54 4f 4f 4c  n...cp ${LIBTOOL
0660: 44 49 52 7d 2f 63 6f 6e 66 69 67 2e 73 75 62 20  DIR}/config.sub 
0670: 2e 0a 09 66 69 0a 09 69 66 20 5b 20 21 20 2d 66  ...fi..if [ ! -f
0680: 20 69 6e 73 74 61 6c 6c 2d 73 68 20 5d 3b 20 74   install-sh ]; t
0690: 68 65 6e 0a 09 09 63 70 20 24 7b 4c 49 42 54 4f  hen...cp ${LIBTO
06a0: 4f 4c 44 49 52 7d 2f 69 6e 73 74 61 6c 6c 2d 73  OLDIR}/install-s
06b0: 68 20 2e 0a 09 66 69 0a 7d 0a 0a 23 20 42 75 69  h ...fi.}..# Bui
06c0: 6c 64 20 66 75 6e 63 74 69 6f 6e 20 66 6f 72 20  ld function for 
06d0: 50 61 6e 74 68 65 72 0a 70 61 6e 74 68 65 72 28  Panther.panther(
06e0: 29 20 7b 0a 09 6d 61 6b 65 64 69 72 0a 09 48 45  ) {..makedir..HE
06f0: 41 44 45 52 53 3d 2f 44 65 76 65 6c 6f 70 65 72  ADERS=/Developer
0700: 2f 53 44 4b 73 2f 4d 61 63 4f 53 58 31 30 2e 33  /SDKs/MacOSX10.3
0710: 2e 39 2e 73 64 6b 2f 53 79 73 74 65 6d 2f 4c 69  .9.sdk/System/Li
0720: 62 72 61 72 79 2f 46 72 61 6d 65 77 6f 72 6b 73  brary/Frameworks
0730: 2f 50 43 53 43 2e 66 72 61 6d 65 77 6f 72 6b 2f  /PCSC.framework/
0740: 56 65 72 73 69 6f 6e 73 2f 41 2f 48 65 61 64 65  Versions/A/Heade
0750: 72 73 2f 0a 09 4c 49 42 52 41 52 59 3d 2f 44 65  rs/..LIBRARY=/De
0760: 76 65 6c 6f 70 65 72 2f 53 44 4b 73 2f 4d 61 63  veloper/SDKs/Mac
0770: 4f 53 58 31 30 2e 33 2e 39 2e 73 64 6b 2f 53 79  OSX10.3.9.sdk/Sy
0780: 73 74 65 6d 2f 4c 69 62 72 61 72 79 2f 46 72 61  stem/Library/Fra
0790: 6d 65 77 6f 72 6b 73 2f 50 43 53 43 2e 66 72 61  meworks/PCSC.fra
07a0: 6d 65 77 6f 72 6b 2f 50 43 53 43 0a 09 4f 53 58  mework/PCSC..OSX
07b0: 3d 50 61 6e 74 68 65 72 0a 09 50 4b 54 41 52 47  =Panther..PKTARG
07c0: 45 54 4f 53 3d 31 0a 09 4e 45 58 54 4f 53 58 56  ETOS=1..NEXTOSXV
07d0: 45 52 3d 31 30 2e 34 0a 09 43 55 52 4f 53 58 56  ER=10.4..CUROSXV
07e0: 45 52 3d 31 30 2e 33 0a 09 48 4f 53 54 3d 70 6f  ER=10.3..HOST=po
07f0: 77 65 72 70 63 2d 61 70 70 6c 65 2d 64 61 72 77  werpc-apple-darw
0800: 69 6e 37 0a 09 6d 61 6b 65 20 64 69 73 74 63 6c  in7..make distcl
0810: 65 61 6e 0a 09 41 52 43 48 3d 22 70 70 63 20 2d  ean..ARCH="ppc -
0820: 6d 63 70 75 3d 47 33 22 0a 09 43 46 4c 41 47 53  mcpu=G3"..CFLAGS
0830: 3d 22 2d 61 72 63 68 20 24 7b 41 52 43 48 7d 22  ="-arch ${ARCH}"
0840: 20 2e 2f 63 6f 6e 66 69 67 75 72 65 20 2d 2d 77   ./configure --w
0850: 69 74 68 2d 70 63 73 63 2d 68 65 61 64 65 72 73  ith-pcsc-headers
0860: 3d 24 7b 48 45 41 44 45 52 53 7d 20 2d 2d 77 69  =${HEADERS} --wi
0870: 74 68 2d 70 63 73 63 2d 6c 69 62 73 3d 24 7b 4c  th-pcsc-libs=${L
0880: 49 42 52 41 52 59 7d 20 2d 2d 68 6f 73 74 3d 24  IBRARY} --host=$
0890: 7b 48 4f 53 54 7d 0a 09 6d 61 6b 65 0a 09 63 70  {HOST}..make..cp
08a0: 20 6c 69 62 63 61 63 6b 65 79 2e 64 79 6c 69 62   libcackey.dylib
08b0: 20 6d 61 63 62 75 69 6c 64 2f 24 7b 4f 53 58 7d   macbuild/${OSX}
08c0: 2f 6c 69 62 63 61 63 6b 65 79 2e 64 79 6c 69 62  /libcackey.dylib
08d0: 0a 09 63 70 20 6c 69 62 63 61 63 6b 65 79 5f 67  ..cp libcackey_g
08e0: 2e 64 79 6c 69 62 20 6d 61 63 62 75 69 6c 64 2f  .dylib macbuild/
08f0: 24 7b 4f 53 58 7d 2f 6c 69 62 63 61 63 6b 65 79  ${OSX}/libcackey
0900: 5f 67 2e 64 79 6c 69 62 0a 09 70 6b 67 62 75 69  _g.dylib..pkgbui
0910: 6c 64 0a 7d 0a 0a 23 20 42 75 69 6c 64 20 66 75  ld.}..# Build fu
0920: 6e 63 74 69 6f 6e 20 66 6f 72 20 54 69 67 65 72  nction for Tiger
0930: 0a 74 69 67 65 72 28 29 20 7b 0a 09 6d 61 6b 65  .tiger() {..make
0940: 64 69 72 0a 09 48 45 41 44 45 52 53 3d 2f 44 65  dir..HEADERS=/De
0950: 76 65 6c 6f 70 65 72 2f 53 44 4b 73 2f 4d 61 63  veloper/SDKs/Mac
0960: 4f 53 58 31 30 2e 34 75 2e 73 64 6b 2f 53 79 73  OSX10.4u.sdk/Sys
0970: 74 65 6d 2f 4c 69 62 72 61 72 79 2f 46 72 61 6d  tem/Library/Fram
0980: 65 77 6f 72 6b 73 2f 50 43 53 43 2e 66 72 61 6d  eworks/PCSC.fram
0990: 65 77 6f 72 6b 2f 56 65 72 73 69 6f 6e 73 2f 41  ework/Versions/A
09a0: 2f 48 65 61 64 65 72 73 2f 0a 09 4c 49 42 52 41  /Headers/..LIBRA
09b0: 52 59 3d 2f 44 65 76 65 6c 6f 70 65 72 2f 53 44  RY=/Developer/SD
09c0: 4b 73 2f 4d 61 63 4f 53 58 31 30 2e 34 75 2e 73  Ks/MacOSX10.4u.s
09d0: 64 6b 2f 53 79 73 74 65 6d 2f 4c 69 62 72 61 72  dk/System/Librar
09e0: 79 2f 46 72 61 6d 65 77 6f 72 6b 73 2f 50 43 53  y/Frameworks/PCS
09f0: 43 2e 66 72 61 6d 65 77 6f 72 6b 2f 50 43 53 43  C.framework/PCSC
0a00: 0a 09 4c 49 42 3d 22 22 0a 09 41 52 43 48 4c 49  ..LIB=""..ARCHLI
0a10: 53 54 3d 22 22 0a 09 44 4c 49 42 3d 22 22 0a 09  ST=""..DLIB=""..
0a20: 44 41 52 43 48 4c 49 53 54 3d 22 22 0a 09 4f 53  DARCHLIST=""..OS
0a30: 58 3d 54 69 67 65 72 0a 09 50 4b 54 41 52 47 45  X=Tiger..PKTARGE
0a40: 54 4f 53 3d 32 0a 09 4e 45 58 54 4f 53 58 56 45  TOS=2..NEXTOSXVE
0a50: 52 3d 31 30 2e 35 0a 09 43 55 52 4f 53 58 56 45  R=10.5..CUROSXVE
0a60: 52 3d 31 30 2e 34 0a 09 66 6f 72 20 48 4f 53 54  R=10.4..for HOST
0a70: 20 69 6e 20 70 6f 77 65 72 70 63 2d 61 70 70 6c   in powerpc-appl
0a80: 65 2d 64 61 72 77 69 6e 38 20 69 33 38 36 2d 61  e-darwin8 i386-a
0a90: 70 70 6c 65 2d 64 61 72 77 69 6e 38 3b 20 64 6f  pple-darwin8; do
0aa0: 0a 09 09 67 65 6e 62 75 69 6c 64 0a 09 64 6f 6e  ...genbuild..don
0ab0: 65 0a 09 6c 69 62 62 75 69 6c 64 0a 09 70 6b 67  e..libbuild..pkg
0ac0: 62 75 69 6c 64 0a 7d 0a 0a 23 20 42 75 69 6c 64  build.}..# Build
0ad0: 20 66 75 6e 63 74 69 6f 6e 20 66 6f 72 20 4c 65   function for Le
0ae0: 6f 70 61 72 64 0a 6c 65 6f 70 61 72 64 28 29 20  opard.leopard() 
0af0: 7b 0a 09 6d 61 6b 65 64 69 72 0a 09 48 45 41 44  {..makedir..HEAD
0b00: 45 52 53 3d 2f 44 65 76 65 6c 6f 70 65 72 2f 53  ERS=/Developer/S
0b10: 44 4b 73 2f 4d 61 63 4f 53 58 31 30 2e 35 2e 73  DKs/MacOSX10.5.s
0b20: 64 6b 2f 53 79 73 74 65 6d 2f 4c 69 62 72 61 72  dk/System/Librar
0b30: 79 2f 46 72 61 6d 65 77 6f 72 6b 73 2f 50 43 53  y/Frameworks/PCS
0b40: 43 2e 66 72 61 6d 65 77 6f 72 6b 2f 56 65 72 73  C.framework/Vers
0b50: 69 6f 6e 73 2f 41 2f 48 65 61 64 65 72 73 2f 0a  ions/A/Headers/.
0b60: 09 4c 49 42 52 41 52 59 3d 2f 44 65 76 65 6c 6f  .LIBRARY=/Develo
0b70: 70 65 72 2f 53 44 4b 73 2f 4d 61 63 4f 53 58 31  per/SDKs/MacOSX1
0b80: 30 2e 35 2e 73 64 6b 2f 53 79 73 74 65 6d 2f 4c  0.5.sdk/System/L
0b90: 69 62 72 61 72 79 2f 46 72 61 6d 65 77 6f 72 6b  ibrary/Framework
0ba0: 73 2f 50 43 53 43 2e 66 72 61 6d 65 77 6f 72 6b  s/PCSC.framework
0bb0: 2f 50 43 53 43 0a 09 4c 49 42 3d 22 22 0a 09 41  /PCSC..LIB=""..A
0bc0: 52 43 48 4c 49 53 54 3d 22 22 0a 09 44 4c 49 42  RCHLIST=""..DLIB
0bd0: 3d 22 22 0a 09 44 41 52 43 48 4c 49 53 54 3d 22  =""..DARCHLIST="
0be0: 22 0a 09 4f 53 58 3d 4c 65 6f 70 61 72 64 0a 09  "..OSX=Leopard..
0bf0: 50 4b 54 41 52 47 45 54 4f 53 3d 33 0a 09 4e 45  PKTARGETOS=3..NE
0c00: 58 54 4f 53 58 56 45 52 3d 31 30 2e 36 0a 09 43  XTOSXVER=10.6..C
0c10: 55 52 4f 53 58 56 45 52 3d 31 30 2e 35 0a 09 66  UROSXVER=10.5..f
0c20: 6f 72 20 48 4f 53 54 20 69 6e 20 70 6f 77 65 72  or HOST in power
0c30: 70 63 2d 61 70 70 6c 65 2d 64 61 72 77 69 6e 39  pc-apple-darwin9
0c40: 20 69 33 38 36 2d 61 70 70 6c 65 2d 64 61 72 77   i386-apple-darw
0c50: 69 6e 39 3b 20 64 6f 0a 09 09 67 65 6e 62 75 69  in9; do...genbui
0c60: 6c 64 0a 09 64 6f 6e 65 0a 09 6c 69 62 62 75 69  ld..done..libbui
0c70: 6c 64 0a 09 70 6b 67 62 75 69 6c 64 0a 7d 0a 0a  ld..pkgbuild.}..
0c80: 23 20 42 75 69 6c 64 20 66 75 6e 63 74 69 6f 6e  # Build function
0c90: 20 66 6f 72 20 53 6e 6f 77 20 4c 65 6f 70 61 72   for Snow Leopar
0ca0: 64 0a 73 6e 6f 77 6c 65 6f 70 61 72 64 28 29 20  d.snowleopard() 
0cb0: 7b 0a 09 6d 61 6b 65 64 69 72 0a 09 48 45 41 44  {..makedir..HEAD
0cc0: 45 52 53 3d 2f 44 65 76 65 6c 6f 70 65 72 2f 53  ERS=/Developer/S
0cd0: 44 4b 73 2f 4d 61 63 4f 53 58 31 30 2e 36 2e 73  DKs/MacOSX10.6.s
0ce0: 64 6b 2f 53 79 73 74 65 6d 2f 4c 69 62 72 61 72  dk/System/Librar
0cf0: 79 2f 46 72 61 6d 65 77 6f 72 6b 73 2f 50 43 53  y/Frameworks/PCS
0d00: 43 2e 66 72 61 6d 65 77 6f 72 6b 2f 56 65 72 73  C.framework/Vers
0d10: 69 6f 6e 73 2f 41 2f 48 65 61 64 65 72 73 2f 0a  ions/A/Headers/.
0d20: 09 4c 49 42 52 41 52 59 3d 2f 44 65 76 65 6c 6f  .LIBRARY=/Develo
0d30: 70 65 72 2f 53 44 4b 73 2f 4d 61 63 4f 53 58 31  per/SDKs/MacOSX1
0d40: 30 2e 36 2e 73 64 6b 2f 53 79 73 74 65 6d 2f 4c  0.6.sdk/System/L
0d50: 69 62 72 61 72 79 2f 46 72 61 6d 65 77 6f 72 6b  ibrary/Framework
0d60: 73 2f 50 43 53 43 2e 66 72 61 6d 65 77 6f 72 6b  s/PCSC.framework
0d70: 2f 50 43 53 43 0a 09 4c 49 42 3d 22 22 0a 09 41  /PCSC..LIB=""..A
0d80: 52 43 48 4c 49 53 54 3d 22 22 0a 09 44 4c 49 42  RCHLIST=""..DLIB
0d90: 3d 22 22 0a 09 44 41 52 43 48 4c 49 53 54 3d 22  =""..DARCHLIST="
0da0: 22 0a 09 4f 53 58 3d 53 6e 6f 77 6c 65 6f 70 61  "..OSX=Snowleopa
0db0: 72 64 0a 09 50 4b 54 41 52 47 45 54 4f 53 3d 33  rd..PKTARGETOS=3
0dc0: 0a 09 4e 45 58 54 4f 53 58 56 45 52 3d 31 30 2e  ..NEXTOSXVER=10.
0dd0: 37 0a 09 43 55 52 4f 53 58 56 45 52 3d 31 30 2e  7..CUROSXVER=10.
0de0: 36 0a 09 66 6f 72 20 48 4f 53 54 20 69 6e 20 69  6..for HOST in i
0df0: 33 38 36 2d 61 70 70 6c 65 2d 64 61 72 77 69 6e  386-apple-darwin
0e00: 31 30 20 78 38 36 5f 36 34 2d 61 70 70 6c 65 2d  10 x86_64-apple-
0e10: 64 61 72 77 69 6e 31 30 3b 20 64 6f 0a 09 09 67  darwin10; do...g
0e20: 65 6e 62 75 69 6c 64 0a 09 64 6f 6e 65 0a 09 6c  enbuild..done..l
0e30: 69 62 62 75 69 6c 64 0a 09 70 6b 67 62 75 69 6c  ibbuild..pkgbuil
0e40: 64 0a 7d 0a 0a 23 20 42 75 69 6c 64 20 66 75 6e  d.}..# Build fun
0e50: 63 74 69 6f 6e 20 66 6f 72 20 4c 69 6f 6e 0a 6c  ction for Lion.l
0e60: 69 6f 6e 28 29 20 7b 0a 09 6d 61 6b 65 64 69 72  ion() {..makedir
0e70: 0a 09 48 45 41 44 45 52 53 3d 2f 44 65 76 65 6c  ..HEADERS=/Devel
0e80: 6f 70 65 72 2f 53 44 4b 73 2f 4d 61 63 4f 53 58  oper/SDKs/MacOSX
0e90: 31 30 2e 37 2e 73 64 6b 2f 53 79 73 74 65 6d 2f  10.7.sdk/System/
0ea0: 4c 69 62 72 61 72 79 2f 46 72 61 6d 65 77 6f 72  Library/Framewor
0eb0: 6b 73 2f 50 43 53 43 2e 66 72 61 6d 65 77 6f 72  ks/PCSC.framewor
0ec0: 6b 2f 56 65 72 73 69 6f 6e 73 2f 41 2f 48 65 61  k/Versions/A/Hea
0ed0: 64 65 72 73 2f 0a 09 4c 49 42 52 41 52 59 3d 2f  ders/..LIBRARY=/
0ee0: 44 65 76 65 6c 6f 70 65 72 2f 53 44 4b 73 2f 4d  Developer/SDKs/M
0ef0: 61 63 4f 53 58 31 30 2e 37 2e 73 64 6b 2f 53 79  acOSX10.7.sdk/Sy
0f00: 73 74 65 6d 2f 4c 69 62 72 61 72 79 2f 46 72 61  stem/Library/Fra
0f10: 6d 65 77 6f 72 6b 73 2f 50 43 53 43 2e 66 72 61  meworks/PCSC.fra
0f20: 6d 65 77 6f 72 6b 2f 50 43 53 43 0a 09 4c 49 42  mework/PCSC..LIB
0f30: 3d 22 22 0a 09 41 52 43 48 4c 49 53 54 3d 22 22  =""..ARCHLIST=""
0f40: 0a 09 44 4c 49 42 3d 22 22 0a 09 44 41 52 43 48  ..DLIB=""..DARCH
0f50: 4c 49 53 54 3d 22 22 0a 09 4f 53 58 3d 4c 69 6f  LIST=""..OSX=Lio
0f60: 6e 0a 09 50 4b 54 41 52 47 45 54 4f 53 3d 33 0a  n..PKTARGETOS=3.
0f70: 09 4e 45 58 54 4f 53 58 56 45 52 3d 31 30 2e 38  .NEXTOSXVER=10.8
0f80: 0a 09 43 55 52 4f 53 58 56 45 52 3d 31 30 2e 37  ..CUROSXVER=10.7
0f90: 0a 09 66 6f 72 20 48 4f 53 54 20 69 6e 20 69 33  ..for HOST in i3
0fa0: 38 36 2d 61 70 70 6c 65 2d 64 61 72 77 69 6e 31  86-apple-darwin1
0fb0: 31 20 78 38 36 5f 36 34 2d 61 70 70 6c 65 2d 64  1 x86_64-apple-d
0fc0: 61 72 77 69 6e 31 31 3b 20 64 6f 0a 09 09 67 65  arwin11; do...ge
0fd0: 6e 62 75 69 6c 64 0a 09 64 6f 6e 65 0a 09 6c 69  nbuild..done..li
0fe0: 62 62 75 69 6c 64 0a 09 70 6b 67 62 75 69 6c 64  bbuild..pkgbuild
0ff0: 0a 7d 0a 0a 23 20 47 65 6e 65 72 69 63 20 62 75  .}..# Generic bu
1000: 69 6c 64 20 66 75 6e 63 74 69 6f 6e 0a 67 65 6e  ild function.gen
1010: 62 75 69 6c 64 28 29 20 7b 0a 09 6d 61 6b 65 20  build() {..make 
1020: 64 69 73 74 63 6c 65 61 6e 0a 09 41 52 43 48 3d  distclean..ARCH=
1030: 60 65 63 68 6f 20 24 7b 48 4f 53 54 7d 20 7c 20  `echo ${HOST} | 
1040: 63 75 74 20 2d 64 20 22 2d 22 20 2d 66 20 31 60  cut -d "-" -f 1`
1050: 0a 09 69 66 20 5b 20 24 7b 41 52 43 48 7d 20 3d  ..if [ ${ARCH} =
1060: 3d 20 22 70 6f 77 65 72 70 63 22 20 5d 3b 20 74  = "powerpc" ]; t
1070: 68 65 6e 0a 09 09 69 66 20 5b 20 24 7b 4f 53 58  hen...if [ ${OSX
1080: 7d 20 3d 3d 20 22 4c 65 6f 70 61 72 64 22 20 5d  } == "Leopard" ]
1090: 3b 20 74 68 65 6e 0a 09 09 09 41 52 43 48 3d 22  ; then....ARCH="
10a0: 70 70 63 20 2d 6d 63 70 75 3d 47 34 22 0a 09 09  ppc -mcpu=G4"...
10b0: 65 6c 73 65 0a 09 09 09 41 52 43 48 3d 22 70 70  else....ARCH="pp
10c0: 63 20 2d 6d 63 70 75 3d 47 33 22 0a 09 09 66 69  c -mcpu=G3"...fi
10d0: 0a 09 66 69 0a 09 69 66 20 5b 20 22 24 7b 4c 49  ..fi..if [ "${LI
10e0: 4f 4e 42 55 49 4c 44 7d 22 20 3d 20 31 20 5d 3b  ONBUILD}" = 1 ];
10f0: 20 74 68 65 6e 0a 09 09 69 66 20 5b 20 22 24 7b   then...if [ "${
1100: 41 52 43 48 7d 22 20 3d 3d 20 22 70 70 63 20 2d  ARCH}" == "ppc -
1110: 6d 63 70 75 3d 47 34 22 20 5d 3b 20 74 68 65 6e  mcpu=G4" ]; then
1120: 0a 09 09 09 43 43 3d 70 6f 77 65 72 70 63 2d 61  ....CC=powerpc-a
1130: 70 70 6c 65 2d 64 61 72 77 69 6e 31 31 2d 67 63  pple-darwin11-gc
1140: 63 2d 34 2e 32 2e 31 20 43 50 50 3d 70 6f 77 65  c-4.2.1 CPP=powe
1150: 72 70 63 2d 61 70 70 6c 65 2d 64 61 72 77 69 6e  rpc-apple-darwin
1160: 31 31 2d 63 70 70 2d 34 2e 32 2e 31 20 43 46 4c  11-cpp-4.2.1 CFL
1170: 41 47 53 3d 22 2d 6d 33 32 20 2d 49 2f 44 65 76  AGS="-m32 -I/Dev
1180: 65 6c 6f 70 65 72 2f 50 6c 61 74 66 6f 72 6d 73  eloper/Platforms
1190: 2f 69 50 68 6f 6e 65 4f 53 2e 70 6c 61 74 66 6f  /iPhoneOS.platfo
11a0: 72 6d 2f 44 65 76 65 6c 6f 70 65 72 2f 75 73 72  rm/Developer/usr
11b0: 2f 6c 69 62 2f 67 63 63 2f 70 6f 77 65 72 70 63  /lib/gcc/powerpc
11c0: 2d 61 70 70 6c 65 2d 64 61 72 77 69 6e 31 30 2f  -apple-darwin10/
11d0: 34 2e 32 2e 31 2f 69 6e 63 6c 75 64 65 20 2d 69  4.2.1/include -i
11e0: 73 79 73 72 6f 6f 74 20 2f 44 65 76 65 6c 6f 70  sysroot /Develop
11f0: 65 72 2f 53 44 4b 73 2f 4d 61 63 4f 53 58 31 30  er/SDKs/MacOSX10
1200: 2e 35 2e 73 64 6b 22 20 43 50 50 46 4c 41 47 53  .5.sdk" CPPFLAGS
1210: 3d 22 2d 44 5f 4c 49 42 43 5f 4c 49 4d 49 54 53  ="-D_LIBC_LIMITS
1220: 5f 48 5f 22 20 2e 2f 63 6f 6e 66 69 67 75 72 65  _H_" ./configure
1230: 20 2d 2d 77 69 74 68 2d 70 63 73 63 2d 68 65 61   --with-pcsc-hea
1240: 64 65 72 73 3d 24 7b 48 45 41 44 45 52 53 7d 20  ders=${HEADERS} 
1250: 2d 2d 77 69 74 68 2d 70 63 73 63 2d 6c 69 62 73  --with-pcsc-libs
1260: 3d 24 7b 4c 49 42 52 41 52 59 7d 20 2d 2d 68 6f  =${LIBRARY} --ho
1270: 73 74 3d 24 7b 48 4f 53 54 7d 0a 09 09 65 6c 73  st=${HOST}...els
1280: 65 0a 09 09 09 43 46 4c 41 47 53 3d 22 2d 61 72  e....CFLAGS="-ar
1290: 63 68 20 24 7b 41 52 43 48 7d 22 20 2e 2f 63 6f  ch ${ARCH}" ./co
12a0: 6e 66 69 67 75 72 65 20 2d 2d 77 69 74 68 2d 70  nfigure --with-p
12b0: 63 73 63 2d 68 65 61 64 65 72 73 3d 24 7b 48 45  csc-headers=${HE
12c0: 41 44 45 52 53 7d 20 2d 2d 77 69 74 68 2d 70 63  ADERS} --with-pc
12d0: 73 63 2d 6c 69 62 73 3d 24 7b 4c 49 42 52 41 52  sc-libs=${LIBRAR
12e0: 59 7d 20 2d 2d 68 6f 73 74 3d 24 7b 48 4f 53 54  Y} --host=${HOST
12f0: 7d 0a 09 09 66 69 0a 09 65 6c 73 65 0a 09 09 43  }...fi..else...C
1300: 46 4c 41 47 53 3d 22 2d 61 72 63 68 20 24 7b 41  FLAGS="-arch ${A
1310: 52 43 48 7d 22 20 2e 2f 63 6f 6e 66 69 67 75 72  RCH}" ./configur
1320: 65 20 2d 2d 77 69 74 68 2d 70 63 73 63 2d 68 65  e --with-pcsc-he
1330: 61 64 65 72 73 3d 24 7b 48 45 41 44 45 52 53 7d  aders=${HEADERS}
1340: 20 2d 2d 77 69 74 68 2d 70 63 73 63 2d 6c 69 62   --with-pcsc-lib
1350: 73 3d 24 7b 4c 49 42 52 41 52 59 7d 20 2d 2d 68  s=${LIBRARY} --h
1360: 6f 73 74 3d 24 7b 48 4f 53 54 7d 0a 09 66 69 0a  ost=${HOST}..fi.
1370: 09 6d 61 6b 65 0a 09 63 70 20 6c 69 62 63 61 63  .make..cp libcac
1380: 6b 65 79 2e 64 79 6c 69 62 20 6d 61 63 62 75 69  key.dylib macbui
1390: 6c 64 2f 24 7b 4f 53 58 7d 2f 6c 69 62 63 61 63  ld/${OSX}/libcac
13a0: 6b 65 79 2e 64 79 6c 69 62 2e 60 65 63 68 6f 20  key.dylib.`echo 
13b0: 24 7b 41 52 43 48 7d 20 7c 20 63 75 74 20 2d 64  ${ARCH} | cut -d
13c0: 20 27 20 27 20 2d 66 20 31 60 0a 09 63 70 20 6c   ' ' -f 1`..cp l
13d0: 69 62 63 61 63 6b 65 79 5f 67 2e 64 79 6c 69 62  ibcackey_g.dylib
13e0: 20 6d 61 63 62 75 69 6c 64 2f 24 7b 4f 53 58 7d   macbuild/${OSX}
13f0: 2f 6c 69 62 63 61 63 6b 65 79 5f 67 2e 64 79 6c  /libcackey_g.dyl
1400: 69 62 2e 60 65 63 68 6f 20 24 7b 41 52 43 48 7d  ib.`echo ${ARCH}
1410: 20 7c 20 63 75 74 20 2d 64 20 27 20 27 20 2d 66   | cut -d ' ' -f
1420: 20 31 60 20 0a 7d 0a 0a 23 20 4c 69 62 72 61 72   1` .}..# Librar
1430: 79 20 62 75 69 6c 64 20 66 75 6e 63 74 69 6f 6e  y build function
1440: 0a 6c 69 62 62 75 69 6c 64 28 29 20 7b 0a 09 66  .libbuild() {..f
1450: 6f 72 20 4c 49 42 20 69 6e 20 6d 61 63 62 75 69  or LIB in macbui
1460: 6c 64 2f 24 7b 4f 53 58 7d 2f 6c 69 62 63 61 63  ld/${OSX}/libcac
1470: 6b 65 79 2e 64 79 6c 69 62 2e 2a 3b 20 64 6f 0a  key.dylib.*; do.
1480: 09 09 41 52 43 48 4c 49 53 54 3d 22 24 7b 41 52  ..ARCHLIST="${AR
1490: 43 48 4c 49 53 54 7d 20 60 65 63 68 6f 20 27 2d  CHLIST} `echo '-
14a0: 61 72 63 68 20 27 60 20 60 65 63 68 6f 20 24 7b  arch '` `echo ${
14b0: 4c 49 42 7d 20 7c 20 63 75 74 20 2d 64 20 2e 20  LIB} | cut -d . 
14c0: 2d 66 20 33 60 20 60 65 63 68 6f 20 27 20 27 60  -f 3` `echo ' '`
14d0: 20 60 65 63 68 6f 20 24 7b 4c 49 42 7d 60 22 0a   `echo ${LIB}`".
14e0: 09 64 6f 6e 65 0a 09 6c 69 70 6f 20 2d 63 72 65  .done..lipo -cre
14f0: 61 74 65 20 24 7b 41 52 43 48 4c 49 53 54 7d 20  ate ${ARCHLIST} 
1500: 2d 6f 75 74 70 75 74 20 6d 61 63 62 75 69 6c 64  -output macbuild
1510: 2f 24 7b 4f 53 58 7d 2f 6c 69 62 63 61 63 6b 65  /${OSX}/libcacke
1520: 79 2e 64 79 6c 69 62 0a 09 66 6f 72 20 44 4c 49  y.dylib..for DLI
1530: 42 20 69 6e 20 6d 61 63 62 75 69 6c 64 2f 24 7b  B in macbuild/${
1540: 4f 53 58 7d 2f 6c 69 62 63 61 63 6b 65 79 5f 67  OSX}/libcackey_g
1550: 2e 64 79 6c 69 62 2e 2a 3b 20 64 6f 0a 09 09 44  .dylib.*; do...D
1560: 41 52 43 48 4c 49 53 54 3d 22 24 7b 44 41 52 43  ARCHLIST="${DARC
1570: 48 4c 49 53 54 7d 20 60 65 63 68 6f 20 27 2d 61  HLIST} `echo '-a
1580: 72 63 68 20 27 60 20 60 65 63 68 6f 20 24 7b 44  rch '` `echo ${D
1590: 4c 49 42 7d 20 7c 20 63 75 74 20 2d 64 20 2e 20  LIB} | cut -d . 
15a0: 2d 66 20 33 60 20 60 65 63 68 6f 20 27 20 27 60  -f 3` `echo ' '`
15b0: 20 60 65 63 68 6f 20 24 7b 44 4c 49 42 7d 60 22   `echo ${DLIB}`"
15c0: 0a 09 64 6f 6e 65 0a 09 6c 69 70 6f 20 2d 63 72  ..done..lipo -cr
15d0: 65 61 74 65 20 24 7b 44 41 52 43 48 4c 49 53 54  eate ${DARCHLIST
15e0: 7d 20 2d 6f 75 74 70 75 74 20 6d 61 63 62 75 69  } -output macbui
15f0: 6c 64 2f 24 7b 4f 53 58 7d 2f 6c 69 62 63 61 63  ld/${OSX}/libcac
1600: 6b 65 79 5f 67 2e 64 79 6c 69 62 0a 09 72 6d 20  key_g.dylib..rm 
1610: 6d 61 63 62 75 69 6c 64 2f 24 7b 4f 53 58 7d 2f  macbuild/${OSX}/
1620: 6c 69 62 63 61 63 6b 65 79 2a 2e 64 79 6c 69 62  libcackey*.dylib
1630: 2e 2a 0a 7d 0a 0a 23 20 46 75 6e 63 74 69 6f 6e  .*.}..# Function
1640: 20 74 6f 20 62 75 69 6c 64 20 4d 61 63 20 4f 53   to build Mac OS
1650: 20 58 20 50 61 63 6b 61 67 65 73 0a 70 6b 67 62   X Packages.pkgb
1660: 75 69 6c 64 28 29 20 7b 0a 09 69 66 20 5b 20 22  uild() {..if [ "
1670: 60 75 6e 61 6d 65 20 2d 72 20 7c 20 63 75 74 20  `uname -r | cut 
1680: 2d 64 20 2e 20 2d 66 20 31 60 22 20 2d 6c 74 20  -d . -f 1`" -lt 
1690: 22 31 30 22 20 5d 3b 20 74 68 65 6e 0a 09 09 4c  "10" ]; then...L
16a0: 49 42 43 41 43 4b 45 59 47 3d 6c 69 62 63 61 63  IBCACKEYG=libcac
16b0: 6b 65 79 67 2e 70 6b 67 0a 09 65 6c 73 65 0a 09  keyg.pkg..else..
16c0: 09 4c 49 42 43 41 43 4b 45 59 47 3d 6c 69 62 63  .LIBCACKEYG=libc
16d0: 61 63 6b 65 79 5f 67 2e 70 6b 67 0a 09 66 69 0a  ackey_g.pkg..fi.
16e0: 09 72 6d 20 2d 66 20 62 75 69 6c 64 2f 63 61 63  .rm -f build/cac
16f0: 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64 2f 63 61  key_osx_build/ca
1700: 63 6b 65 79 2e 64 79 6c 69 62 0a 09 6c 6e 20 6d  ckey.dylib..ln m
1710: 61 63 62 75 69 6c 64 2f 24 7b 4f 53 58 7d 2f 6c  acbuild/${OSX}/l
1720: 69 62 63 61 63 6b 65 79 2e 64 79 6c 69 62 20 62  ibcackey.dylib b
1730: 75 69 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78 5f  uild/cackey_osx_
1740: 62 75 69 6c 64 2f 63 61 63 6b 65 79 2e 64 79 6c  build/cackey.dyl
1750: 69 62 0a 09 66 6f 72 20 50 4d 44 4f 43 20 69 6e  ib..for PMDOC in
1760: 20 62 75 69 6c 64 2f 63 61 63 6b 65 79 5f 6f 73   build/cackey_os
1770: 78 5f 62 75 69 6c 64 2f 54 65 6d 70 6c 61 74 65  x_build/Template
1780: 5f 70 6d 62 75 69 6c 64 2f 2a 2e 69 6e 3b 20 64  _pmbuild/*.in; d
1790: 6f 0a 09 09 50 4d 44 4f 43 3d 22 60 65 63 68 6f  o...PMDOC="`echo
17a0: 20 22 24 7b 50 4d 44 4f 43 7d 22 20 7c 20 73 65   "${PMDOC}" | se
17b0: 64 20 27 73 7c 6c 2e 69 6e 7c 6c 7c 67 27 20 7c  d 's|l.in|l|g' |
17c0: 20 73 65 64 20 27 73 7c 62 75 69 6c 64 2f 63 61   sed 's|build/ca
17d0: 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64 2f 54  ckey_osx_build/T
17e0: 65 6d 70 6c 61 74 65 5f 70 6d 62 75 69 6c 64 2f  emplate_pmbuild/
17f0: 7c 7c 67 27 60 22 0a 09 09 55 55 49 44 3d 22 60  ||g'`"...UUID="`
1800: 70 79 74 68 6f 6e 20 2d 63 20 27 69 6d 70 6f 72  python -c 'impor
1810: 74 20 75 75 69 64 3b 20 70 72 69 6e 74 20 75 75  t uuid; print uu
1820: 69 64 2e 75 75 69 64 31 28 29 27 20 7c 20 64 64  id.uuid1()' | dd
1830: 20 63 6f 6e 76 3d 75 63 61 73 65 20 32 3e 2f 64   conv=ucase 2>/d
1840: 65 76 2f 6e 75 6c 6c 60 22 0a 09 09 6d 6b 64 69  ev/null`"...mkdi
1850: 72 20 2d 70 20 62 75 69 6c 64 2f 63 61 63 6b 65  r -p build/cacke
1860: 79 5f 6f 73 78 5f 62 75 69 6c 64 2f 24 7b 4f 53  y_osx_build/${OS
1870: 58 7d 5f 70 6d 62 75 69 6c 64 2e 70 6d 64 6f 63  X}_pmbuild.pmdoc
1880: 0a 09 09 73 65 64 20 22 73 7c 40 40 42 55 49 4c  ...sed "s|@@BUIL
1890: 44 52 4f 4f 54 44 49 52 40 40 7c 24 28 70 77 64  DROOTDIR@@|$(pwd
18a0: 29 7c 67 22 20 62 75 69 6c 64 2f 63 61 63 6b 65  )|g" build/cacke
18b0: 79 5f 6f 73 78 5f 62 75 69 6c 64 2f 54 65 6d 70  y_osx_build/Temp
18c0: 6c 61 74 65 5f 70 6d 62 75 69 6c 64 2f 24 7b 50  late_pmbuild/${P
18d0: 4d 44 4f 43 7d 2e 69 6e 20 3e 20 62 75 69 6c 64  MDOC}.in > build
18e0: 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c  /cackey_osx_buil
18f0: 64 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75 69 6c 64  d/${OSX}_pmbuild
1900: 2e 70 6d 64 6f 63 2f 24 7b 50 4d 44 4f 43 7d 0a  .pmdoc/${PMDOC}.
1910: 09 09 73 65 64 20 22 73 7c 40 40 4f 53 58 56 45  ..sed "s|@@OSXVE
1920: 52 53 49 4f 4e 40 40 7c 24 7b 4f 53 58 7d 7c 67  RSION@@|${OSX}|g
1930: 22 20 62 75 69 6c 64 2f 63 61 63 6b 65 79 5f 6f  " build/cackey_o
1940: 73 78 5f 62 75 69 6c 64 2f 24 7b 4f 53 58 7d 5f  sx_build/${OSX}_
1950: 70 6d 62 75 69 6c 64 2e 70 6d 64 6f 63 2f 24 7b  pmbuild.pmdoc/${
1960: 50 4d 44 4f 43 7d 20 3e 20 62 75 69 6c 64 2f 63  PMDOC} > build/c
1970: 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64 2f  ackey_osx_build/
1980: 24 7b 4f 53 58 7d 5f 70 6d 62 75 69 6c 64 2e 70  ${OSX}_pmbuild.p
1990: 6d 64 6f 63 2f 24 7b 50 4d 44 4f 43 7d 2e 31 0a  mdoc/${PMDOC}.1.
19a0: 09 09 73 65 64 20 22 73 7c 40 40 55 55 49 44 40  ..sed "s|@@UUID@
19b0: 40 7c 24 7b 55 55 49 44 7d 7c 67 22 20 62 75 69  @|${UUID}|g" bui
19c0: 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75  ld/cackey_osx_bu
19d0: 69 6c 64 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75 69  ild/${OSX}_pmbui
19e0: 6c 64 2e 70 6d 64 6f 63 2f 24 7b 50 4d 44 4f 43  ld.pmdoc/${PMDOC
19f0: 7d 2e 31 20 3e 20 62 75 69 6c 64 2f 63 61 63 6b  }.1 > build/cack
1a00: 65 79 5f 6f 73 78 5f 62 75 69 6c 64 2f 24 7b 4f  ey_osx_build/${O
1a10: 53 58 7d 5f 70 6d 62 75 69 6c 64 2e 70 6d 64 6f  SX}_pmbuild.pmdo
1a20: 63 2f 24 7b 50 4d 44 4f 43 7d 0a 09 09 73 65 64  c/${PMDOC}...sed
1a30: 20 22 73 7c 40 40 54 41 52 47 45 54 4f 53 40 40   "s|@@TARGETOS@@
1a40: 7c 24 7b 50 4b 54 41 52 47 45 54 4f 53 7d 7c 67  |${PKTARGETOS}|g
1a50: 22 20 62 75 69 6c 64 2f 63 61 63 6b 65 79 5f 6f  " build/cackey_o
1a60: 73 78 5f 62 75 69 6c 64 2f 24 7b 4f 53 58 7d 5f  sx_build/${OSX}_
1a70: 70 6d 62 75 69 6c 64 2e 70 6d 64 6f 63 2f 24 7b  pmbuild.pmdoc/${
1a80: 50 4d 44 4f 43 7d 20 3e 20 62 75 69 6c 64 2f 63  PMDOC} > build/c
1a90: 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64 2f  ackey_osx_build/
1aa0: 24 7b 4f 53 58 7d 5f 70 6d 62 75 69 6c 64 2e 70  ${OSX}_pmbuild.p
1ab0: 6d 64 6f 63 2f 24 7b 50 4d 44 4f 43 7d 2e 31 0a  mdoc/${PMDOC}.1.
1ac0: 09 09 73 65 64 20 22 73 7c 40 40 4e 45 58 54 4f  ..sed "s|@@NEXTO
1ad0: 53 58 56 45 52 40 40 7c 24 7b 4e 45 58 54 4f 53  SXVER@@|${NEXTOS
1ae0: 58 56 45 52 7d 7c 67 22 20 62 75 69 6c 64 2f 63  XVER}|g" build/c
1af0: 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64 2f  ackey_osx_build/
1b00: 24 7b 4f 53 58 7d 5f 70 6d 62 75 69 6c 64 2e 70  ${OSX}_pmbuild.p
1b10: 6d 64 6f 63 2f 24 7b 50 4d 44 4f 43 7d 2e 31 20  mdoc/${PMDOC}.1 
1b20: 3e 20 62 75 69 6c 64 2f 63 61 63 6b 65 79 5f 6f  > build/cackey_o
1b30: 73 78 5f 62 75 69 6c 64 2f 24 7b 4f 53 58 7d 5f  sx_build/${OSX}_
1b40: 70 6d 62 75 69 6c 64 2e 70 6d 64 6f 63 2f 24 7b  pmbuild.pmdoc/${
1b50: 50 4d 44 4f 43 7d 0a 09 09 73 65 64 20 22 73 7c  PMDOC}...sed "s|
1b60: 40 40 43 55 52 4f 53 58 56 45 52 40 40 7c 24 7b  @@CUROSXVER@@|${
1b70: 43 55 52 4f 53 58 56 45 52 7d 7c 67 22 20 62 75  CUROSXVER}|g" bu
1b80: 69 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62  ild/cackey_osx_b
1b90: 75 69 6c 64 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75  uild/${OSX}_pmbu
1ba0: 69 6c 64 2e 70 6d 64 6f 63 2f 24 7b 50 4d 44 4f  ild.pmdoc/${PMDO
1bb0: 43 7d 20 3e 20 62 75 69 6c 64 2f 63 61 63 6b 65  C} > build/cacke
1bc0: 79 5f 6f 73 78 5f 62 75 69 6c 64 2f 24 7b 4f 53  y_osx_build/${OS
1bd0: 58 7d 5f 70 6d 62 75 69 6c 64 2e 70 6d 64 6f 63  X}_pmbuild.pmdoc
1be0: 2f 24 7b 50 4d 44 4f 43 7d 2e 31 0a 09 09 73 65  /${PMDOC}.1...se
1bf0: 64 20 22 73 7c 40 40 4c 49 42 43 41 43 4b 45 59  d "s|@@LIBCACKEY
1c00: 47 40 40 7c 24 7b 4c 49 42 43 41 43 4b 45 59 47  G@@|${LIBCACKEYG
1c10: 7d 7c 67 22 20 62 75 69 6c 64 2f 63 61 63 6b 65  }|g" build/cacke
1c20: 79 5f 6f 73 78 5f 62 75 69 6c 64 2f 24 7b 4f 53  y_osx_build/${OS
1c30: 58 7d 5f 70 6d 62 75 69 6c 64 2e 70 6d 64 6f 63  X}_pmbuild.pmdoc
1c40: 2f 24 7b 50 4d 44 4f 43 7d 2e 31 20 3e 20 62 75  /${PMDOC}.1 > bu
1c50: 69 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62  ild/cackey_osx_b
1c60: 75 69 6c 64 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75  uild/${OSX}_pmbu
1c70: 69 6c 64 2e 70 6d 64 6f 63 2f 24 7b 50 4d 44 4f  ild.pmdoc/${PMDO
1c80: 43 7d 0a 09 09 63 70 20 62 75 69 6c 64 2f 63 61  C}...cp build/ca
1c90: 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64 2f 24  ckey_osx_build/$
1ca0: 7b 4f 53 58 7d 5f 70 6d 62 75 69 6c 64 2e 70 6d  {OSX}_pmbuild.pm
1cb0: 64 6f 63 2f 24 7b 50 4d 44 4f 43 7d 20 62 75 69  doc/${PMDOC} bui
1cc0: 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75  ld/cackey_osx_bu
1cd0: 69 6c 64 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75 69  ild/${OSX}_pmbui
1ce0: 6c 64 2e 70 6d 64 6f 63 2f 24 7b 50 4d 44 4f 43  ld.pmdoc/${PMDOC
1cf0: 7d 2e 31 0a 09 09 6d 76 20 62 75 69 6c 64 2f 63  }.1...mv build/c
1d00: 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64 2f  ackey_osx_build/
1d10: 24 7b 4f 53 58 7d 5f 70 6d 62 75 69 6c 64 2e 70  ${OSX}_pmbuild.p
1d20: 6d 64 6f 63 2f 24 7b 50 4d 44 4f 43 7d 2e 31 20  mdoc/${PMDOC}.1 
1d30: 62 75 69 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78  build/cackey_osx
1d40: 5f 62 75 69 6c 64 2f 24 7b 4f 53 58 7d 5f 70 6d  _build/${OSX}_pm
1d50: 62 75 69 6c 64 2e 70 6d 64 6f 63 2f 24 7b 50 4d  build.pmdoc/${PM
1d60: 44 4f 43 7d 0a 09 64 6f 6e 65 0a 09 69 66 20 5b  DOC}..done..if [
1d70: 20 24 7b 4f 53 58 7d 20 3d 3d 20 22 50 61 6e 74   ${OSX} == "Pant
1d80: 68 65 72 22 20 5d 3b 20 74 68 65 6e 0a 09 09 45  her" ]; then...E
1d90: 58 54 3d 6d 70 6b 67 0a 09 09 63 61 74 20 62 75  XT=mpkg...cat bu
1da0: 69 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62  ild/cackey_osx_b
1db0: 75 69 6c 64 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75  uild/${OSX}_pmbu
1dc0: 69 6c 64 2e 70 6d 64 6f 63 2f 69 6e 64 65 78 2e  ild.pmdoc/index.
1dd0: 78 6d 6c 20 7c 20 67 72 65 70 20 2d 76 20 2d 69  xml | grep -v -i
1de0: 20 72 65 71 75 69 72 65 20 3e 20 62 75 69 6c 64   require > build
1df0: 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c  /cackey_osx_buil
1e00: 64 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75 69 6c 64  d/${OSX}_pmbuild
1e10: 2e 70 6d 64 6f 63 2f 69 6e 64 65 78 2e 78 6d 6c  .pmdoc/index.xml
1e20: 2e 6e 65 77 0a 09 09 6d 76 20 62 75 69 6c 64 2f  .new...mv build/
1e30: 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64  cackey_osx_build
1e40: 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75 69 6c 64 2e  /${OSX}_pmbuild.
1e50: 70 6d 64 6f 63 2f 69 6e 64 65 78 2e 78 6d 6c 2e  pmdoc/index.xml.
1e60: 6e 65 77 20 62 75 69 6c 64 2f 63 61 63 6b 65 79  new build/cackey
1e70: 5f 6f 73 78 5f 62 75 69 6c 64 2f 24 7b 4f 53 58  _osx_build/${OSX
1e80: 7d 5f 70 6d 62 75 69 6c 64 2e 70 6d 64 6f 63 2f  }_pmbuild.pmdoc/
1e90: 69 6e 64 65 78 2e 78 6d 6c 0a 09 65 6c 73 65 0a  index.xml..else.
1ea0: 09 09 45 58 54 3d 70 6b 67 0a 09 66 69 0a 09 69  ..EXT=pkg..fi..i
1eb0: 66 20 5b 20 24 7b 4f 53 58 7d 20 3d 3d 20 22 53  f [ ${OSX} == "S
1ec0: 6e 6f 77 6c 65 6f 70 61 72 64 22 20 5d 3b 20 74  nowleopard" ]; t
1ed0: 68 65 6e 0a 09 09 63 61 74 20 62 75 69 6c 64 2f  hen...cat build/
1ee0: 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64  cackey_osx_build
1ef0: 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75 69 6c 64 2e  /${OSX}_pmbuild.
1f00: 70 6d 64 6f 63 2f 69 6e 64 65 78 2e 78 6d 6c 20  pmdoc/index.xml 
1f10: 7c 20 73 65 64 20 27 73 7c 66 6f 72 20 4d 61 63  | sed 's|for Mac
1f20: 20 4f 53 20 58 20 53 6e 6f 77 6c 65 6f 70 61 72   OS X Snowleopar
1f30: 64 7c 66 6f 72 20 4d 61 63 20 4f 53 20 58 20 53  d|for Mac OS X S
1f40: 6e 6f 77 4c 65 6f 70 61 72 64 7c 67 27 20 3e 20  nowLeopard|g' > 
1f50: 62 75 69 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78  build/cackey_osx
1f60: 5f 62 75 69 6c 64 2f 24 7b 4f 53 58 7d 5f 70 6d  _build/${OSX}_pm
1f70: 62 75 69 6c 64 2e 70 6d 64 6f 63 2f 69 6e 64 65  build.pmdoc/inde
1f80: 78 2e 78 6d 6c 2e 6e 65 77 0a 09 09 6d 76 20 62  x.xml.new...mv b
1f90: 75 69 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78 5f  uild/cackey_osx_
1fa0: 62 75 69 6c 64 2f 24 7b 4f 53 58 7d 5f 70 6d 62  build/${OSX}_pmb
1fb0: 75 69 6c 64 2e 70 6d 64 6f 63 2f 69 6e 64 65 78  uild.pmdoc/index
1fc0: 2e 78 6d 6c 2e 6e 65 77 20 62 75 69 6c 64 2f 63  .xml.new build/c
1fd0: 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64 2f  ackey_osx_build/
1fe0: 24 7b 4f 53 58 7d 5f 70 6d 62 75 69 6c 64 2e 70  ${OSX}_pmbuild.p
1ff0: 6d 64 6f 63 2f 69 6e 64 65 78 2e 78 6d 6c 0a 09  mdoc/index.xml..
2000: 66 69 0a 09 2f 44 65 76 65 6c 6f 70 65 72 2f 41  fi../Developer/A
2010: 70 70 6c 69 63 61 74 69 6f 6e 73 2f 55 74 69 6c  pplications/Util
2020: 69 74 69 65 73 2f 50 61 63 6b 61 67 65 4d 61 6b  ities/PackageMak
2030: 65 72 2e 61 70 70 2f 43 6f 6e 74 65 6e 74 73 2f  er.app/Contents/
2040: 4d 61 63 4f 53 2f 50 61 63 6b 61 67 65 4d 61 6b  MacOS/PackageMak
2050: 65 72 20 2d 64 20 62 75 69 6c 64 2f 63 61 63 6b  er -d build/cack
2060: 65 79 5f 6f 73 78 5f 62 75 69 6c 64 2f 24 7b 4f  ey_osx_build/${O
2070: 53 58 7d 5f 70 6d 62 75 69 6c 64 2e 70 6d 64 6f  SX}_pmbuild.pmdo
2080: 63 20 2d 6f 20 6d 61 63 62 75 69 6c 64 2f 70 6b  c -o macbuild/pk
2090: 67 2f 43 41 43 4b 65 79 5f 24 7b 43 41 43 4b 45  g/CACKey_${CACKE
20a0: 59 5f 56 45 52 53 49 4f 4e 7d 5f 24 7b 4f 53 58  Y_VERSION}_${OSX
20b0: 7d 2e 24 7b 45 58 54 7d 0a 09 74 61 72 20 2d 2d  }.${EXT}..tar --
20c0: 63 72 65 61 74 65 20 2d 2d 64 69 72 65 63 74 6f  create --directo
20d0: 72 79 20 6d 61 63 62 75 69 6c 64 2f 70 6b 67 2f  ry macbuild/pkg/
20e0: 20 2d 2d 66 69 6c 65 20 6d 61 63 62 75 69 6c 64   --file macbuild
20f0: 2f 70 6b 67 2f 43 41 43 4b 65 79 5f 24 7b 43 41  /pkg/CACKey_${CA
2100: 43 4b 45 59 5f 56 45 52 53 49 4f 4e 7d 5f 24 7b  CKEY_VERSION}_${
2110: 4f 53 58 7d 2e 24 7b 45 58 54 7d 2e 74 61 72 20  OSX}.${EXT}.tar 
2120: 43 41 43 4b 65 79 5f 24 7b 43 41 43 4b 45 59 5f  CACKey_${CACKEY_
2130: 56 45 52 53 49 4f 4e 7d 5f 24 7b 4f 53 58 7d 2e  VERSION}_${OSX}.
2140: 24 7b 45 58 54 7d 0a 09 67 7a 69 70 20 2d 39 20  ${EXT}..gzip -9 
2150: 6d 61 63 62 75 69 6c 64 2f 70 6b 67 2f 43 41 43  macbuild/pkg/CAC
2160: 4b 65 79 5f 24 7b 43 41 43 4b 45 59 5f 56 45 52  Key_${CACKEY_VER
2170: 53 49 4f 4e 7d 5f 24 7b 4f 53 58 7d 2e 24 7b 45  SION}_${OSX}.${E
2180: 58 54 7d 2e 74 61 72 0a 09 72 6d 20 2d 72 66 20  XT}.tar..rm -rf 
2190: 6d 61 63 62 75 69 6c 64 2f 70 6b 67 2f 43 41 43  macbuild/pkg/CAC
21a0: 4b 65 79 5f 24 7b 43 41 43 4b 45 59 5f 56 45 52  Key_${CACKEY_VER
21b0: 53 49 4f 4e 7d 5f 24 7b 4f 53 58 7d 2e 24 7b 45  SION}_${OSX}.${E
21c0: 58 54 7d 0a 09 72 6d 20 2d 66 20 62 75 69 6c 64  XT}..rm -f build
21d0: 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c  /cackey_osx_buil
21e0: 64 2f 63 61 63 6b 65 79 2e 64 79 6c 69 62 0a 09  d/cackey.dylib..
21f0: 65 63 68 6f 20 22 24 7b 4f 53 58 7d 20 62 75 69  echo "${OSX} bui
2200: 6c 64 20 63 6f 6d 70 6c 65 74 65 22 0a 7d 0a 0a  ld complete".}..
2210: 23 20 54 61 6b 65 20 63 6f 6d 6d 61 6e 64 20 6c  # Take command l
2220: 69 6e 65 20 61 72 67 75 6d 65 6e 74 73 20 61 6e  ine arguments an
2230: 64 20 65 78 65 63 75 74 65 0a 63 61 73 65 20 22  d execute.case "
2240: 24 31 22 20 69 6e 0a 09 22 22 29 0a 09 09 75 73  $1" in.."")...us
2250: 61 67 65 0a 09 09 65 78 69 74 20 24 3f 0a 09 3b  age...exit $?..;
2260: 3b 0a 0a 09 22 70 61 6e 74 68 65 72 22 29 0a 09  ;..."panther")..
2270: 09 69 66 20 5b 20 22 24 7b 4c 49 4f 4e 42 55 49  .if [ "${LIONBUI
2280: 4c 44 7d 22 20 3d 20 22 31 22 20 5d 3b 20 74 68  LD}" = "1" ]; th
2290: 65 6e 0a 09 09 09 65 63 68 6f 20 22 42 75 69 6c  en....echo "Buil
22a0: 64 69 6e 67 20 66 6f 72 20 70 6c 61 74 66 6f 72  ding for platfor
22b0: 6d 73 20 6f 6c 64 65 72 20 74 68 61 6e 20 4d 61  ms older than Ma
22c0: 63 20 4f 53 20 58 20 31 30 2e 35 20 28 4c 65 6f  c OS X 10.5 (Leo
22d0: 70 61 72 64 29 20 69 73 20 6e 6f 74 20 73 75 70  pard) is not sup
22e0: 70 6f 72 74 65 64 20 6f 6e 20 4c 69 6f 6e 2e 2e  ported on Lion..
22f0: 2e 22 0a 09 09 09 65 78 69 74 20 31 0a 09 09 66  ."....exit 1...f
2300: 69 0a 09 09 2e 2f 61 75 74 6f 67 65 6e 2e 73 68  i..../autogen.sh
2310: 0a 09 09 70 61 6e 74 68 65 72 0a 09 09 65 78 69  ...panther...exi
2320: 74 20 24 3f 0a 09 3b 3b 0a 0a 09 22 74 69 67 65  t $?..;;..."tige
2330: 72 22 29 0a 09 09 69 66 20 5b 20 22 24 7b 4c 49  r")...if [ "${LI
2340: 4f 4e 42 55 49 4c 44 7d 22 20 3d 20 22 31 22 20  ONBUILD}" = "1" 
2350: 5d 3b 20 74 68 65 6e 0a 09 09 09 65 63 68 6f 20  ]; then....echo 
2360: 22 42 75 69 6c 64 69 6e 67 20 66 6f 72 20 70 6c  "Building for pl
2370: 61 74 66 6f 72 6d 73 20 6f 6c 64 65 72 20 74 68  atforms older th
2380: 61 6e 20 4d 61 63 20 4f 53 20 58 20 31 30 2e 35  an Mac OS X 10.5
2390: 20 28 4c 65 6f 70 61 72 64 29 20 69 73 20 6e 6f   (Leopard) is no
23a0: 74 20 73 75 70 70 6f 72 74 65 64 20 6f 6e 20 4c  t supported on L
23b0: 69 6f 6e 2e 2e 2e 22 0a 09 09 09 65 78 69 74 20  ion..."....exit 
23c0: 31 0a 09 09 66 69 0a 09 09 2e 2f 61 75 74 6f 67  1...fi..../autog
23d0: 65 6e 2e 73 68 0a 09 09 74 69 67 65 72 0a 09 09  en.sh...tiger...
23e0: 65 78 69 74 20 24 3f 0a 09 3b 3b 0a 0a 09 22 6c  exit $?..;;..."l
23f0: 65 6f 70 61 72 64 22 29 0a 09 09 2e 2f 61 75 74  eopard")..../aut
2400: 6f 67 65 6e 2e 73 68 0a 09 09 6c 65 6f 70 61 72  ogen.sh...leopar
2410: 64 0a 09 09 65 78 69 74 20 24 3f 0a 09 3b 3b 0a  d...exit $?..;;.
2420: 0a 09 22 73 6e 6f 77 6c 65 6f 70 61 72 64 22 29  .."snowleopard")
2430: 0a 09 09 2e 2f 61 75 74 6f 67 65 6e 2e 73 68 0a  ..../autogen.sh.
2440: 09 09 73 6e 6f 77 6c 65 6f 70 61 72 64 0a 09 09  ..snowleopard...
2450: 65 78 69 74 20 24 3f 0a 09 3b 3b 0a 09 0a 09 22  exit $?..;;...."
2460: 6c 69 6f 6e 22 29 0a 09 09 2e 2f 61 75 74 6f 67  lion")..../autog
2470: 65 6e 2e 73 68 0a 09 09 6c 69 6f 6e 0a 09 09 65  en.sh...lion...e
2480: 78 69 74 20 24 3f 0a 09 3b 3b 0a 0a 09 22 61 6c  xit $?..;;..."al
2490: 6c 22 29 0a 09 09 2e 2f 61 75 74 6f 67 65 6e 2e  l")..../autogen.
24a0: 73 68 0a 09 09 6c 65 6f 70 61 72 64 0a 09 09 73  sh...leopard...s
24b0: 6e 6f 77 6c 65 6f 70 61 72 64 0a 09 09 6c 69 6f  nowleopard...lio
24c0: 6e 0a 09 09 65 63 68 6f 20 22 22 0a 09 09 65 63  n...echo ""...ec
24d0: 68 6f 20 22 41 6c 6c 20 62 75 69 6c 64 73 20 63  ho "All builds c
24e0: 6f 6d 70 6c 65 74 65 2e 22 0a 09 09 65 78 69 74  omplete."...exit
24f0: 20 24 3f 0a 09 3b 3b 0a 0a 09 22 6c 65 67 61 63   $?..;;..."legac
2500: 79 22 29 0a 09 09 69 66 20 5b 20 22 24 7b 4c 49  y")...if [ "${LI
2510: 4f 4e 42 55 49 4c 44 7d 22 20 3d 20 22 31 22 20  ONBUILD}" = "1" 
2520: 5d 3b 20 74 68 65 6e 0a 09 09 09 65 63 68 6f 20  ]; then....echo 
2530: 22 42 75 69 6c 64 69 6e 67 20 66 6f 72 20 70 6c  "Building for pl
2540: 61 74 66 6f 72 6d 73 20 6f 6c 64 65 72 20 74 68  atforms older th
2550: 61 6e 20 4d 61 63 20 4f 53 20 58 20 31 30 2e 35  an Mac OS X 10.5
2560: 20 28 4c 65 6f 70 61 72 64 29 20 69 73 20 6e 6f   (Leopard) is no
2570: 74 20 73 75 70 70 6f 72 74 65 64 20 6f 6e 20 4c  t supported on L
2580: 69 6f 6e 2e 2e 2e 22 0a 09 09 09 65 78 69 74 20  ion..."....exit 
2590: 31 0a 09 09 66 69 0a 09 09 2e 2f 61 75 74 6f 67  1...fi..../autog
25a0: 65 6e 2e 73 68 0a 09 09 70 61 6e 74 68 65 72 0a  en.sh...panther.
25b0: 09 09 74 69 67 65 72 0a 09 09 6c 65 6f 70 61 72  ..tiger...leopar
25c0: 64 0a 09 09 73 6e 6f 77 6c 65 6f 70 61 72 64 0a  d...snowleopard.
25d0: 09 09 65 63 68 6f 20 22 22 0a 09 09 65 63 68 6f  ..echo ""...echo
25e0: 20 22 41 6c 6c 20 4c 45 47 41 43 59 20 62 75 69   "All LEGACY bui
25f0: 6c 64 73 20 63 6f 6d 70 6c 65 74 65 2e 22 0a 09  lds complete."..
2600: 09 65 78 69 74 20 24 3f 0a 09 3b 3b 0a 0a 09 22  .exit $?..;;..."
2610: 63 6c 65 61 6e 22 29 0a 09 09 63 6c 65 61 6e 0a  clean")...clean.
2620: 09 09 65 78 69 74 20 24 3f 0a 09 3b 3b 0a 0a 09  ..exit $?..;;...
2630: 2a 29 0a 09 09 75 73 61 67 65 0a 09 09 65 78 69  *)...usage...exi
2640: 74 20 24 3f 0a 09 3b 3b 0a 65 73 61 63 20 0a     t $?..;;.esac .