Hex Artifact Content

Artifact fd25e7d35538e8965c2710aab1264b17cd749031:


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 55  ed 's_)__'`..# U
00d0: 73 61 67 65 20 66 75 6e 63 74 69 6f 6e 0a 75 73  sage function.us
00e0: 61 67 65 28 29 20 7b 0a 09 65 63 68 6f 20 22 55  age() {..echo "U
00f0: 73 61 67 65 3a 20 62 75 69 6c 64 5f 6f 73 78 2e  sage: build_osx.
0100: 73 68 20 3c 74 61 72 67 65 74 3e 22 0a 09 65 63  sh <target>"..ec
0110: 68 6f 20 57 68 65 72 65 20 74 61 72 67 65 74 20  ho Where target 
0120: 69 73 20 6f 6e 65 20 6f 66 3a 0a 09 65 63 68 6f  is one of:..echo
0130: 20 22 20 20 20 20 70 61 6e 74 68 65 72 20 20 2d   "    panther  -
0140: 20 28 42 75 69 6c 64 73 20 31 30 2e 33 20 4c 69   (Builds 10.3 Li
0150: 62 72 61 72 79 20 66 6f 72 20 50 50 43 47 33 29  brary for PPCG3)
0160: 22 0a 09 65 63 68 6f 20 22 20 20 20 20 74 69 67  "..echo "    tig
0170: 65 72 20 20 2d 20 28 42 75 69 6c 64 73 20 55 6e  er  - (Builds Un
0180: 69 76 65 72 73 61 6c 20 31 30 2e 34 20 4c 69 62  iversal 10.4 Lib
0190: 72 61 72 79 20 66 6f 72 20 50 50 43 47 33 2f 69  rary for PPCG3/i
01a0: 33 38 36 29 22 0a 09 65 63 68 6f 20 22 20 20 20  386)"..echo "   
01b0: 20 6c 65 6f 70 61 72 64 20 20 2d 20 28 42 75 69   leopard  - (Bui
01c0: 6c 64 73 20 55 6e 69 76 65 72 73 61 6c 20 31 30  lds Universal 10
01d0: 2e 35 20 4c 69 62 72 61 72 79 20 66 6f 72 20 50  .5 Library for P
01e0: 50 43 47 34 2f 69 33 38 36 29 22 0a 09 65 63 68  PCG4/i386)"..ech
01f0: 6f 20 22 20 20 20 20 73 6e 6f 77 6c 65 6f 70 61  o "    snowleopa
0200: 72 64 20 20 2d 20 28 42 75 69 6c 64 73 20 55 6e  rd  - (Builds Un
0210: 69 76 65 72 73 61 6c 20 31 30 2e 36 20 4c 69 62  iversal 10.6 Lib
0220: 72 61 72 79 20 66 6f 72 20 69 33 38 36 2f 78 38  rary for i386/x8
0230: 36 5f 36 34 29 22 0a 09 65 63 68 6f 20 22 20 20  6_64)"..echo "  
0240: 20 20 61 6c 6c 20 2d 20 28 42 75 69 6c 64 73 20    all - (Builds 
0250: 66 6f 72 20 61 6c 6c 20 73 75 70 70 6f 72 74 65  for all supporte
0260: 64 20 74 61 72 67 65 74 73 29 22 0a 09 65 63 68  d targets)"..ech
0270: 6f 20 22 20 20 20 20 63 6c 65 61 6e 20 2d 20 28  o "    clean - (
0280: 43 6c 65 61 6e 73 20 75 70 29 22 0a 09 65 63 68  Cleans up)"..ech
0290: 6f 20 22 52 75 6e 20 66 72 6f 6d 20 43 41 43 4b  o "Run from CACK
02a0: 65 79 20 42 75 69 6c 64 20 52 6f 6f 74 2e 22 0a  ey Build Root.".
02b0: 09 65 78 69 74 20 24 3f 0a 7d 0a 0a 23 20 43 6c  .exit $?.}..# Cl
02c0: 65 61 6e 20 75 70 20 66 75 6e 63 74 69 6f 6e 0a  ean up function.
02d0: 63 6c 65 61 6e 28 29 20 7b 0a 09 72 6d 20 2d 66  clean() {..rm -f
02e0: 20 62 75 69 6c 64 2f 63 61 63 6b 65 79 5f 6f 73   build/cackey_os
02f0: 78 5f 62 75 69 6c 64 2f 63 61 63 6b 65 79 2e 64  x_build/cackey.d
0300: 79 6c 69 62 0a 09 72 6d 20 2d 72 66 20 6d 61 63  ylib..rm -rf mac
0310: 62 75 69 6c 64 0a 09 72 6d 20 2d 72 66 20 62 75  build..rm -rf bu
0320: 69 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62  ild/cackey_osx_b
0330: 75 69 6c 64 2f 2a 2e 70 6d 64 6f 63 0a 09 6d 61  uild/*.pmdoc..ma
0340: 6b 65 20 64 69 73 74 63 6c 65 61 6e 0a 7d 0a 0a  ke distclean.}..
0350: 23 20 44 69 72 65 63 74 6f 72 79 20 63 72 65 61  # Directory crea
0360: 74 69 6f 6e 20 66 75 6e 63 74 69 6f 6e 0a 6d 61  tion function.ma
0370: 6b 65 64 69 72 28 29 20 7b 0a 09 69 66 20 5b 20  kedir() {..if [ 
0380: 22 60 75 6e 61 6d 65 20 2d 72 20 7c 20 63 75 74  "`uname -r | cut
0390: 20 2d 64 20 2e 20 2d 66 20 31 60 22 20 2d 6c 74   -d . -f 1`" -lt
03a0: 20 22 31 30 22 20 5d 3b 20 74 68 65 6e 0a 09 09   "10" ]; then...
03b0: 4c 49 42 54 4f 4f 4c 44 49 52 3d 2f 44 65 76 65  LIBTOOLDIR=/Deve
03c0: 6c 6f 70 65 72 2f 75 73 72 2f 73 68 61 72 65 2f  loper/usr/share/
03d0: 6c 69 62 74 6f 6f 6c 0a 09 65 6c 73 65 0a 09 09  libtool..else...
03e0: 4c 49 42 54 4f 4f 4c 44 49 52 3d 2f 44 65 76 65  LIBTOOLDIR=/Deve
03f0: 6c 6f 70 65 72 2f 75 73 72 2f 73 68 61 72 65 2f  loper/usr/share/
0400: 6c 69 62 74 6f 6f 6c 2f 63 6f 6e 66 69 67 0a 09  libtool/config..
0410: 66 69 0a 09 69 66 20 5b 20 21 20 2d 64 20 6d 61  fi..if [ ! -d ma
0420: 63 62 75 69 6c 64 20 5d 3b 20 74 68 65 6e 0a 09  cbuild ]; then..
0430: 09 6d 6b 64 69 72 20 6d 61 63 62 75 69 6c 64 0a  .mkdir macbuild.
0440: 09 09 6d 6b 64 69 72 20 6d 61 63 62 75 69 6c 64  ..mkdir macbuild
0450: 2f 50 61 6e 74 68 65 72 0a 09 09 6d 6b 64 69 72  /Panther...mkdir
0460: 20 6d 61 63 62 75 69 6c 64 2f 54 69 67 65 72 0a   macbuild/Tiger.
0470: 09 09 6d 6b 64 69 72 20 6d 61 63 62 75 69 6c 64  ..mkdir macbuild
0480: 2f 4c 65 6f 70 61 72 64 0a 09 09 6d 6b 64 69 72  /Leopard...mkdir
0490: 20 6d 61 63 62 75 69 6c 64 2f 53 6e 6f 77 6c 65   macbuild/Snowle
04a0: 6f 70 61 72 64 0a 09 09 6d 6b 64 69 72 20 6d 61  opard...mkdir ma
04b0: 63 62 75 69 6c 64 2f 70 6b 67 0a 09 66 69 0a 09  cbuild/pkg..fi..
04c0: 69 66 20 5b 20 21 20 2d 66 20 63 6f 6e 66 69 67  if [ ! -f config
04d0: 2e 67 75 65 73 73 20 5d 3b 20 74 68 65 6e 0a 09  .guess ]; then..
04e0: 09 63 70 20 24 7b 4c 49 42 54 4f 4f 4c 44 49 52  .cp ${LIBTOOLDIR
04f0: 7d 2f 63 6f 6e 66 69 67 2e 67 75 65 73 73 20 2e  }/config.guess .
0500: 0a 09 66 69 0a 09 69 66 20 5b 20 21 20 2d 66 20  ..fi..if [ ! -f 
0510: 63 6f 6e 66 69 67 2e 73 75 62 20 5d 3b 20 74 68  config.sub ]; th
0520: 65 6e 0a 09 09 63 70 20 24 7b 4c 49 42 54 4f 4f  en...cp ${LIBTOO
0530: 4c 44 49 52 7d 2f 63 6f 6e 66 69 67 2e 73 75 62  LDIR}/config.sub
0540: 20 2e 0a 09 66 69 0a 09 69 66 20 5b 20 21 20 2d   ...fi..if [ ! -
0550: 66 20 69 6e 73 74 61 6c 6c 2d 73 68 20 5d 3b 20  f install-sh ]; 
0560: 74 68 65 6e 0a 09 09 63 70 20 24 7b 4c 49 42 54  then...cp ${LIBT
0570: 4f 4f 4c 44 49 52 7d 2f 69 6e 73 74 61 6c 6c 2d  OOLDIR}/install-
0580: 73 68 20 2e 0a 09 66 69 0a 7d 0a 0a 23 20 42 75  sh ...fi.}..# Bu
0590: 69 6c 64 20 66 75 6e 63 74 69 6f 6e 20 66 6f 72  ild function for
05a0: 20 50 61 6e 74 68 65 72 0a 70 61 6e 74 68 65 72   Panther.panther
05b0: 28 29 20 7b 0a 09 6d 61 6b 65 64 69 72 0a 09 48  () {..makedir..H
05c0: 45 41 44 45 52 53 3d 2f 44 65 76 65 6c 6f 70 65  EADERS=/Develope
05d0: 72 2f 53 44 4b 73 2f 4d 61 63 4f 53 58 31 30 2e  r/SDKs/MacOSX10.
05e0: 33 2e 39 2e 73 64 6b 2f 53 79 73 74 65 6d 2f 4c  3.9.sdk/System/L
05f0: 69 62 72 61 72 79 2f 46 72 61 6d 65 77 6f 72 6b  ibrary/Framework
0600: 73 2f 50 43 53 43 2e 66 72 61 6d 65 77 6f 72 6b  s/PCSC.framework
0610: 2f 56 65 72 73 69 6f 6e 73 2f 41 2f 48 65 61 64  /Versions/A/Head
0620: 65 72 73 2f 0a 09 4c 49 42 52 41 52 59 3d 2f 44  ers/..LIBRARY=/D
0630: 65 76 65 6c 6f 70 65 72 2f 53 44 4b 73 2f 4d 61  eveloper/SDKs/Ma
0640: 63 4f 53 58 31 30 2e 33 2e 39 2e 73 64 6b 2f 53  cOSX10.3.9.sdk/S
0650: 79 73 74 65 6d 2f 4c 69 62 72 61 72 79 2f 46 72  ystem/Library/Fr
0660: 61 6d 65 77 6f 72 6b 73 2f 50 43 53 43 2e 66 72  ameworks/PCSC.fr
0670: 61 6d 65 77 6f 72 6b 2f 50 43 53 43 0a 09 4f 53  amework/PCSC..OS
0680: 58 3d 50 61 6e 74 68 65 72 0a 09 50 4b 54 41 52  X=Panther..PKTAR
0690: 47 45 54 4f 53 3d 31 0a 09 4e 45 58 54 4f 53 58  GETOS=1..NEXTOSX
06a0: 56 45 52 3d 31 30 2e 34 0a 09 43 55 52 4f 53 58  VER=10.4..CUROSX
06b0: 56 45 52 3d 31 30 2e 33 0a 09 48 4f 53 54 3d 70  VER=10.3..HOST=p
06c0: 6f 77 65 72 70 63 2d 61 70 70 6c 65 2d 64 61 72  owerpc-apple-dar
06d0: 77 69 6e 37 0a 09 6d 61 6b 65 20 64 69 73 74 63  win7..make distc
06e0: 6c 65 61 6e 0a 09 41 52 43 48 3d 22 70 70 63 20  lean..ARCH="ppc 
06f0: 2d 6d 63 70 75 3d 47 33 22 0a 09 43 46 4c 41 47  -mcpu=G3"..CFLAG
0700: 53 3d 22 2d 61 72 63 68 20 24 7b 41 52 43 48 7d  S="-arch ${ARCH}
0710: 22 20 2e 2f 63 6f 6e 66 69 67 75 72 65 20 2d 2d  " ./configure --
0720: 77 69 74 68 2d 70 63 73 63 2d 68 65 61 64 65 72  with-pcsc-header
0730: 73 3d 24 7b 48 45 41 44 45 52 53 7d 20 2d 2d 77  s=${HEADERS} --w
0740: 69 74 68 2d 70 63 73 63 2d 6c 69 62 73 3d 24 7b  ith-pcsc-libs=${
0750: 4c 49 42 52 41 52 59 7d 20 2d 2d 68 6f 73 74 3d  LIBRARY} --host=
0760: 24 7b 48 4f 53 54 7d 0a 09 6d 61 6b 65 0a 09 63  ${HOST}..make..c
0770: 70 20 6c 69 62 63 61 63 6b 65 79 2e 64 79 6c 69  p libcackey.dyli
0780: 62 20 6d 61 63 62 75 69 6c 64 2f 24 7b 4f 53 58  b macbuild/${OSX
0790: 7d 2f 6c 69 62 63 61 63 6b 65 79 2e 64 79 6c 69  }/libcackey.dyli
07a0: 62 0a 09 63 70 20 6c 69 62 63 61 63 6b 65 79 5f  b..cp libcackey_
07b0: 67 2e 64 79 6c 69 62 20 6d 61 63 62 75 69 6c 64  g.dylib macbuild
07c0: 2f 24 7b 4f 53 58 7d 2f 6c 69 62 63 61 63 6b 65  /${OSX}/libcacke
07d0: 79 5f 67 2e 64 79 6c 69 62 0a 09 70 6b 67 62 75  y_g.dylib..pkgbu
07e0: 69 6c 64 0a 7d 0a 0a 23 20 42 75 69 6c 64 20 66  ild.}..# Build f
07f0: 75 6e 63 74 69 6f 6e 20 66 6f 72 20 54 69 67 65  unction for Tige
0800: 72 0a 74 69 67 65 72 28 29 20 7b 0a 09 6d 61 6b  r.tiger() {..mak
0810: 65 64 69 72 0a 09 48 45 41 44 45 52 53 3d 2f 44  edir..HEADERS=/D
0820: 65 76 65 6c 6f 70 65 72 2f 53 44 4b 73 2f 4d 61  eveloper/SDKs/Ma
0830: 63 4f 53 58 31 30 2e 34 75 2e 73 64 6b 2f 53 79  cOSX10.4u.sdk/Sy
0840: 73 74 65 6d 2f 4c 69 62 72 61 72 79 2f 46 72 61  stem/Library/Fra
0850: 6d 65 77 6f 72 6b 73 2f 50 43 53 43 2e 66 72 61  meworks/PCSC.fra
0860: 6d 65 77 6f 72 6b 2f 56 65 72 73 69 6f 6e 73 2f  mework/Versions/
0870: 41 2f 48 65 61 64 65 72 73 2f 0a 09 4c 49 42 52  A/Headers/..LIBR
0880: 41 52 59 3d 2f 44 65 76 65 6c 6f 70 65 72 2f 53  ARY=/Developer/S
0890: 44 4b 73 2f 4d 61 63 4f 53 58 31 30 2e 34 75 2e  DKs/MacOSX10.4u.
08a0: 73 64 6b 2f 53 79 73 74 65 6d 2f 4c 69 62 72 61  sdk/System/Libra
08b0: 72 79 2f 46 72 61 6d 65 77 6f 72 6b 73 2f 50 43  ry/Frameworks/PC
08c0: 53 43 2e 66 72 61 6d 65 77 6f 72 6b 2f 50 43 53  SC.framework/PCS
08d0: 43 0a 09 4c 49 42 3d 22 22 0a 09 41 52 43 48 4c  C..LIB=""..ARCHL
08e0: 49 53 54 3d 22 22 0a 09 44 4c 49 42 3d 22 22 0a  IST=""..DLIB="".
08f0: 09 44 41 52 43 48 4c 49 53 54 3d 22 22 0a 09 4f  .DARCHLIST=""..O
0900: 53 58 3d 54 69 67 65 72 0a 09 50 4b 54 41 52 47  SX=Tiger..PKTARG
0910: 45 54 4f 53 3d 32 0a 09 4e 45 58 54 4f 53 58 56  ETOS=2..NEXTOSXV
0920: 45 52 3d 31 30 2e 35 0a 09 43 55 52 4f 53 58 56  ER=10.5..CUROSXV
0930: 45 52 3d 31 30 2e 34 0a 09 66 6f 72 20 48 4f 53  ER=10.4..for HOS
0940: 54 20 69 6e 20 70 6f 77 65 72 70 63 2d 61 70 70  T in powerpc-app
0950: 6c 65 2d 64 61 72 77 69 6e 38 20 69 33 38 36 2d  le-darwin8 i386-
0960: 61 70 70 6c 65 2d 64 61 72 77 69 6e 38 3b 20 64  apple-darwin8; d
0970: 6f 0a 09 09 67 65 6e 62 75 69 6c 64 0a 09 64 6f  o...genbuild..do
0980: 6e 65 0a 09 6c 69 62 62 75 69 6c 64 0a 09 70 6b  ne..libbuild..pk
0990: 67 62 75 69 6c 64 0a 7d 0a 0a 23 20 42 75 69 6c  gbuild.}..# Buil
09a0: 64 20 66 75 6e 63 74 69 6f 6e 20 66 6f 72 20 4c  d function for L
09b0: 65 6f 70 61 72 64 0a 6c 65 6f 70 61 72 64 28 29  eopard.leopard()
09c0: 20 7b 0a 09 6d 61 6b 65 64 69 72 0a 09 48 45 41   {..makedir..HEA
09d0: 44 45 52 53 3d 2f 44 65 76 65 6c 6f 70 65 72 2f  DERS=/Developer/
09e0: 53 44 4b 73 2f 4d 61 63 4f 53 58 31 30 2e 35 2e  SDKs/MacOSX10.5.
09f0: 73 64 6b 2f 53 79 73 74 65 6d 2f 4c 69 62 72 61  sdk/System/Libra
0a00: 72 79 2f 46 72 61 6d 65 77 6f 72 6b 73 2f 50 43  ry/Frameworks/PC
0a10: 53 43 2e 66 72 61 6d 65 77 6f 72 6b 2f 56 65 72  SC.framework/Ver
0a20: 73 69 6f 6e 73 2f 41 2f 48 65 61 64 65 72 73 2f  sions/A/Headers/
0a30: 0a 09 4c 49 42 52 41 52 59 3d 2f 44 65 76 65 6c  ..LIBRARY=/Devel
0a40: 6f 70 65 72 2f 53 44 4b 73 2f 4d 61 63 4f 53 58  oper/SDKs/MacOSX
0a50: 31 30 2e 35 2e 73 64 6b 2f 53 79 73 74 65 6d 2f  10.5.sdk/System/
0a60: 4c 69 62 72 61 72 79 2f 46 72 61 6d 65 77 6f 72  Library/Framewor
0a70: 6b 73 2f 50 43 53 43 2e 66 72 61 6d 65 77 6f 72  ks/PCSC.framewor
0a80: 6b 2f 50 43 53 43 0a 09 4c 49 42 3d 22 22 0a 09  k/PCSC..LIB=""..
0a90: 41 52 43 48 4c 49 53 54 3d 22 22 0a 09 44 4c 49  ARCHLIST=""..DLI
0aa0: 42 3d 22 22 0a 09 44 41 52 43 48 4c 49 53 54 3d  B=""..DARCHLIST=
0ab0: 22 22 0a 09 4f 53 58 3d 4c 65 6f 70 61 72 64 0a  ""..OSX=Leopard.
0ac0: 09 50 4b 54 41 52 47 45 54 4f 53 3d 33 0a 09 4e  .PKTARGETOS=3..N
0ad0: 45 58 54 4f 53 58 56 45 52 3d 31 30 2e 36 0a 09  EXTOSXVER=10.6..
0ae0: 43 55 52 4f 53 58 56 45 52 3d 31 30 2e 35 0a 09  CUROSXVER=10.5..
0af0: 66 6f 72 20 48 4f 53 54 20 69 6e 20 70 6f 77 65  for HOST in powe
0b00: 72 70 63 2d 61 70 70 6c 65 2d 64 61 72 77 69 6e  rpc-apple-darwin
0b10: 39 20 69 33 38 36 2d 61 70 70 6c 65 2d 64 61 72  9 i386-apple-dar
0b20: 77 69 6e 39 3b 20 64 6f 0a 09 09 67 65 6e 62 75  win9; do...genbu
0b30: 69 6c 64 0a 09 64 6f 6e 65 0a 09 6c 69 62 62 75  ild..done..libbu
0b40: 69 6c 64 0a 09 70 6b 67 62 75 69 6c 64 0a 7d 0a  ild..pkgbuild.}.
0b50: 0a 23 20 42 75 69 6c 64 20 66 75 6e 63 74 69 6f  .# Build functio
0b60: 6e 20 66 6f 72 20 53 6e 6f 77 20 4c 65 6f 70 61  n for Snow Leopa
0b70: 72 64 0a 73 6e 6f 77 6c 65 6f 70 61 72 64 28 29  rd.snowleopard()
0b80: 20 7b 0a 09 6d 61 6b 65 64 69 72 0a 09 48 45 41   {..makedir..HEA
0b90: 44 45 52 53 3d 2f 44 65 76 65 6c 6f 70 65 72 2f  DERS=/Developer/
0ba0: 53 44 4b 73 2f 4d 61 63 4f 53 58 31 30 2e 36 2e  SDKs/MacOSX10.6.
0bb0: 73 64 6b 2f 53 79 73 74 65 6d 2f 4c 69 62 72 61  sdk/System/Libra
0bc0: 72 79 2f 46 72 61 6d 65 77 6f 72 6b 73 2f 50 43  ry/Frameworks/PC
0bd0: 53 43 2e 66 72 61 6d 65 77 6f 72 6b 2f 56 65 72  SC.framework/Ver
0be0: 73 69 6f 6e 73 2f 41 2f 48 65 61 64 65 72 73 2f  sions/A/Headers/
0bf0: 0a 09 4c 49 42 52 41 52 59 3d 2f 44 65 76 65 6c  ..LIBRARY=/Devel
0c00: 6f 70 65 72 2f 53 44 4b 73 2f 4d 61 63 4f 53 58  oper/SDKs/MacOSX
0c10: 31 30 2e 36 2e 73 64 6b 2f 53 79 73 74 65 6d 2f  10.6.sdk/System/
0c20: 4c 69 62 72 61 72 79 2f 46 72 61 6d 65 77 6f 72  Library/Framewor
0c30: 6b 73 2f 50 43 53 43 2e 66 72 61 6d 65 77 6f 72  ks/PCSC.framewor
0c40: 6b 2f 50 43 53 43 0a 09 4c 49 42 3d 22 22 0a 09  k/PCSC..LIB=""..
0c50: 41 52 43 48 4c 49 53 54 3d 22 22 0a 09 44 4c 49  ARCHLIST=""..DLI
0c60: 42 3d 22 22 0a 09 44 41 52 43 48 4c 49 53 54 3d  B=""..DARCHLIST=
0c70: 22 22 0a 09 4f 53 58 3d 53 6e 6f 77 6c 65 6f 70  ""..OSX=Snowleop
0c80: 61 72 64 0a 09 69 66 20 5b 20 22 60 75 6e 61 6d  ard..if [ "`unam
0c90: 65 20 2d 72 20 7c 20 63 75 74 20 2d 64 20 2e 20  e -r | cut -d . 
0ca0: 2d 66 20 31 60 22 20 2d 6c 74 20 22 31 30 22 20  -f 1`" -lt "10" 
0cb0: 5d 3b 20 74 68 65 6e 0a 09 09 50 4b 54 41 52 47  ]; then...PKTARG
0cc0: 45 54 4f 53 3d 33 0a 09 65 6c 73 65 0a 09 09 50  ETOS=3..else...P
0cd0: 4b 54 41 52 47 45 54 4f 53 3d 34 0a 09 66 69 0a  KTARGETOS=4..fi.
0ce0: 09 4e 45 58 54 4f 53 58 56 45 52 3d 31 30 2e 37  .NEXTOSXVER=10.7
0cf0: 0a 09 43 55 52 4f 53 58 56 45 52 3d 31 30 2e 36  ..CUROSXVER=10.6
0d00: 0a 09 66 6f 72 20 48 4f 53 54 20 69 6e 20 69 33  ..for HOST in i3
0d10: 38 36 2d 61 70 70 6c 65 2d 64 61 72 77 69 6e 31  86-apple-darwin1
0d20: 30 20 78 38 36 5f 36 34 2d 61 70 70 6c 65 2d 64  0 x86_64-apple-d
0d30: 61 72 77 69 6e 31 30 3b 20 64 6f 0a 09 09 67 65  arwin10; do...ge
0d40: 6e 62 75 69 6c 64 0a 09 64 6f 6e 65 0a 09 6c 69  nbuild..done..li
0d50: 62 62 75 69 6c 64 0a 09 70 6b 67 62 75 69 6c 64  bbuild..pkgbuild
0d60: 0a 7d 0a 0a 23 20 47 65 6e 65 72 69 63 20 62 75  .}..# Generic bu
0d70: 69 6c 64 20 66 75 6e 63 74 69 6f 6e 0a 67 65 6e  ild function.gen
0d80: 62 75 69 6c 64 28 29 20 7b 0a 09 6d 61 6b 65 20  build() {..make 
0d90: 64 69 73 74 63 6c 65 61 6e 0a 09 41 52 43 48 3d  distclean..ARCH=
0da0: 60 65 63 68 6f 20 24 7b 48 4f 53 54 7d 20 7c 20  `echo ${HOST} | 
0db0: 63 75 74 20 2d 64 20 22 2d 22 20 2d 66 20 31 60  cut -d "-" -f 1`
0dc0: 0a 09 69 66 20 5b 20 24 7b 41 52 43 48 7d 20 3d  ..if [ ${ARCH} =
0dd0: 3d 20 22 70 6f 77 65 72 70 63 22 20 5d 3b 20 74  = "powerpc" ]; t
0de0: 68 65 6e 0a 09 09 69 66 20 5b 20 24 7b 4f 53 58  hen...if [ ${OSX
0df0: 7d 20 3d 3d 20 22 4c 65 6f 70 61 72 64 22 20 5d  } == "Leopard" ]
0e00: 3b 20 74 68 65 6e 0a 09 09 09 41 52 43 48 3d 22  ; then....ARCH="
0e10: 70 70 63 20 2d 6d 63 70 75 3d 47 34 22 0a 09 09  ppc -mcpu=G4"...
0e20: 65 6c 73 65 0a 09 09 09 41 52 43 48 3d 22 70 70  else....ARCH="pp
0e30: 63 20 2d 6d 63 70 75 3d 47 33 22 0a 09 09 66 69  c -mcpu=G3"...fi
0e40: 0a 09 66 69 0a 09 43 46 4c 41 47 53 3d 22 2d 61  ..fi..CFLAGS="-a
0e50: 72 63 68 20 24 7b 41 52 43 48 7d 22 20 2e 2f 63  rch ${ARCH}" ./c
0e60: 6f 6e 66 69 67 75 72 65 20 2d 2d 77 69 74 68 2d  onfigure --with-
0e70: 70 63 73 63 2d 68 65 61 64 65 72 73 3d 24 7b 48  pcsc-headers=${H
0e80: 45 41 44 45 52 53 7d 20 2d 2d 77 69 74 68 2d 70  EADERS} --with-p
0e90: 63 73 63 2d 6c 69 62 73 3d 24 7b 4c 49 42 52 41  csc-libs=${LIBRA
0ea0: 52 59 7d 20 2d 2d 68 6f 73 74 3d 24 7b 48 4f 53  RY} --host=${HOS
0eb0: 54 7d 0a 09 6d 61 6b 65 0a 09 63 70 20 6c 69 62  T}..make..cp lib
0ec0: 63 61 63 6b 65 79 2e 64 79 6c 69 62 20 6d 61 63  cackey.dylib mac
0ed0: 62 75 69 6c 64 2f 24 7b 4f 53 58 7d 2f 6c 69 62  build/${OSX}/lib
0ee0: 63 61 63 6b 65 79 2e 64 79 6c 69 62 2e 60 65 63  cackey.dylib.`ec
0ef0: 68 6f 20 24 7b 41 52 43 48 7d 20 7c 20 63 75 74  ho ${ARCH} | cut
0f00: 20 2d 64 20 27 20 27 20 2d 66 20 31 60 0a 09 63   -d ' ' -f 1`..c
0f10: 70 20 6c 69 62 63 61 63 6b 65 79 5f 67 2e 64 79  p libcackey_g.dy
0f20: 6c 69 62 20 6d 61 63 62 75 69 6c 64 2f 24 7b 4f  lib macbuild/${O
0f30: 53 58 7d 2f 6c 69 62 63 61 63 6b 65 79 5f 67 2e  SX}/libcackey_g.
0f40: 64 79 6c 69 62 2e 60 65 63 68 6f 20 24 7b 41 52  dylib.`echo ${AR
0f50: 43 48 7d 20 7c 20 63 75 74 20 2d 64 20 27 20 27  CH} | cut -d ' '
0f60: 20 2d 66 20 31 60 20 0a 7d 0a 0a 23 20 4c 69 62   -f 1` .}..# Lib
0f70: 72 61 72 79 20 62 75 69 6c 64 20 66 75 6e 63 74  rary build funct
0f80: 69 6f 6e 0a 6c 69 62 62 75 69 6c 64 28 29 20 7b  ion.libbuild() {
0f90: 0a 09 66 6f 72 20 4c 49 42 20 69 6e 20 6d 61 63  ..for LIB in mac
0fa0: 62 75 69 6c 64 2f 24 7b 4f 53 58 7d 2f 6c 69 62  build/${OSX}/lib
0fb0: 63 61 63 6b 65 79 2e 64 79 6c 69 62 2e 2a 3b 20  cackey.dylib.*; 
0fc0: 64 6f 0a 09 09 41 52 43 48 4c 49 53 54 3d 22 24  do...ARCHLIST="$
0fd0: 7b 41 52 43 48 4c 49 53 54 7d 20 60 65 63 68 6f  {ARCHLIST} `echo
0fe0: 20 27 2d 61 72 63 68 20 27 60 20 60 65 63 68 6f   '-arch '` `echo
0ff0: 20 24 7b 4c 49 42 7d 20 7c 20 63 75 74 20 2d 64   ${LIB} | cut -d
1000: 20 2e 20 2d 66 20 33 60 20 60 65 63 68 6f 20 27   . -f 3` `echo '
1010: 20 27 60 20 60 65 63 68 6f 20 24 7b 4c 49 42 7d   '` `echo ${LIB}
1020: 60 22 0a 09 64 6f 6e 65 0a 09 6c 69 70 6f 20 2d  `"..done..lipo -
1030: 63 72 65 61 74 65 20 24 7b 41 52 43 48 4c 49 53  create ${ARCHLIS
1040: 54 7d 20 2d 6f 75 74 70 75 74 20 6d 61 63 62 75  T} -output macbu
1050: 69 6c 64 2f 24 7b 4f 53 58 7d 2f 6c 69 62 63 61  ild/${OSX}/libca
1060: 63 6b 65 79 2e 64 79 6c 69 62 0a 09 66 6f 72 20  ckey.dylib..for 
1070: 44 4c 49 42 20 69 6e 20 6d 61 63 62 75 69 6c 64  DLIB in macbuild
1080: 2f 24 7b 4f 53 58 7d 2f 6c 69 62 63 61 63 6b 65  /${OSX}/libcacke
1090: 79 5f 67 2e 64 79 6c 69 62 2e 2a 3b 20 64 6f 0a  y_g.dylib.*; do.
10a0: 09 09 44 41 52 43 48 4c 49 53 54 3d 22 24 7b 44  ..DARCHLIST="${D
10b0: 41 52 43 48 4c 49 53 54 7d 20 60 65 63 68 6f 20  ARCHLIST} `echo 
10c0: 27 2d 61 72 63 68 20 27 60 20 60 65 63 68 6f 20  '-arch '` `echo 
10d0: 24 7b 44 4c 49 42 7d 20 7c 20 63 75 74 20 2d 64  ${DLIB} | cut -d
10e0: 20 2e 20 2d 66 20 33 60 20 60 65 63 68 6f 20 27   . -f 3` `echo '
10f0: 20 27 60 20 60 65 63 68 6f 20 24 7b 44 4c 49 42   '` `echo ${DLIB
1100: 7d 60 22 0a 09 64 6f 6e 65 0a 09 6c 69 70 6f 20  }`"..done..lipo 
1110: 2d 63 72 65 61 74 65 20 24 7b 44 41 52 43 48 4c  -create ${DARCHL
1120: 49 53 54 7d 20 2d 6f 75 74 70 75 74 20 6d 61 63  IST} -output mac
1130: 62 75 69 6c 64 2f 24 7b 4f 53 58 7d 2f 6c 69 62  build/${OSX}/lib
1140: 63 61 63 6b 65 79 5f 67 2e 64 79 6c 69 62 0a 09  cackey_g.dylib..
1150: 72 6d 20 6d 61 63 62 75 69 6c 64 2f 24 7b 4f 53  rm macbuild/${OS
1160: 58 7d 2f 6c 69 62 63 61 63 6b 65 79 2a 2e 64 79  X}/libcackey*.dy
1170: 6c 69 62 2e 2a 0a 7d 0a 0a 23 20 46 75 6e 63 74  lib.*.}..# Funct
1180: 69 6f 6e 20 74 6f 20 62 75 69 6c 64 20 4d 61 63  ion to build Mac
1190: 20 4f 53 20 58 20 50 61 63 6b 61 67 65 73 0a 70   OS X Packages.p
11a0: 6b 67 62 75 69 6c 64 28 29 20 7b 0a 09 69 66 20  kgbuild() {..if 
11b0: 5b 20 22 60 75 6e 61 6d 65 20 2d 72 20 7c 20 63  [ "`uname -r | c
11c0: 75 74 20 2d 64 20 2e 20 2d 66 20 31 60 22 20 2d  ut -d . -f 1`" -
11d0: 6c 74 20 22 31 30 22 20 5d 3b 20 74 68 65 6e 0a  lt "10" ]; then.
11e0: 09 09 4c 49 42 43 41 43 4b 45 59 47 3d 6c 69 62  ..LIBCACKEYG=lib
11f0: 63 61 63 6b 65 79 67 2e 70 6b 67 0a 09 65 6c 73  cackeyg.pkg..els
1200: 65 0a 09 09 4c 49 42 43 41 43 4b 45 59 47 3d 6c  e...LIBCACKEYG=l
1210: 69 62 63 61 63 6b 65 79 5f 67 2e 70 6b 67 0a 09  ibcackey_g.pkg..
1220: 66 69 0a 09 72 6d 20 2d 66 20 62 75 69 6c 64 2f  fi..rm -f build/
1230: 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64  cackey_osx_build
1240: 2f 63 61 63 6b 65 79 2e 64 79 6c 69 62 0a 09 6c  /cackey.dylib..l
1250: 6e 20 6d 61 63 62 75 69 6c 64 2f 24 7b 4f 53 58  n macbuild/${OSX
1260: 7d 2f 6c 69 62 63 61 63 6b 65 79 2e 64 79 6c 69  }/libcackey.dyli
1270: 62 20 62 75 69 6c 64 2f 63 61 63 6b 65 79 5f 6f  b build/cackey_o
1280: 73 78 5f 62 75 69 6c 64 2f 63 61 63 6b 65 79 2e  sx_build/cackey.
1290: 64 79 6c 69 62 0a 09 66 6f 72 20 50 4d 44 4f 43  dylib..for PMDOC
12a0: 20 69 6e 20 62 75 69 6c 64 2f 63 61 63 6b 65 79   in build/cackey
12b0: 5f 6f 73 78 5f 62 75 69 6c 64 2f 54 65 6d 70 6c  _osx_build/Templ
12c0: 61 74 65 5f 70 6d 62 75 69 6c 64 2f 2a 2e 69 6e  ate_pmbuild/*.in
12d0: 3b 20 64 6f 0a 09 09 50 4d 44 4f 43 3d 22 60 65  ; do...PMDOC="`e
12e0: 63 68 6f 20 22 24 7b 50 4d 44 4f 43 7d 22 20 7c  cho "${PMDOC}" |
12f0: 20 73 65 64 20 27 73 7c 6c 2e 69 6e 7c 6c 7c 67   sed 's|l.in|l|g
1300: 27 20 7c 20 73 65 64 20 27 73 7c 62 75 69 6c 64  ' | sed 's|build
1310: 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c  /cackey_osx_buil
1320: 64 2f 54 65 6d 70 6c 61 74 65 5f 70 6d 62 75 69  d/Template_pmbui
1330: 6c 64 2f 7c 7c 67 27 60 22 0a 09 09 55 55 49 44  ld/||g'`"...UUID
1340: 3d 22 60 70 79 74 68 6f 6e 20 2d 63 20 27 69 6d  ="`python -c 'im
1350: 70 6f 72 74 20 75 75 69 64 3b 20 70 72 69 6e 74  port uuid; print
1360: 20 75 75 69 64 2e 75 75 69 64 31 28 29 27 20 7c   uuid.uuid1()' |
1370: 20 64 64 20 63 6f 6e 76 3d 75 63 61 73 65 20 32   dd conv=ucase 2
1380: 3e 2f 64 65 76 2f 6e 75 6c 6c 60 22 0a 09 09 6d  >/dev/null`"...m
1390: 6b 64 69 72 20 2d 70 20 62 75 69 6c 64 2f 63 61  kdir -p build/ca
13a0: 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64 2f 24  ckey_osx_build/$
13b0: 7b 4f 53 58 7d 5f 70 6d 62 75 69 6c 64 2e 70 6d  {OSX}_pmbuild.pm
13c0: 64 6f 63 0a 09 09 73 65 64 20 22 73 7c 40 40 42  doc...sed "s|@@B
13d0: 55 49 4c 44 52 4f 4f 54 44 49 52 40 40 7c 24 28  UILDROOTDIR@@|$(
13e0: 70 77 64 29 7c 67 22 20 62 75 69 6c 64 2f 63 61  pwd)|g" build/ca
13f0: 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64 2f 54  ckey_osx_build/T
1400: 65 6d 70 6c 61 74 65 5f 70 6d 62 75 69 6c 64 2f  emplate_pmbuild/
1410: 24 7b 50 4d 44 4f 43 7d 2e 69 6e 20 3e 20 62 75  ${PMDOC}.in > bu
1420: 69 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62  ild/cackey_osx_b
1430: 75 69 6c 64 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75  uild/${OSX}_pmbu
1440: 69 6c 64 2e 70 6d 64 6f 63 2f 24 7b 50 4d 44 4f  ild.pmdoc/${PMDO
1450: 43 7d 0a 09 09 73 65 64 20 22 73 7c 40 40 4f 53  C}...sed "s|@@OS
1460: 58 56 45 52 53 49 4f 4e 40 40 7c 24 7b 4f 53 58  XVERSION@@|${OSX
1470: 7d 7c 67 22 20 62 75 69 6c 64 2f 63 61 63 6b 65  }|g" build/cacke
1480: 79 5f 6f 73 78 5f 62 75 69 6c 64 2f 24 7b 4f 53  y_osx_build/${OS
1490: 58 7d 5f 70 6d 62 75 69 6c 64 2e 70 6d 64 6f 63  X}_pmbuild.pmdoc
14a0: 2f 24 7b 50 4d 44 4f 43 7d 20 3e 20 62 75 69 6c  /${PMDOC} > buil
14b0: 64 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69  d/cackey_osx_bui
14c0: 6c 64 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75 69 6c  ld/${OSX}_pmbuil
14d0: 64 2e 70 6d 64 6f 63 2f 24 7b 50 4d 44 4f 43 7d  d.pmdoc/${PMDOC}
14e0: 2e 31 0a 09 09 73 65 64 20 22 73 7c 40 40 55 55  .1...sed "s|@@UU
14f0: 49 44 40 40 7c 24 7b 55 55 49 44 7d 7c 67 22 20  ID@@|${UUID}|g" 
1500: 62 75 69 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78  build/cackey_osx
1510: 5f 62 75 69 6c 64 2f 24 7b 4f 53 58 7d 5f 70 6d  _build/${OSX}_pm
1520: 62 75 69 6c 64 2e 70 6d 64 6f 63 2f 24 7b 50 4d  build.pmdoc/${PM
1530: 44 4f 43 7d 2e 31 20 3e 20 62 75 69 6c 64 2f 63  DOC}.1 > build/c
1540: 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64 2f  ackey_osx_build/
1550: 24 7b 4f 53 58 7d 5f 70 6d 62 75 69 6c 64 2e 70  ${OSX}_pmbuild.p
1560: 6d 64 6f 63 2f 24 7b 50 4d 44 4f 43 7d 0a 09 09  mdoc/${PMDOC}...
1570: 73 65 64 20 22 73 7c 40 40 54 41 52 47 45 54 4f  sed "s|@@TARGETO
1580: 53 40 40 7c 24 7b 50 4b 54 41 52 47 45 54 4f 53  S@@|${PKTARGETOS
1590: 7d 7c 67 22 20 62 75 69 6c 64 2f 63 61 63 6b 65  }|g" build/cacke
15a0: 79 5f 6f 73 78 5f 62 75 69 6c 64 2f 24 7b 4f 53  y_osx_build/${OS
15b0: 58 7d 5f 70 6d 62 75 69 6c 64 2e 70 6d 64 6f 63  X}_pmbuild.pmdoc
15c0: 2f 24 7b 50 4d 44 4f 43 7d 20 3e 20 62 75 69 6c  /${PMDOC} > buil
15d0: 64 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69  d/cackey_osx_bui
15e0: 6c 64 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75 69 6c  ld/${OSX}_pmbuil
15f0: 64 2e 70 6d 64 6f 63 2f 24 7b 50 4d 44 4f 43 7d  d.pmdoc/${PMDOC}
1600: 2e 31 0a 09 09 73 65 64 20 22 73 7c 40 40 4e 45  .1...sed "s|@@NE
1610: 58 54 4f 53 58 56 45 52 40 40 7c 24 7b 4e 45 58  XTOSXVER@@|${NEX
1620: 54 4f 53 58 56 45 52 7d 7c 67 22 20 62 75 69 6c  TOSXVER}|g" buil
1630: 64 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69  d/cackey_osx_bui
1640: 6c 64 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75 69 6c  ld/${OSX}_pmbuil
1650: 64 2e 70 6d 64 6f 63 2f 24 7b 50 4d 44 4f 43 7d  d.pmdoc/${PMDOC}
1660: 2e 31 20 3e 20 62 75 69 6c 64 2f 63 61 63 6b 65  .1 > build/cacke
1670: 79 5f 6f 73 78 5f 62 75 69 6c 64 2f 24 7b 4f 53  y_osx_build/${OS
1680: 58 7d 5f 70 6d 62 75 69 6c 64 2e 70 6d 64 6f 63  X}_pmbuild.pmdoc
1690: 2f 24 7b 50 4d 44 4f 43 7d 0a 09 09 73 65 64 20  /${PMDOC}...sed 
16a0: 22 73 7c 40 40 43 55 52 4f 53 58 56 45 52 40 40  "s|@@CUROSXVER@@
16b0: 7c 24 7b 43 55 52 4f 53 58 56 45 52 7d 7c 67 22  |${CUROSXVER}|g"
16c0: 20 62 75 69 6c 64 2f 63 61 63 6b 65 79 5f 6f 73   build/cackey_os
16d0: 78 5f 62 75 69 6c 64 2f 24 7b 4f 53 58 7d 5f 70  x_build/${OSX}_p
16e0: 6d 62 75 69 6c 64 2e 70 6d 64 6f 63 2f 24 7b 50  mbuild.pmdoc/${P
16f0: 4d 44 4f 43 7d 20 3e 20 62 75 69 6c 64 2f 63 61  MDOC} > build/ca
1700: 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64 2f 24  ckey_osx_build/$
1710: 7b 4f 53 58 7d 5f 70 6d 62 75 69 6c 64 2e 70 6d  {OSX}_pmbuild.pm
1720: 64 6f 63 2f 24 7b 50 4d 44 4f 43 7d 2e 31 0a 09  doc/${PMDOC}.1..
1730: 09 73 65 64 20 22 73 7c 40 40 4c 49 42 43 41 43  .sed "s|@@LIBCAC
1740: 4b 45 59 47 40 40 7c 24 7b 4c 49 42 43 41 43 4b  KEYG@@|${LIBCACK
1750: 45 59 47 7d 7c 67 22 20 62 75 69 6c 64 2f 63 61  EYG}|g" build/ca
1760: 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64 2f 24  ckey_osx_build/$
1770: 7b 4f 53 58 7d 5f 70 6d 62 75 69 6c 64 2e 70 6d  {OSX}_pmbuild.pm
1780: 64 6f 63 2f 24 7b 50 4d 44 4f 43 7d 2e 31 20 3e  doc/${PMDOC}.1 >
1790: 20 62 75 69 6c 64 2f 63 61 63 6b 65 79 5f 6f 73   build/cackey_os
17a0: 78 5f 62 75 69 6c 64 2f 24 7b 4f 53 58 7d 5f 70  x_build/${OSX}_p
17b0: 6d 62 75 69 6c 64 2e 70 6d 64 6f 63 2f 24 7b 50  mbuild.pmdoc/${P
17c0: 4d 44 4f 43 7d 0a 09 09 63 70 20 62 75 69 6c 64  MDOC}...cp build
17d0: 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c  /cackey_osx_buil
17e0: 64 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75 69 6c 64  d/${OSX}_pmbuild
17f0: 2e 70 6d 64 6f 63 2f 24 7b 50 4d 44 4f 43 7d 20  .pmdoc/${PMDOC} 
1800: 62 75 69 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78  build/cackey_osx
1810: 5f 62 75 69 6c 64 2f 24 7b 4f 53 58 7d 5f 70 6d  _build/${OSX}_pm
1820: 62 75 69 6c 64 2e 70 6d 64 6f 63 2f 24 7b 50 4d  build.pmdoc/${PM
1830: 44 4f 43 7d 2e 31 0a 09 09 6d 76 20 62 75 69 6c  DOC}.1...mv buil
1840: 64 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69  d/cackey_osx_bui
1850: 6c 64 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75 69 6c  ld/${OSX}_pmbuil
1860: 64 2e 70 6d 64 6f 63 2f 24 7b 50 4d 44 4f 43 7d  d.pmdoc/${PMDOC}
1870: 2e 31 20 62 75 69 6c 64 2f 63 61 63 6b 65 79 5f  .1 build/cackey_
1880: 6f 73 78 5f 62 75 69 6c 64 2f 24 7b 4f 53 58 7d  osx_build/${OSX}
1890: 5f 70 6d 62 75 69 6c 64 2e 70 6d 64 6f 63 2f 24  _pmbuild.pmdoc/$
18a0: 7b 50 4d 44 4f 43 7d 0a 09 64 6f 6e 65 0a 09 69  {PMDOC}..done..i
18b0: 66 20 5b 20 24 7b 4f 53 58 7d 20 3d 3d 20 22 50  f [ ${OSX} == "P
18c0: 61 6e 74 68 65 72 22 20 5d 3b 20 74 68 65 6e 0a  anther" ]; then.
18d0: 09 09 45 58 54 3d 6d 70 6b 67 0a 09 09 63 61 74  ..EXT=mpkg...cat
18e0: 20 62 75 69 6c 64 2f 63 61 63 6b 65 79 5f 6f 73   build/cackey_os
18f0: 78 5f 62 75 69 6c 64 2f 24 7b 4f 53 58 7d 5f 70  x_build/${OSX}_p
1900: 6d 62 75 69 6c 64 2e 70 6d 64 6f 63 2f 69 6e 64  mbuild.pmdoc/ind
1910: 65 78 2e 78 6d 6c 20 7c 20 67 72 65 70 20 2d 76  ex.xml | grep -v
1920: 20 2d 69 20 72 65 71 75 69 72 65 20 3e 20 62 75   -i require > bu
1930: 69 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62  ild/cackey_osx_b
1940: 75 69 6c 64 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75  uild/${OSX}_pmbu
1950: 69 6c 64 2e 70 6d 64 6f 63 2f 69 6e 64 65 78 2e  ild.pmdoc/index.
1960: 78 6d 6c 2e 6e 65 77 0a 09 09 6d 76 20 62 75 69  xml.new...mv bui
1970: 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75  ld/cackey_osx_bu
1980: 69 6c 64 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75 69  ild/${OSX}_pmbui
1990: 6c 64 2e 70 6d 64 6f 63 2f 69 6e 64 65 78 2e 78  ld.pmdoc/index.x
19a0: 6d 6c 2e 6e 65 77 20 62 75 69 6c 64 2f 63 61 63  ml.new build/cac
19b0: 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64 2f 24 7b  key_osx_build/${
19c0: 4f 53 58 7d 5f 70 6d 62 75 69 6c 64 2e 70 6d 64  OSX}_pmbuild.pmd
19d0: 6f 63 2f 69 6e 64 65 78 2e 78 6d 6c 0a 09 65 6c  oc/index.xml..el
19e0: 73 65 0a 09 09 45 58 54 3d 70 6b 67 0a 09 66 69  se...EXT=pkg..fi
19f0: 0a 09 69 66 20 5b 20 24 7b 4f 53 58 7d 20 3d 3d  ..if [ ${OSX} ==
1a00: 20 22 53 6e 6f 77 6c 65 6f 70 61 72 64 22 20 5d   "Snowleopard" ]
1a10: 3b 20 74 68 65 6e 0a 09 09 63 61 74 20 62 75 69  ; then...cat bui
1a20: 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75  ld/cackey_osx_bu
1a30: 69 6c 64 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75 69  ild/${OSX}_pmbui
1a40: 6c 64 2e 70 6d 64 6f 63 2f 69 6e 64 65 78 2e 78  ld.pmdoc/index.x
1a50: 6d 6c 20 7c 20 73 65 64 20 27 73 7c 66 6f 72 20  ml | sed 's|for 
1a60: 4d 61 63 20 4f 53 20 58 20 53 6e 6f 77 6c 65 6f  Mac OS X Snowleo
1a70: 70 61 72 64 7c 66 6f 72 20 4d 61 63 20 4f 53 20  pard|for Mac OS 
1a80: 58 20 53 6e 6f 77 4c 65 6f 70 61 72 64 7c 67 27  X SnowLeopard|g'
1a90: 20 3e 20 62 75 69 6c 64 2f 63 61 63 6b 65 79 5f   > build/cackey_
1aa0: 6f 73 78 5f 62 75 69 6c 64 2f 24 7b 4f 53 58 7d  osx_build/${OSX}
1ab0: 5f 70 6d 62 75 69 6c 64 2e 70 6d 64 6f 63 2f 69  _pmbuild.pmdoc/i
1ac0: 6e 64 65 78 2e 78 6d 6c 2e 6e 65 77 0a 09 09 6d  ndex.xml.new...m
1ad0: 76 20 62 75 69 6c 64 2f 63 61 63 6b 65 79 5f 6f  v build/cackey_o
1ae0: 73 78 5f 62 75 69 6c 64 2f 24 7b 4f 53 58 7d 5f  sx_build/${OSX}_
1af0: 70 6d 62 75 69 6c 64 2e 70 6d 64 6f 63 2f 69 6e  pmbuild.pmdoc/in
1b00: 64 65 78 2e 78 6d 6c 2e 6e 65 77 20 62 75 69 6c  dex.xml.new buil
1b10: 64 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69  d/cackey_osx_bui
1b20: 6c 64 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75 69 6c  ld/${OSX}_pmbuil
1b30: 64 2e 70 6d 64 6f 63 2f 69 6e 64 65 78 2e 78 6d  d.pmdoc/index.xm
1b40: 6c 0a 09 66 69 0a 09 2f 44 65 76 65 6c 6f 70 65  l..fi../Develope
1b50: 72 2f 41 70 70 6c 69 63 61 74 69 6f 6e 73 2f 55  r/Applications/U
1b60: 74 69 6c 69 74 69 65 73 2f 50 61 63 6b 61 67 65  tilities/Package
1b70: 4d 61 6b 65 72 2e 61 70 70 2f 43 6f 6e 74 65 6e  Maker.app/Conten
1b80: 74 73 2f 4d 61 63 4f 53 2f 50 61 63 6b 61 67 65  ts/MacOS/Package
1b90: 4d 61 6b 65 72 20 2d 64 20 62 75 69 6c 64 2f 63  Maker -d build/c
1ba0: 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64 2f  ackey_osx_build/
1bb0: 24 7b 4f 53 58 7d 5f 70 6d 62 75 69 6c 64 2e 70  ${OSX}_pmbuild.p
1bc0: 6d 64 6f 63 20 2d 6f 20 6d 61 63 62 75 69 6c 64  mdoc -o macbuild
1bd0: 2f 70 6b 67 2f 43 41 43 4b 65 79 5f 24 7b 43 41  /pkg/CACKey_${CA
1be0: 43 4b 45 59 5f 56 45 52 53 49 4f 4e 7d 5f 24 7b  CKEY_VERSION}_${
1bf0: 4f 53 58 7d 2e 24 7b 45 58 54 7d 0a 09 74 61 72  OSX}.${EXT}..tar
1c00: 20 2d 2d 63 72 65 61 74 65 20 2d 2d 64 69 72 65   --create --dire
1c10: 63 74 6f 72 79 20 6d 61 63 62 75 69 6c 64 2f 70  ctory macbuild/p
1c20: 6b 67 2f 20 2d 2d 66 69 6c 65 20 6d 61 63 62 75  kg/ --file macbu
1c30: 69 6c 64 2f 70 6b 67 2f 43 41 43 4b 65 79 5f 24  ild/pkg/CACKey_$
1c40: 7b 43 41 43 4b 45 59 5f 56 45 52 53 49 4f 4e 7d  {CACKEY_VERSION}
1c50: 5f 24 7b 4f 53 58 7d 2e 24 7b 45 58 54 7d 2e 74  _${OSX}.${EXT}.t
1c60: 61 72 20 43 41 43 4b 65 79 5f 24 7b 43 41 43 4b  ar CACKey_${CACK
1c70: 45 59 5f 56 45 52 53 49 4f 4e 7d 5f 24 7b 4f 53  EY_VERSION}_${OS
1c80: 58 7d 2e 24 7b 45 58 54 7d 0a 09 67 7a 69 70 20  X}.${EXT}..gzip 
1c90: 2d 39 20 6d 61 63 62 75 69 6c 64 2f 70 6b 67 2f  -9 macbuild/pkg/
1ca0: 43 41 43 4b 65 79 5f 24 7b 43 41 43 4b 45 59 5f  CACKey_${CACKEY_
1cb0: 56 45 52 53 49 4f 4e 7d 5f 24 7b 4f 53 58 7d 2e  VERSION}_${OSX}.
1cc0: 24 7b 45 58 54 7d 2e 74 61 72 0a 09 72 6d 20 2d  ${EXT}.tar..rm -
1cd0: 72 66 20 6d 61 63 62 75 69 6c 64 2f 70 6b 67 2f  rf macbuild/pkg/
1ce0: 43 41 43 4b 65 79 5f 24 7b 43 41 43 4b 45 59 5f  CACKey_${CACKEY_
1cf0: 56 45 52 53 49 4f 4e 7d 5f 24 7b 4f 53 58 7d 2e  VERSION}_${OSX}.
1d00: 24 7b 45 58 54 7d 0a 09 72 6d 20 2d 66 20 62 75  ${EXT}..rm -f bu
1d10: 69 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62  ild/cackey_osx_b
1d20: 75 69 6c 64 2f 63 61 63 6b 65 79 2e 64 79 6c 69  uild/cackey.dyli
1d30: 62 0a 09 65 63 68 6f 20 22 24 7b 4f 53 58 7d 20  b..echo "${OSX} 
1d40: 62 75 69 6c 64 20 63 6f 6d 70 6c 65 74 65 22 0a  build complete".
1d50: 7d 0a 0a 23 20 54 61 6b 65 20 63 6f 6d 6d 61 6e  }..# Take comman
1d60: 64 20 6c 69 6e 65 20 61 72 67 75 6d 65 6e 74 73  d line arguments
1d70: 20 61 6e 64 20 65 78 65 63 75 74 65 0a 63 61 73   and execute.cas
1d80: 65 20 22 24 31 22 20 69 6e 0a 09 22 22 29 0a 09  e "$1" in.."")..
1d90: 09 75 73 61 67 65 0a 09 09 65 78 69 74 20 24 3f  .usage...exit $?
1da0: 0a 09 3b 3b 0a 0a 09 22 70 61 6e 74 68 65 72 22  ..;;..."panther"
1db0: 29 0a 09 09 2e 2f 61 75 74 6f 67 65 6e 2e 73 68  )..../autogen.sh
1dc0: 0a 09 09 70 61 6e 74 68 65 72 0a 09 09 65 78 69  ...panther...exi
1dd0: 74 20 24 3f 0a 09 3b 3b 0a 0a 09 22 74 69 67 65  t $?..;;..."tige
1de0: 72 22 29 0a 09 09 2e 2f 61 75 74 6f 67 65 6e 2e  r")..../autogen.
1df0: 73 68 0a 09 09 74 69 67 65 72 0a 09 09 65 78 69  sh...tiger...exi
1e00: 74 20 24 3f 0a 09 3b 3b 0a 0a 09 22 6c 65 6f 70  t $?..;;..."leop
1e10: 61 72 64 22 29 0a 09 09 2e 2f 61 75 74 6f 67 65  ard")..../autoge
1e20: 6e 2e 73 68 0a 09 09 6c 65 6f 70 61 72 64 0a 09  n.sh...leopard..
1e30: 09 65 78 69 74 20 24 3f 0a 09 3b 3b 0a 0a 09 22  .exit $?..;;..."
1e40: 73 6e 6f 77 6c 65 6f 70 61 72 64 22 29 0a 09 09  snowleopard")...
1e50: 2e 2f 61 75 74 6f 67 65 6e 2e 73 68 0a 09 09 73  ./autogen.sh...s
1e60: 6e 6f 77 6c 65 6f 70 61 72 64 0a 09 09 65 78 69  nowleopard...exi
1e70: 74 20 24 3f 0a 09 3b 3b 0a 0a 09 22 61 6c 6c 22  t $?..;;..."all"
1e80: 29 0a 09 09 2e 2f 61 75 74 6f 67 65 6e 2e 73 68  )..../autogen.sh
1e90: 0a 09 09 70 61 6e 74 68 65 72 0a 09 09 74 69 67  ...panther...tig
1ea0: 65 72 0a 09 09 6c 65 6f 70 61 72 64 0a 09 09 73  er...leopard...s
1eb0: 6e 6f 77 6c 65 6f 70 61 72 64 0a 09 09 65 63 68  nowleopard...ech
1ec0: 6f 20 22 22 0a 09 09 65 63 68 6f 20 22 41 6c 6c  o ""...echo "All
1ed0: 20 62 75 69 6c 64 73 20 63 6f 6d 70 6c 65 74 65   builds complete
1ee0: 2e 22 0a 09 09 65 78 69 74 20 24 3f 0a 09 3b 3b  ."...exit $?..;;
1ef0: 0a 0a 09 22 63 6c 65 61 6e 22 29 0a 09 09 63 6c  ..."clean")...cl
1f00: 65 61 6e 0a 09 09 65 78 69 74 20 24 3f 0a 09 3b  ean...exit $?..;
1f10: 3b 0a 0a 09 2a 29 0a 09 09 75 73 61 67 65 0a 09  ;...*)...usage..
1f20: 09 65 78 69 74 20 24 3f 0a 09 3b 3b 0a 65 73 61  .exit $?..;;.esa
1f30: 63 20 0a                                         c .