Hex Artifact Content

Artifact c6f2bf5d6266689184993e46136986503fde7380:


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 50 4b 54 41 52 47 45 54 4f 53 3d  ard..PKTARGETOS=
0c90: 33 0a 09 4e 45 58 54 4f 53 58 56 45 52 3d 31 30  3..NEXTOSXVER=10
0ca0: 2e 37 0a 09 43 55 52 4f 53 58 56 45 52 3d 31 30  .7..CUROSXVER=10
0cb0: 2e 36 0a 09 66 6f 72 20 48 4f 53 54 20 69 6e 20  .6..for HOST in 
0cc0: 69 33 38 36 2d 61 70 70 6c 65 2d 64 61 72 77 69  i386-apple-darwi
0cd0: 6e 31 30 20 78 38 36 5f 36 34 2d 61 70 70 6c 65  n10 x86_64-apple
0ce0: 2d 64 61 72 77 69 6e 31 30 3b 20 64 6f 0a 09 09  -darwin10; do...
0cf0: 67 65 6e 62 75 69 6c 64 0a 09 64 6f 6e 65 0a 09  genbuild..done..
0d00: 6c 69 62 62 75 69 6c 64 0a 09 70 6b 67 62 75 69  libbuild..pkgbui
0d10: 6c 64 0a 7d 0a 0a 23 20 47 65 6e 65 72 69 63 20  ld.}..# Generic 
0d20: 62 75 69 6c 64 20 66 75 6e 63 74 69 6f 6e 0a 67  build function.g
0d30: 65 6e 62 75 69 6c 64 28 29 20 7b 0a 09 6d 61 6b  enbuild() {..mak
0d40: 65 20 64 69 73 74 63 6c 65 61 6e 0a 09 41 52 43  e distclean..ARC
0d50: 48 3d 60 65 63 68 6f 20 24 7b 48 4f 53 54 7d 20  H=`echo ${HOST} 
0d60: 7c 20 63 75 74 20 2d 64 20 22 2d 22 20 2d 66 20  | cut -d "-" -f 
0d70: 31 60 0a 09 69 66 20 5b 20 24 7b 41 52 43 48 7d  1`..if [ ${ARCH}
0d80: 20 3d 3d 20 22 70 6f 77 65 72 70 63 22 20 5d 3b   == "powerpc" ];
0d90: 20 74 68 65 6e 0a 09 09 69 66 20 5b 20 24 7b 4f   then...if [ ${O
0da0: 53 58 7d 20 3d 3d 20 22 4c 65 6f 70 61 72 64 22  SX} == "Leopard"
0db0: 20 5d 3b 20 74 68 65 6e 0a 09 09 09 41 52 43 48   ]; then....ARCH
0dc0: 3d 22 70 70 63 20 2d 6d 63 70 75 3d 47 34 22 0a  ="ppc -mcpu=G4".
0dd0: 09 09 65 6c 73 65 0a 09 09 09 41 52 43 48 3d 22  ..else....ARCH="
0de0: 70 70 63 20 2d 6d 63 70 75 3d 47 33 22 0a 09 09  ppc -mcpu=G3"...
0df0: 66 69 0a 09 66 69 0a 09 43 46 4c 41 47 53 3d 22  fi..fi..CFLAGS="
0e00: 2d 61 72 63 68 20 24 7b 41 52 43 48 7d 22 20 2e  -arch ${ARCH}" .
0e10: 2f 63 6f 6e 66 69 67 75 72 65 20 2d 2d 77 69 74  /configure --wit
0e20: 68 2d 70 63 73 63 2d 68 65 61 64 65 72 73 3d 24  h-pcsc-headers=$
0e30: 7b 48 45 41 44 45 52 53 7d 20 2d 2d 77 69 74 68  {HEADERS} --with
0e40: 2d 70 63 73 63 2d 6c 69 62 73 3d 24 7b 4c 49 42  -pcsc-libs=${LIB
0e50: 52 41 52 59 7d 20 2d 2d 68 6f 73 74 3d 24 7b 48  RARY} --host=${H
0e60: 4f 53 54 7d 0a 09 6d 61 6b 65 0a 09 63 70 20 6c  OST}..make..cp l
0e70: 69 62 63 61 63 6b 65 79 2e 64 79 6c 69 62 20 6d  ibcackey.dylib m
0e80: 61 63 62 75 69 6c 64 2f 24 7b 4f 53 58 7d 2f 6c  acbuild/${OSX}/l
0e90: 69 62 63 61 63 6b 65 79 2e 64 79 6c 69 62 2e 60  ibcackey.dylib.`
0ea0: 65 63 68 6f 20 24 7b 41 52 43 48 7d 20 7c 20 63  echo ${ARCH} | c
0eb0: 75 74 20 2d 64 20 27 20 27 20 2d 66 20 31 60 0a  ut -d ' ' -f 1`.
0ec0: 09 63 70 20 6c 69 62 63 61 63 6b 65 79 5f 67 2e  .cp libcackey_g.
0ed0: 64 79 6c 69 62 20 6d 61 63 62 75 69 6c 64 2f 24  dylib macbuild/$
0ee0: 7b 4f 53 58 7d 2f 6c 69 62 63 61 63 6b 65 79 5f  {OSX}/libcackey_
0ef0: 67 2e 64 79 6c 69 62 2e 60 65 63 68 6f 20 24 7b  g.dylib.`echo ${
0f00: 41 52 43 48 7d 20 7c 20 63 75 74 20 2d 64 20 27  ARCH} | cut -d '
0f10: 20 27 20 2d 66 20 31 60 20 0a 7d 0a 0a 23 20 4c   ' -f 1` .}..# L
0f20: 69 62 72 61 72 79 20 62 75 69 6c 64 20 66 75 6e  ibrary build fun
0f30: 63 74 69 6f 6e 0a 6c 69 62 62 75 69 6c 64 28 29  ction.libbuild()
0f40: 20 7b 0a 09 66 6f 72 20 4c 49 42 20 69 6e 20 6d   {..for LIB in m
0f50: 61 63 62 75 69 6c 64 2f 24 7b 4f 53 58 7d 2f 6c  acbuild/${OSX}/l
0f60: 69 62 63 61 63 6b 65 79 2e 64 79 6c 69 62 2e 2a  ibcackey.dylib.*
0f70: 3b 20 64 6f 0a 09 09 41 52 43 48 4c 49 53 54 3d  ; do...ARCHLIST=
0f80: 22 24 7b 41 52 43 48 4c 49 53 54 7d 20 60 65 63  "${ARCHLIST} `ec
0f90: 68 6f 20 27 2d 61 72 63 68 20 27 60 20 60 65 63  ho '-arch '` `ec
0fa0: 68 6f 20 24 7b 4c 49 42 7d 20 7c 20 63 75 74 20  ho ${LIB} | cut 
0fb0: 2d 64 20 2e 20 2d 66 20 33 60 20 60 65 63 68 6f  -d . -f 3` `echo
0fc0: 20 27 20 27 60 20 60 65 63 68 6f 20 24 7b 4c 49   ' '` `echo ${LI
0fd0: 42 7d 60 22 0a 09 64 6f 6e 65 0a 09 6c 69 70 6f  B}`"..done..lipo
0fe0: 20 2d 63 72 65 61 74 65 20 24 7b 41 52 43 48 4c   -create ${ARCHL
0ff0: 49 53 54 7d 20 2d 6f 75 74 70 75 74 20 6d 61 63  IST} -output mac
1000: 62 75 69 6c 64 2f 24 7b 4f 53 58 7d 2f 6c 69 62  build/${OSX}/lib
1010: 63 61 63 6b 65 79 2e 64 79 6c 69 62 0a 09 66 6f  cackey.dylib..fo
1020: 72 20 44 4c 49 42 20 69 6e 20 6d 61 63 62 75 69  r DLIB in macbui
1030: 6c 64 2f 24 7b 4f 53 58 7d 2f 6c 69 62 63 61 63  ld/${OSX}/libcac
1040: 6b 65 79 5f 67 2e 64 79 6c 69 62 2e 2a 3b 20 64  key_g.dylib.*; d
1050: 6f 0a 09 09 44 41 52 43 48 4c 49 53 54 3d 22 24  o...DARCHLIST="$
1060: 7b 44 41 52 43 48 4c 49 53 54 7d 20 60 65 63 68  {DARCHLIST} `ech
1070: 6f 20 27 2d 61 72 63 68 20 27 60 20 60 65 63 68  o '-arch '` `ech
1080: 6f 20 24 7b 44 4c 49 42 7d 20 7c 20 63 75 74 20  o ${DLIB} | cut 
1090: 2d 64 20 2e 20 2d 66 20 33 60 20 60 65 63 68 6f  -d . -f 3` `echo
10a0: 20 27 20 27 60 20 60 65 63 68 6f 20 24 7b 44 4c   ' '` `echo ${DL
10b0: 49 42 7d 60 22 0a 09 64 6f 6e 65 0a 09 6c 69 70  IB}`"..done..lip
10c0: 6f 20 2d 63 72 65 61 74 65 20 24 7b 44 41 52 43  o -create ${DARC
10d0: 48 4c 49 53 54 7d 20 2d 6f 75 74 70 75 74 20 6d  HLIST} -output m
10e0: 61 63 62 75 69 6c 64 2f 24 7b 4f 53 58 7d 2f 6c  acbuild/${OSX}/l
10f0: 69 62 63 61 63 6b 65 79 5f 67 2e 64 79 6c 69 62  ibcackey_g.dylib
1100: 0a 09 72 6d 20 6d 61 63 62 75 69 6c 64 2f 24 7b  ..rm macbuild/${
1110: 4f 53 58 7d 2f 6c 69 62 63 61 63 6b 65 79 2a 2e  OSX}/libcackey*.
1120: 64 79 6c 69 62 2e 2a 0a 7d 0a 0a 23 20 46 75 6e  dylib.*.}..# Fun
1130: 63 74 69 6f 6e 20 74 6f 20 62 75 69 6c 64 20 4d  ction to build M
1140: 61 63 20 4f 53 20 58 20 50 61 63 6b 61 67 65 73  ac OS X Packages
1150: 0a 70 6b 67 62 75 69 6c 64 28 29 20 7b 0a 09 69  .pkgbuild() {..i
1160: 66 20 5b 20 22 60 75 6e 61 6d 65 20 2d 72 20 7c  f [ "`uname -r |
1170: 20 63 75 74 20 2d 64 20 2e 20 2d 66 20 31 60 22   cut -d . -f 1`"
1180: 20 2d 6c 74 20 22 31 30 22 20 5d 3b 20 74 68 65   -lt "10" ]; the
1190: 6e 0a 09 09 4c 49 42 43 41 43 4b 45 59 47 3d 6c  n...LIBCACKEYG=l
11a0: 69 62 63 61 63 6b 65 79 67 2e 70 6b 67 0a 09 65  ibcackeyg.pkg..e
11b0: 6c 73 65 0a 09 09 4c 49 42 43 41 43 4b 45 59 47  lse...LIBCACKEYG
11c0: 3d 6c 69 62 63 61 63 6b 65 79 5f 67 2e 70 6b 67  =libcackey_g.pkg
11d0: 0a 09 66 69 0a 09 72 6d 20 2d 66 20 62 75 69 6c  ..fi..rm -f buil
11e0: 64 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69  d/cackey_osx_bui
11f0: 6c 64 2f 63 61 63 6b 65 79 2e 64 79 6c 69 62 0a  ld/cackey.dylib.
1200: 09 6c 6e 20 6d 61 63 62 75 69 6c 64 2f 24 7b 4f  .ln macbuild/${O
1210: 53 58 7d 2f 6c 69 62 63 61 63 6b 65 79 2e 64 79  SX}/libcackey.dy
1220: 6c 69 62 20 62 75 69 6c 64 2f 63 61 63 6b 65 79  lib build/cackey
1230: 5f 6f 73 78 5f 62 75 69 6c 64 2f 63 61 63 6b 65  _osx_build/cacke
1240: 79 2e 64 79 6c 69 62 0a 09 66 6f 72 20 50 4d 44  y.dylib..for PMD
1250: 4f 43 20 69 6e 20 62 75 69 6c 64 2f 63 61 63 6b  OC in build/cack
1260: 65 79 5f 6f 73 78 5f 62 75 69 6c 64 2f 54 65 6d  ey_osx_build/Tem
1270: 70 6c 61 74 65 5f 70 6d 62 75 69 6c 64 2f 2a 2e  plate_pmbuild/*.
1280: 69 6e 3b 20 64 6f 0a 09 09 50 4d 44 4f 43 3d 22  in; do...PMDOC="
1290: 60 65 63 68 6f 20 22 24 7b 50 4d 44 4f 43 7d 22  `echo "${PMDOC}"
12a0: 20 7c 20 73 65 64 20 27 73 7c 6c 2e 69 6e 7c 6c   | sed 's|l.in|l
12b0: 7c 67 27 20 7c 20 73 65 64 20 27 73 7c 62 75 69  |g' | sed 's|bui
12c0: 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75  ld/cackey_osx_bu
12d0: 69 6c 64 2f 54 65 6d 70 6c 61 74 65 5f 70 6d 62  ild/Template_pmb
12e0: 75 69 6c 64 2f 7c 7c 67 27 60 22 0a 09 09 55 55  uild/||g'`"...UU
12f0: 49 44 3d 22 60 70 79 74 68 6f 6e 20 2d 63 20 27  ID="`python -c '
1300: 69 6d 70 6f 72 74 20 75 75 69 64 3b 20 70 72 69  import uuid; pri
1310: 6e 74 20 75 75 69 64 2e 75 75 69 64 31 28 29 27  nt uuid.uuid1()'
1320: 20 7c 20 64 64 20 63 6f 6e 76 3d 75 63 61 73 65   | dd conv=ucase
1330: 20 32 3e 2f 64 65 76 2f 6e 75 6c 6c 60 22 0a 09   2>/dev/null`"..
1340: 09 6d 6b 64 69 72 20 2d 70 20 62 75 69 6c 64 2f  .mkdir -p build/
1350: 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64  cackey_osx_build
1360: 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75 69 6c 64 2e  /${OSX}_pmbuild.
1370: 70 6d 64 6f 63 0a 09 09 73 65 64 20 22 73 7c 40  pmdoc...sed "s|@
1380: 40 42 55 49 4c 44 52 4f 4f 54 44 49 52 40 40 7c  @BUILDROOTDIR@@|
1390: 24 28 70 77 64 29 7c 67 22 20 62 75 69 6c 64 2f  $(pwd)|g" build/
13a0: 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64  cackey_osx_build
13b0: 2f 54 65 6d 70 6c 61 74 65 5f 70 6d 62 75 69 6c  /Template_pmbuil
13c0: 64 2f 24 7b 50 4d 44 4f 43 7d 2e 69 6e 20 3e 20  d/${PMDOC}.in > 
13d0: 62 75 69 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78  build/cackey_osx
13e0: 5f 62 75 69 6c 64 2f 24 7b 4f 53 58 7d 5f 70 6d  _build/${OSX}_pm
13f0: 62 75 69 6c 64 2e 70 6d 64 6f 63 2f 24 7b 50 4d  build.pmdoc/${PM
1400: 44 4f 43 7d 0a 09 09 73 65 64 20 22 73 7c 40 40  DOC}...sed "s|@@
1410: 4f 53 58 56 45 52 53 49 4f 4e 40 40 7c 24 7b 4f  OSXVERSION@@|${O
1420: 53 58 7d 7c 67 22 20 62 75 69 6c 64 2f 63 61 63  SX}|g" build/cac
1430: 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64 2f 24 7b  key_osx_build/${
1440: 4f 53 58 7d 5f 70 6d 62 75 69 6c 64 2e 70 6d 64  OSX}_pmbuild.pmd
1450: 6f 63 2f 24 7b 50 4d 44 4f 43 7d 20 3e 20 62 75  oc/${PMDOC} > bu
1460: 69 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62  ild/cackey_osx_b
1470: 75 69 6c 64 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75  uild/${OSX}_pmbu
1480: 69 6c 64 2e 70 6d 64 6f 63 2f 24 7b 50 4d 44 4f  ild.pmdoc/${PMDO
1490: 43 7d 2e 31 0a 09 09 73 65 64 20 22 73 7c 40 40  C}.1...sed "s|@@
14a0: 55 55 49 44 40 40 7c 24 7b 55 55 49 44 7d 7c 67  UUID@@|${UUID}|g
14b0: 22 20 62 75 69 6c 64 2f 63 61 63 6b 65 79 5f 6f  " build/cackey_o
14c0: 73 78 5f 62 75 69 6c 64 2f 24 7b 4f 53 58 7d 5f  sx_build/${OSX}_
14d0: 70 6d 62 75 69 6c 64 2e 70 6d 64 6f 63 2f 24 7b  pmbuild.pmdoc/${
14e0: 50 4d 44 4f 43 7d 2e 31 20 3e 20 62 75 69 6c 64  PMDOC}.1 > build
14f0: 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c  /cackey_osx_buil
1500: 64 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75 69 6c 64  d/${OSX}_pmbuild
1510: 2e 70 6d 64 6f 63 2f 24 7b 50 4d 44 4f 43 7d 0a  .pmdoc/${PMDOC}.
1520: 09 09 73 65 64 20 22 73 7c 40 40 54 41 52 47 45  ..sed "s|@@TARGE
1530: 54 4f 53 40 40 7c 24 7b 50 4b 54 41 52 47 45 54  TOS@@|${PKTARGET
1540: 4f 53 7d 7c 67 22 20 62 75 69 6c 64 2f 63 61 63  OS}|g" build/cac
1550: 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64 2f 24 7b  key_osx_build/${
1560: 4f 53 58 7d 5f 70 6d 62 75 69 6c 64 2e 70 6d 64  OSX}_pmbuild.pmd
1570: 6f 63 2f 24 7b 50 4d 44 4f 43 7d 20 3e 20 62 75  oc/${PMDOC} > bu
1580: 69 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62  ild/cackey_osx_b
1590: 75 69 6c 64 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75  uild/${OSX}_pmbu
15a0: 69 6c 64 2e 70 6d 64 6f 63 2f 24 7b 50 4d 44 4f  ild.pmdoc/${PMDO
15b0: 43 7d 2e 31 0a 09 09 73 65 64 20 22 73 7c 40 40  C}.1...sed "s|@@
15c0: 4e 45 58 54 4f 53 58 56 45 52 40 40 7c 24 7b 4e  NEXTOSXVER@@|${N
15d0: 45 58 54 4f 53 58 56 45 52 7d 7c 67 22 20 62 75  EXTOSXVER}|g" bu
15e0: 69 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62  ild/cackey_osx_b
15f0: 75 69 6c 64 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75  uild/${OSX}_pmbu
1600: 69 6c 64 2e 70 6d 64 6f 63 2f 24 7b 50 4d 44 4f  ild.pmdoc/${PMDO
1610: 43 7d 2e 31 20 3e 20 62 75 69 6c 64 2f 63 61 63  C}.1 > build/cac
1620: 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64 2f 24 7b  key_osx_build/${
1630: 4f 53 58 7d 5f 70 6d 62 75 69 6c 64 2e 70 6d 64  OSX}_pmbuild.pmd
1640: 6f 63 2f 24 7b 50 4d 44 4f 43 7d 0a 09 09 73 65  oc/${PMDOC}...se
1650: 64 20 22 73 7c 40 40 43 55 52 4f 53 58 56 45 52  d "s|@@CUROSXVER
1660: 40 40 7c 24 7b 43 55 52 4f 53 58 56 45 52 7d 7c  @@|${CUROSXVER}|
1670: 67 22 20 62 75 69 6c 64 2f 63 61 63 6b 65 79 5f  g" build/cackey_
1680: 6f 73 78 5f 62 75 69 6c 64 2f 24 7b 4f 53 58 7d  osx_build/${OSX}
1690: 5f 70 6d 62 75 69 6c 64 2e 70 6d 64 6f 63 2f 24  _pmbuild.pmdoc/$
16a0: 7b 50 4d 44 4f 43 7d 20 3e 20 62 75 69 6c 64 2f  {PMDOC} > build/
16b0: 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64  cackey_osx_build
16c0: 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75 69 6c 64 2e  /${OSX}_pmbuild.
16d0: 70 6d 64 6f 63 2f 24 7b 50 4d 44 4f 43 7d 2e 31  pmdoc/${PMDOC}.1
16e0: 0a 09 09 73 65 64 20 22 73 7c 40 40 4c 49 42 43  ...sed "s|@@LIBC
16f0: 41 43 4b 45 59 47 40 40 7c 24 7b 4c 49 42 43 41  ACKEYG@@|${LIBCA
1700: 43 4b 45 59 47 7d 7c 67 22 20 62 75 69 6c 64 2f  CKEYG}|g" build/
1710: 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64  cackey_osx_build
1720: 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75 69 6c 64 2e  /${OSX}_pmbuild.
1730: 70 6d 64 6f 63 2f 24 7b 50 4d 44 4f 43 7d 2e 31  pmdoc/${PMDOC}.1
1740: 20 3e 20 62 75 69 6c 64 2f 63 61 63 6b 65 79 5f   > build/cackey_
1750: 6f 73 78 5f 62 75 69 6c 64 2f 24 7b 4f 53 58 7d  osx_build/${OSX}
1760: 5f 70 6d 62 75 69 6c 64 2e 70 6d 64 6f 63 2f 24  _pmbuild.pmdoc/$
1770: 7b 50 4d 44 4f 43 7d 0a 09 09 63 70 20 62 75 69  {PMDOC}...cp bui
1780: 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75  ld/cackey_osx_bu
1790: 69 6c 64 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75 69  ild/${OSX}_pmbui
17a0: 6c 64 2e 70 6d 64 6f 63 2f 24 7b 50 4d 44 4f 43  ld.pmdoc/${PMDOC
17b0: 7d 20 62 75 69 6c 64 2f 63 61 63 6b 65 79 5f 6f  } build/cackey_o
17c0: 73 78 5f 62 75 69 6c 64 2f 24 7b 4f 53 58 7d 5f  sx_build/${OSX}_
17d0: 70 6d 62 75 69 6c 64 2e 70 6d 64 6f 63 2f 24 7b  pmbuild.pmdoc/${
17e0: 50 4d 44 4f 43 7d 2e 31 0a 09 09 6d 76 20 62 75  PMDOC}.1...mv bu
17f0: 69 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62  ild/cackey_osx_b
1800: 75 69 6c 64 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75  uild/${OSX}_pmbu
1810: 69 6c 64 2e 70 6d 64 6f 63 2f 24 7b 50 4d 44 4f  ild.pmdoc/${PMDO
1820: 43 7d 2e 31 20 62 75 69 6c 64 2f 63 61 63 6b 65  C}.1 build/cacke
1830: 79 5f 6f 73 78 5f 62 75 69 6c 64 2f 24 7b 4f 53  y_osx_build/${OS
1840: 58 7d 5f 70 6d 62 75 69 6c 64 2e 70 6d 64 6f 63  X}_pmbuild.pmdoc
1850: 2f 24 7b 50 4d 44 4f 43 7d 0a 09 64 6f 6e 65 0a  /${PMDOC}..done.
1860: 09 69 66 20 5b 20 24 7b 4f 53 58 7d 20 3d 3d 20  .if [ ${OSX} == 
1870: 22 50 61 6e 74 68 65 72 22 20 5d 3b 20 74 68 65  "Panther" ]; the
1880: 6e 0a 09 09 45 58 54 3d 6d 70 6b 67 0a 09 09 63  n...EXT=mpkg...c
1890: 61 74 20 62 75 69 6c 64 2f 63 61 63 6b 65 79 5f  at build/cackey_
18a0: 6f 73 78 5f 62 75 69 6c 64 2f 24 7b 4f 53 58 7d  osx_build/${OSX}
18b0: 5f 70 6d 62 75 69 6c 64 2e 70 6d 64 6f 63 2f 69  _pmbuild.pmdoc/i
18c0: 6e 64 65 78 2e 78 6d 6c 20 7c 20 67 72 65 70 20  ndex.xml | grep 
18d0: 2d 76 20 2d 69 20 72 65 71 75 69 72 65 20 3e 20  -v -i require > 
18e0: 62 75 69 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78  build/cackey_osx
18f0: 5f 62 75 69 6c 64 2f 24 7b 4f 53 58 7d 5f 70 6d  _build/${OSX}_pm
1900: 62 75 69 6c 64 2e 70 6d 64 6f 63 2f 69 6e 64 65  build.pmdoc/inde
1910: 78 2e 78 6d 6c 2e 6e 65 77 0a 09 09 6d 76 20 62  x.xml.new...mv b
1920: 75 69 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78 5f  uild/cackey_osx_
1930: 62 75 69 6c 64 2f 24 7b 4f 53 58 7d 5f 70 6d 62  build/${OSX}_pmb
1940: 75 69 6c 64 2e 70 6d 64 6f 63 2f 69 6e 64 65 78  uild.pmdoc/index
1950: 2e 78 6d 6c 2e 6e 65 77 20 62 75 69 6c 64 2f 63  .xml.new build/c
1960: 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64 2f  ackey_osx_build/
1970: 24 7b 4f 53 58 7d 5f 70 6d 62 75 69 6c 64 2e 70  ${OSX}_pmbuild.p
1980: 6d 64 6f 63 2f 69 6e 64 65 78 2e 78 6d 6c 0a 09  mdoc/index.xml..
1990: 65 6c 73 65 0a 09 09 45 58 54 3d 70 6b 67 0a 09  else...EXT=pkg..
19a0: 66 69 0a 09 69 66 20 5b 20 24 7b 4f 53 58 7d 20  fi..if [ ${OSX} 
19b0: 3d 3d 20 22 53 6e 6f 77 6c 65 6f 70 61 72 64 22  == "Snowleopard"
19c0: 20 5d 3b 20 74 68 65 6e 0a 09 09 63 61 74 20 62   ]; then...cat b
19d0: 75 69 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78 5f  uild/cackey_osx_
19e0: 62 75 69 6c 64 2f 24 7b 4f 53 58 7d 5f 70 6d 62  build/${OSX}_pmb
19f0: 75 69 6c 64 2e 70 6d 64 6f 63 2f 69 6e 64 65 78  uild.pmdoc/index
1a00: 2e 78 6d 6c 20 7c 20 73 65 64 20 27 73 7c 66 6f  .xml | sed 's|fo
1a10: 72 20 4d 61 63 20 4f 53 20 58 20 53 6e 6f 77 6c  r Mac OS X Snowl
1a20: 65 6f 70 61 72 64 7c 66 6f 72 20 4d 61 63 20 4f  eopard|for Mac O
1a30: 53 20 58 20 53 6e 6f 77 4c 65 6f 70 61 72 64 7c  S X SnowLeopard|
1a40: 67 27 20 3e 20 62 75 69 6c 64 2f 63 61 63 6b 65  g' > build/cacke
1a50: 79 5f 6f 73 78 5f 62 75 69 6c 64 2f 24 7b 4f 53  y_osx_build/${OS
1a60: 58 7d 5f 70 6d 62 75 69 6c 64 2e 70 6d 64 6f 63  X}_pmbuild.pmdoc
1a70: 2f 69 6e 64 65 78 2e 78 6d 6c 2e 6e 65 77 0a 09  /index.xml.new..
1a80: 09 6d 76 20 62 75 69 6c 64 2f 63 61 63 6b 65 79  .mv build/cackey
1a90: 5f 6f 73 78 5f 62 75 69 6c 64 2f 24 7b 4f 53 58  _osx_build/${OSX
1aa0: 7d 5f 70 6d 62 75 69 6c 64 2e 70 6d 64 6f 63 2f  }_pmbuild.pmdoc/
1ab0: 69 6e 64 65 78 2e 78 6d 6c 2e 6e 65 77 20 62 75  index.xml.new bu
1ac0: 69 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62  ild/cackey_osx_b
1ad0: 75 69 6c 64 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75  uild/${OSX}_pmbu
1ae0: 69 6c 64 2e 70 6d 64 6f 63 2f 69 6e 64 65 78 2e  ild.pmdoc/index.
1af0: 78 6d 6c 0a 09 66 69 0a 09 2f 44 65 76 65 6c 6f  xml..fi../Develo
1b00: 70 65 72 2f 41 70 70 6c 69 63 61 74 69 6f 6e 73  per/Applications
1b10: 2f 55 74 69 6c 69 74 69 65 73 2f 50 61 63 6b 61  /Utilities/Packa
1b20: 67 65 4d 61 6b 65 72 2e 61 70 70 2f 43 6f 6e 74  geMaker.app/Cont
1b30: 65 6e 74 73 2f 4d 61 63 4f 53 2f 50 61 63 6b 61  ents/MacOS/Packa
1b40: 67 65 4d 61 6b 65 72 20 2d 64 20 62 75 69 6c 64  geMaker -d build
1b50: 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c  /cackey_osx_buil
1b60: 64 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75 69 6c 64  d/${OSX}_pmbuild
1b70: 2e 70 6d 64 6f 63 20 2d 6f 20 6d 61 63 62 75 69  .pmdoc -o macbui
1b80: 6c 64 2f 70 6b 67 2f 43 41 43 4b 65 79 5f 24 7b  ld/pkg/CACKey_${
1b90: 43 41 43 4b 45 59 5f 56 45 52 53 49 4f 4e 7d 5f  CACKEY_VERSION}_
1ba0: 24 7b 4f 53 58 7d 2e 24 7b 45 58 54 7d 0a 09 74  ${OSX}.${EXT}..t
1bb0: 61 72 20 2d 2d 63 72 65 61 74 65 20 2d 2d 64 69  ar --create --di
1bc0: 72 65 63 74 6f 72 79 20 6d 61 63 62 75 69 6c 64  rectory macbuild
1bd0: 2f 70 6b 67 2f 20 2d 2d 66 69 6c 65 20 6d 61 63  /pkg/ --file mac
1be0: 62 75 69 6c 64 2f 70 6b 67 2f 43 41 43 4b 65 79  build/pkg/CACKey
1bf0: 5f 24 7b 43 41 43 4b 45 59 5f 56 45 52 53 49 4f  _${CACKEY_VERSIO
1c00: 4e 7d 5f 24 7b 4f 53 58 7d 2e 24 7b 45 58 54 7d  N}_${OSX}.${EXT}
1c10: 2e 74 61 72 20 43 41 43 4b 65 79 5f 24 7b 43 41  .tar CACKey_${CA
1c20: 43 4b 45 59 5f 56 45 52 53 49 4f 4e 7d 5f 24 7b  CKEY_VERSION}_${
1c30: 4f 53 58 7d 2e 24 7b 45 58 54 7d 0a 09 67 7a 69  OSX}.${EXT}..gzi
1c40: 70 20 2d 39 20 6d 61 63 62 75 69 6c 64 2f 70 6b  p -9 macbuild/pk
1c50: 67 2f 43 41 43 4b 65 79 5f 24 7b 43 41 43 4b 45  g/CACKey_${CACKE
1c60: 59 5f 56 45 52 53 49 4f 4e 7d 5f 24 7b 4f 53 58  Y_VERSION}_${OSX
1c70: 7d 2e 24 7b 45 58 54 7d 2e 74 61 72 0a 09 72 6d  }.${EXT}.tar..rm
1c80: 20 2d 72 66 20 6d 61 63 62 75 69 6c 64 2f 70 6b   -rf macbuild/pk
1c90: 67 2f 43 41 43 4b 65 79 5f 24 7b 43 41 43 4b 45  g/CACKey_${CACKE
1ca0: 59 5f 56 45 52 53 49 4f 4e 7d 5f 24 7b 4f 53 58  Y_VERSION}_${OSX
1cb0: 7d 2e 24 7b 45 58 54 7d 0a 09 72 6d 20 2d 66 20  }.${EXT}..rm -f 
1cc0: 62 75 69 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78  build/cackey_osx
1cd0: 5f 62 75 69 6c 64 2f 63 61 63 6b 65 79 2e 64 79  _build/cackey.dy
1ce0: 6c 69 62 0a 09 65 63 68 6f 20 22 24 7b 4f 53 58  lib..echo "${OSX
1cf0: 7d 20 62 75 69 6c 64 20 63 6f 6d 70 6c 65 74 65  } build complete
1d00: 22 0a 7d 0a 0a 23 20 54 61 6b 65 20 63 6f 6d 6d  ".}..# Take comm
1d10: 61 6e 64 20 6c 69 6e 65 20 61 72 67 75 6d 65 6e  and line argumen
1d20: 74 73 20 61 6e 64 20 65 78 65 63 75 74 65 0a 63  ts and execute.c
1d30: 61 73 65 20 22 24 31 22 20 69 6e 0a 09 22 22 29  ase "$1" in.."")
1d40: 0a 09 09 75 73 61 67 65 0a 09 09 65 78 69 74 20  ...usage...exit 
1d50: 24 3f 0a 09 3b 3b 0a 0a 09 22 70 61 6e 74 68 65  $?..;;..."panthe
1d60: 72 22 29 0a 09 09 2e 2f 61 75 74 6f 67 65 6e 2e  r")..../autogen.
1d70: 73 68 0a 09 09 70 61 6e 74 68 65 72 0a 09 09 65  sh...panther...e
1d80: 78 69 74 20 24 3f 0a 09 3b 3b 0a 0a 09 22 74 69  xit $?..;;..."ti
1d90: 67 65 72 22 29 0a 09 09 2e 2f 61 75 74 6f 67 65  ger")..../autoge
1da0: 6e 2e 73 68 0a 09 09 74 69 67 65 72 0a 09 09 65  n.sh...tiger...e
1db0: 78 69 74 20 24 3f 0a 09 3b 3b 0a 0a 09 22 6c 65  xit $?..;;..."le
1dc0: 6f 70 61 72 64 22 29 0a 09 09 2e 2f 61 75 74 6f  opard")..../auto
1dd0: 67 65 6e 2e 73 68 0a 09 09 6c 65 6f 70 61 72 64  gen.sh...leopard
1de0: 0a 09 09 65 78 69 74 20 24 3f 0a 09 3b 3b 0a 0a  ...exit $?..;;..
1df0: 09 22 73 6e 6f 77 6c 65 6f 70 61 72 64 22 29 0a  ."snowleopard").
1e00: 09 09 2e 2f 61 75 74 6f 67 65 6e 2e 73 68 0a 09  .../autogen.sh..
1e10: 09 73 6e 6f 77 6c 65 6f 70 61 72 64 0a 09 09 65  .snowleopard...e
1e20: 78 69 74 20 24 3f 0a 09 3b 3b 0a 0a 09 22 61 6c  xit $?..;;..."al
1e30: 6c 22 29 0a 09 09 2e 2f 61 75 74 6f 67 65 6e 2e  l")..../autogen.
1e40: 73 68 0a 09 09 70 61 6e 74 68 65 72 0a 09 09 74  sh...panther...t
1e50: 69 67 65 72 0a 09 09 6c 65 6f 70 61 72 64 0a 09  iger...leopard..
1e60: 09 73 6e 6f 77 6c 65 6f 70 61 72 64 0a 09 09 65  .snowleopard...e
1e70: 63 68 6f 20 22 22 0a 09 09 65 63 68 6f 20 22 41  cho ""...echo "A
1e80: 6c 6c 20 62 75 69 6c 64 73 20 63 6f 6d 70 6c 65  ll builds comple
1e90: 74 65 2e 22 0a 09 09 65 78 69 74 20 24 3f 0a 09  te."...exit $?..
1ea0: 3b 3b 0a 0a 09 22 63 6c 65 61 6e 22 29 0a 09 09  ;;..."clean")...
1eb0: 63 6c 65 61 6e 0a 09 09 65 78 69 74 20 24 3f 0a  clean...exit $?.
1ec0: 09 3b 3b 0a 0a 09 2a 29 0a 09 09 75 73 61 67 65  .;;...*)...usage
1ed0: 0a 09 09 65 78 69 74 20 24 3f 0a 09 3b 3b 0a 65  ...exit $?..;;.e
1ee0: 73 61 63 20 0a                                   sac .