Hex Artifact Content

Artifact 119116f02be449029eb5ec0b620af4c22d7765b9:


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 44 43 31 53 41 4e 5f 53 55  tyne.# DC1SAN_SU
0060: 50 50 4f 52 54 40 68 71 2e 64 68 73 2e 67 6f 76  PPORT@hq.dhs.gov
0070: 0a 43 41 43 4b 45 59 5f 56 45 52 53 49 4f 4e 3d  .CACKEY_VERSION=
0080: 60 63 61 74 20 63 6f 6e 66 69 67 75 72 65 2e 61  `cat configure.a
0090: 63 20 7c 20 67 72 65 70 20 41 43 5f 49 4e 49 54  c | grep AC_INIT
00a0: 20 7c 20 63 75 74 20 2d 64 20 22 20 22 20 2d 66   | cut -d " " -f
00b0: 20 32 20 7c 20 73 65 64 20 27 73 5f 29 5f 5f 27   2 | sed 's_)__'
00c0: 60 0a 0a 23 20 43 68 65 63 6b 20 74 6f 20 73 65  `..# Check to se
00d0: 65 20 69 66 20 77 65 27 72 65 20 62 75 69 6c 64  e if we're build
00e0: 69 6e 67 20 6f 6e 20 4d 61 63 20 4f 53 20 58 20  ing on Mac OS X 
00f0: 31 30 2e 37 20 22 4c 69 6f 6e 22 0a 69 66 20 5b  10.7 "Lion".if [
0100: 20 22 60 75 6e 61 6d 65 20 2d 72 20 7c 20 63 75   "`uname -r | cu
0110: 74 20 2d 64 20 2e 20 2d 66 20 31 60 22 20 3d 20  t -d . -f 1`" = 
0120: 22 31 31 22 20 5d 3b 20 74 68 65 6e 0a 09 4c 49  "11" ]; then..LI
0130: 4f 4e 42 55 49 4c 44 3d 31 0a 66 69 0a 0a 23 20  ONBUILD=1.fi..# 
0140: 55 73 61 67 65 20 66 75 6e 63 74 69 6f 6e 0a 75  Usage function.u
0150: 73 61 67 65 28 29 20 7b 0a 09 65 63 68 6f 20 22  sage() {..echo "
0160: 55 73 61 67 65 3a 20 62 75 69 6c 64 5f 6f 73 78  Usage: build_osx
0170: 2e 73 68 20 3c 74 61 72 67 65 74 3e 22 0a 09 65  .sh <target>"..e
0180: 63 68 6f 20 57 68 65 72 65 20 74 61 72 67 65 74  cho Where target
0190: 20 69 73 20 6f 6e 65 20 6f 66 3a 0a 09 65 63 68   is one of:..ech
01a0: 6f 20 22 20 20 20 20 6c 65 6f 70 61 72 64 20 20  o "    leopard  
01b0: 2d 20 28 42 75 69 6c 64 73 20 55 6e 69 76 65 72  - (Builds Univer
01c0: 73 61 6c 20 31 30 2e 35 20 4c 69 62 72 61 72 79  sal 10.5 Library
01d0: 20 66 6f 72 20 50 50 43 47 34 2f 69 33 38 36 29   for PPCG4/i386)
01e0: 22 0a 09 65 63 68 6f 20 22 20 20 20 20 73 6e 6f  "..echo "    sno
01f0: 77 6c 65 6f 70 61 72 64 20 20 2d 20 28 42 75 69  wleopard  - (Bui
0200: 6c 64 73 20 55 6e 69 76 65 72 73 61 6c 20 31 30  lds Universal 10
0210: 2e 36 20 4c 69 62 72 61 72 79 20 66 6f 72 20 69  .6 Library for i
0220: 33 38 36 2f 78 38 36 5f 36 34 29 22 0a 09 65 63  386/x86_64)"..ec
0230: 68 6f 20 22 20 20 20 20 6c 69 6f 6e 20 20 2d 20  ho "    lion  - 
0240: 28 42 75 69 6c 64 73 20 55 6e 69 76 65 72 73 61  (Builds Universa
0250: 6c 20 31 30 2e 37 20 4c 69 62 72 61 72 79 20 66  l 10.7 Library f
0260: 6f 72 20 69 33 38 36 2f 78 38 36 5f 36 34 29 22  or i386/x86_64)"
0270: 0a 09 65 63 68 6f 20 22 20 20 20 20 73 6c 74 6f  ..echo "    slto
0280: 79 6f 73 20 2d 20 28 42 75 69 6c 64 73 20 55 6e  yos - (Builds Un
0290: 69 76 65 72 73 61 6c 20 31 30 2e 36 2f 31 30 2e  iversal 10.6/10.
02a0: 37 2f 31 30 2e 38 2f 31 30 2e 39 2f 31 30 2e 31  7/10.8/10.9/10.1
02b0: 30 20 4c 69 62 72 61 72 79 20 66 6f 72 20 69 33  0 Library for i3
02c0: 38 36 2f 78 38 36 5f 36 34 29 22 0a 09 65 63 68  86/x86_64)"..ech
02d0: 6f 20 22 20 20 20 20 61 6c 6c 20 2d 20 28 42 75  o "    all - (Bu
02e0: 69 6c 64 73 20 66 6f 72 20 61 6c 6c 20 73 75 70  ilds for all sup
02f0: 70 6f 72 74 65 64 20 74 61 72 67 65 74 73 29 22  ported targets)"
0300: 0a 09 65 63 68 6f 20 22 20 20 20 20 63 6c 65 61  ..echo "    clea
0310: 6e 20 2d 20 28 43 6c 65 61 6e 73 20 75 70 29 22  n - (Cleans up)"
0320: 0a 09 65 63 68 6f 20 22 52 75 6e 20 66 72 6f 6d  ..echo "Run from
0330: 20 43 41 43 4b 65 79 20 42 75 69 6c 64 20 52 6f   CACKey Build Ro
0340: 6f 74 2e 22 0a 09 65 78 69 74 20 24 3f 0a 7d 0a  ot."..exit $?.}.
0350: 0a 23 20 43 6c 65 61 6e 20 75 70 20 66 75 6e 63  .# Clean up func
0360: 74 69 6f 6e 0a 63 6c 65 61 6e 28 29 20 7b 0a 09  tion.clean() {..
0370: 72 6d 20 2d 66 20 62 75 69 6c 64 2f 63 61 63 6b  rm -f build/cack
0380: 65 79 5f 6f 73 78 5f 62 75 69 6c 64 2f 63 61 63  ey_osx_build/cac
0390: 6b 65 79 2e 64 79 6c 69 62 0a 09 72 6d 20 2d 72  key.dylib..rm -r
03a0: 66 20 62 75 69 6c 64 2f 63 61 63 6b 65 79 5f 6f  f build/cackey_o
03b0: 73 78 5f 62 75 69 6c 64 2f 50 4b 43 53 31 31 2e  sx_build/PKCS11.
03c0: 74 6f 6b 65 6e 64 0a 09 72 6d 20 2d 72 66 20 50  tokend..rm -rf P
03d0: 4b 43 53 31 31 2e 74 6f 6b 65 6e 64 0a 09 72 6d  KCS11.tokend..rm
03e0: 20 2d 72 66 20 6d 61 63 62 75 69 6c 64 0a 09 72   -rf macbuild..r
03f0: 6d 20 2d 72 66 20 62 75 69 6c 64 2f 63 61 63 6b  m -rf build/cack
0400: 65 79 5f 6f 73 78 5f 62 75 69 6c 64 2f 2a 2e 70  ey_osx_build/*.p
0410: 6d 64 6f 63 0a 09 6d 61 6b 65 20 64 69 73 74 63  mdoc..make distc
0420: 6c 65 61 6e 0a 7d 0a 0a 23 20 44 69 72 65 63 74  lean.}..# Direct
0430: 6f 72 79 20 63 72 65 61 74 69 6f 6e 20 66 75 6e  ory creation fun
0440: 63 74 69 6f 6e 0a 6d 61 6b 65 64 69 72 28 29 20  ction.makedir() 
0450: 7b 0a 09 69 66 20 5b 20 22 60 75 6e 61 6d 65 20  {..if [ "`uname 
0460: 2d 72 20 7c 20 63 75 74 20 2d 64 20 2e 20 2d 66  -r | cut -d . -f
0470: 20 31 60 22 20 2d 6c 74 20 22 31 30 22 20 5d 3b   1`" -lt "10" ];
0480: 20 74 68 65 6e 0a 09 09 4c 49 42 54 4f 4f 4c 44   then...LIBTOOLD
0490: 49 52 3d 2f 44 65 76 65 6c 6f 70 65 72 2f 75 73  IR=/Developer/us
04a0: 72 2f 73 68 61 72 65 2f 6c 69 62 74 6f 6f 6c 0a  r/share/libtool.
04b0: 09 65 6c 73 65 0a 09 09 4c 49 42 54 4f 4f 4c 44  .else...LIBTOOLD
04c0: 49 52 3d 2f 44 65 76 65 6c 6f 70 65 72 2f 75 73  IR=/Developer/us
04d0: 72 2f 73 68 61 72 65 2f 6c 69 62 74 6f 6f 6c 2f  r/share/libtool/
04e0: 63 6f 6e 66 69 67 0a 09 66 69 0a 09 69 66 20 5b  config..fi..if [
04f0: 20 21 20 2d 64 20 6d 61 63 62 75 69 6c 64 20 5d   ! -d macbuild ]
0500: 3b 20 74 68 65 6e 0a 09 09 6d 6b 64 69 72 20 6d  ; then...mkdir m
0510: 61 63 62 75 69 6c 64 0a 09 09 6d 6b 64 69 72 20  acbuild...mkdir 
0520: 6d 61 63 62 75 69 6c 64 2f 4c 65 6f 70 61 72 64  macbuild/Leopard
0530: 0a 09 09 6d 6b 64 69 72 20 6d 61 63 62 75 69 6c  ...mkdir macbuil
0540: 64 2f 53 6e 6f 77 6c 65 6f 70 61 72 64 0a 09 09  d/Snowleopard...
0550: 6d 6b 64 69 72 20 6d 61 63 62 75 69 6c 64 2f 4c  mkdir macbuild/L
0560: 69 6f 6e 0a 09 09 6d 6b 64 69 72 20 6d 61 63 62  ion...mkdir macb
0570: 75 69 6c 64 2f 53 6c 74 6f 79 6f 73 0a 09 09 6d  uild/Sltoyos...m
0580: 6b 64 69 72 20 6d 61 63 62 75 69 6c 64 2f 70 6b  kdir macbuild/pk
0590: 67 0a 09 66 69 0a 09 69 66 20 5b 20 21 20 2d 66  g..fi..if [ ! -f
05a0: 20 63 6f 6e 66 69 67 2e 67 75 65 73 73 20 5d 3b   config.guess ];
05b0: 20 74 68 65 6e 0a 09 09 63 70 20 24 7b 4c 49 42   then...cp ${LIB
05c0: 54 4f 4f 4c 44 49 52 7d 2f 63 6f 6e 66 69 67 2e  TOOLDIR}/config.
05d0: 67 75 65 73 73 20 2e 0a 09 66 69 0a 09 69 66 20  guess ...fi..if 
05e0: 5b 20 21 20 2d 66 20 63 6f 6e 66 69 67 2e 73 75  [ ! -f config.su
05f0: 62 20 5d 3b 20 74 68 65 6e 0a 09 09 63 70 20 24  b ]; then...cp $
0600: 7b 4c 49 42 54 4f 4f 4c 44 49 52 7d 2f 63 6f 6e  {LIBTOOLDIR}/con
0610: 66 69 67 2e 73 75 62 20 2e 0a 09 66 69 0a 09 69  fig.sub ...fi..i
0620: 66 20 5b 20 21 20 2d 66 20 69 6e 73 74 61 6c 6c  f [ ! -f install
0630: 2d 73 68 20 5d 3b 20 74 68 65 6e 0a 09 09 63 70  -sh ]; then...cp
0640: 20 24 7b 4c 49 42 54 4f 4f 4c 44 49 52 7d 2f 69   ${LIBTOOLDIR}/i
0650: 6e 73 74 61 6c 6c 2d 73 68 20 2e 0a 09 66 69 0a  nstall-sh ...fi.
0660: 7d 0a 0a 23 20 42 75 69 6c 64 20 66 75 6e 63 74  }..# Build funct
0670: 69 6f 6e 20 66 6f 72 20 4c 65 6f 70 61 72 64 0a  ion for Leopard.
0680: 6c 65 6f 70 61 72 64 28 29 20 7b 0a 09 6d 61 6b  leopard() {..mak
0690: 65 64 69 72 0a 09 48 45 41 44 45 52 53 3d 2f 44  edir..HEADERS=/D
06a0: 65 76 65 6c 6f 70 65 72 2f 53 44 4b 73 2f 4d 61  eveloper/SDKs/Ma
06b0: 63 4f 53 58 31 30 2e 35 2e 73 64 6b 2f 53 79 73  cOSX10.5.sdk/Sys
06c0: 74 65 6d 2f 4c 69 62 72 61 72 79 2f 46 72 61 6d  tem/Library/Fram
06d0: 65 77 6f 72 6b 73 2f 50 43 53 43 2e 66 72 61 6d  eworks/PCSC.fram
06e0: 65 77 6f 72 6b 2f 56 65 72 73 69 6f 6e 73 2f 41  ework/Versions/A
06f0: 2f 48 65 61 64 65 72 73 2f 0a 09 4c 49 42 52 41  /Headers/..LIBRA
0700: 52 59 3d 2f 44 65 76 65 6c 6f 70 65 72 2f 53 44  RY=/Developer/SD
0710: 4b 73 2f 4d 61 63 4f 53 58 31 30 2e 35 2e 73 64  Ks/MacOSX10.5.sd
0720: 6b 2f 53 79 73 74 65 6d 2f 4c 69 62 72 61 72 79  k/System/Library
0730: 2f 46 72 61 6d 65 77 6f 72 6b 73 2f 50 43 53 43  /Frameworks/PCSC
0740: 2e 66 72 61 6d 65 77 6f 72 6b 2f 50 43 53 43 0a  .framework/PCSC.
0750: 09 4c 49 42 3d 22 22 0a 09 41 52 43 48 4c 49 53  .LIB=""..ARCHLIS
0760: 54 3d 22 22 0a 09 44 4c 49 42 3d 22 22 0a 09 44  T=""..DLIB=""..D
0770: 41 52 43 48 4c 49 53 54 3d 22 22 0a 09 4f 53 58  ARCHLIST=""..OSX
0780: 3d 4c 65 6f 70 61 72 64 0a 09 50 4b 54 41 52 47  =Leopard..PKTARG
0790: 45 54 4f 53 3d 33 0a 09 43 55 52 4f 53 58 56 45  ETOS=3..CUROSXVE
07a0: 52 3d 31 30 2e 35 0a 09 66 6f 72 20 48 4f 53 54  R=10.5..for HOST
07b0: 20 69 6e 20 70 6f 77 65 72 70 63 2d 61 70 70 6c   in powerpc-appl
07c0: 65 2d 64 61 72 77 69 6e 39 20 69 33 38 36 2d 61  e-darwin9 i386-a
07d0: 70 70 6c 65 2d 64 61 72 77 69 6e 39 3b 20 64 6f  pple-darwin9; do
07e0: 0a 09 09 67 65 6e 62 75 69 6c 64 0a 09 64 6f 6e  ...genbuild..don
07f0: 65 0a 09 6c 69 62 62 75 69 6c 64 0a 09 70 6b 67  e..libbuild..pkg
0800: 62 75 69 6c 64 0a 7d 0a 0a 23 20 42 75 69 6c 64  build.}..# Build
0810: 20 66 75 6e 63 74 69 6f 6e 20 66 6f 72 20 53 6e   function for Sn
0820: 6f 77 20 4c 65 6f 70 61 72 64 0a 73 6e 6f 77 6c  ow Leopard.snowl
0830: 65 6f 70 61 72 64 28 29 20 7b 0a 09 6d 61 6b 65  eopard() {..make
0840: 64 69 72 0a 09 48 45 41 44 45 52 53 3d 2f 44 65  dir..HEADERS=/De
0850: 76 65 6c 6f 70 65 72 2f 53 44 4b 73 2f 4d 61 63  veloper/SDKs/Mac
0860: 4f 53 58 31 30 2e 36 2e 73 64 6b 2f 53 79 73 74  OSX10.6.sdk/Syst
0870: 65 6d 2f 4c 69 62 72 61 72 79 2f 46 72 61 6d 65  em/Library/Frame
0880: 77 6f 72 6b 73 2f 50 43 53 43 2e 66 72 61 6d 65  works/PCSC.frame
0890: 77 6f 72 6b 2f 56 65 72 73 69 6f 6e 73 2f 41 2f  work/Versions/A/
08a0: 48 65 61 64 65 72 73 2f 0a 09 4c 49 42 52 41 52  Headers/..LIBRAR
08b0: 59 3d 2f 44 65 76 65 6c 6f 70 65 72 2f 53 44 4b  Y=/Developer/SDK
08c0: 73 2f 4d 61 63 4f 53 58 31 30 2e 36 2e 73 64 6b  s/MacOSX10.6.sdk
08d0: 2f 53 79 73 74 65 6d 2f 4c 69 62 72 61 72 79 2f  /System/Library/
08e0: 46 72 61 6d 65 77 6f 72 6b 73 2f 50 43 53 43 2e  Frameworks/PCSC.
08f0: 66 72 61 6d 65 77 6f 72 6b 2f 50 43 53 43 0a 09  framework/PCSC..
0900: 4c 49 42 3d 22 22 0a 09 41 52 43 48 4c 49 53 54  LIB=""..ARCHLIST
0910: 3d 22 22 0a 09 44 4c 49 42 3d 22 22 0a 09 44 41  =""..DLIB=""..DA
0920: 52 43 48 4c 49 53 54 3d 22 22 0a 09 4f 53 58 3d  RCHLIST=""..OSX=
0930: 53 6e 6f 77 6c 65 6f 70 61 72 64 0a 09 50 4b 54  Snowleopard..PKT
0940: 41 52 47 45 54 4f 53 3d 33 0a 09 43 55 52 4f 53  ARGETOS=3..CUROS
0950: 58 56 45 52 3d 31 30 2e 36 0a 09 66 6f 72 20 48  XVER=10.6..for H
0960: 4f 53 54 20 69 6e 20 69 33 38 36 2d 61 70 70 6c  OST in i386-appl
0970: 65 2d 64 61 72 77 69 6e 31 30 20 78 38 36 5f 36  e-darwin10 x86_6
0980: 34 2d 61 70 70 6c 65 2d 64 61 72 77 69 6e 31 30  4-apple-darwin10
0990: 3b 20 64 6f 0a 09 09 67 65 6e 62 75 69 6c 64 0a  ; do...genbuild.
09a0: 09 64 6f 6e 65 0a 09 6c 69 62 62 75 69 6c 64 0a  .done..libbuild.
09b0: 09 70 6b 67 62 75 69 6c 64 0a 7d 0a 0a 23 20 42  .pkgbuild.}..# B
09c0: 75 69 6c 64 20 66 75 6e 63 74 69 6f 6e 20 66 6f  uild function fo
09d0: 72 20 4c 69 6f 6e 0a 6c 69 6f 6e 28 29 20 7b 0a  r Lion.lion() {.
09e0: 09 6d 61 6b 65 64 69 72 0a 09 48 45 41 44 45 52  .makedir..HEADER
09f0: 53 3d 2f 44 65 76 65 6c 6f 70 65 72 2f 53 44 4b  S=/Developer/SDK
0a00: 73 2f 4d 61 63 4f 53 58 31 30 2e 37 2e 73 64 6b  s/MacOSX10.7.sdk
0a10: 2f 53 79 73 74 65 6d 2f 4c 69 62 72 61 72 79 2f  /System/Library/
0a20: 46 72 61 6d 65 77 6f 72 6b 73 2f 50 43 53 43 2e  Frameworks/PCSC.
0a30: 66 72 61 6d 65 77 6f 72 6b 2f 56 65 72 73 69 6f  framework/Versio
0a40: 6e 73 2f 41 2f 48 65 61 64 65 72 73 2f 0a 09 4c  ns/A/Headers/..L
0a50: 49 42 52 41 52 59 3d 2f 44 65 76 65 6c 6f 70 65  IBRARY=/Develope
0a60: 72 2f 53 44 4b 73 2f 4d 61 63 4f 53 58 31 30 2e  r/SDKs/MacOSX10.
0a70: 37 2e 73 64 6b 2f 53 79 73 74 65 6d 2f 4c 69 62  7.sdk/System/Lib
0a80: 72 61 72 79 2f 46 72 61 6d 65 77 6f 72 6b 73 2f  rary/Frameworks/
0a90: 50 43 53 43 2e 66 72 61 6d 65 77 6f 72 6b 2f 50  PCSC.framework/P
0aa0: 43 53 43 0a 09 4c 49 42 3d 22 22 0a 09 41 52 43  CSC..LIB=""..ARC
0ab0: 48 4c 49 53 54 3d 22 22 0a 09 44 4c 49 42 3d 22  HLIST=""..DLIB="
0ac0: 22 0a 09 44 41 52 43 48 4c 49 53 54 3d 22 22 0a  "..DARCHLIST="".
0ad0: 09 4f 53 58 3d 4c 69 6f 6e 0a 09 50 4b 54 41 52  .OSX=Lion..PKTAR
0ae0: 47 45 54 4f 53 3d 33 0a 09 43 55 52 4f 53 58 56  GETOS=3..CUROSXV
0af0: 45 52 3d 31 30 2e 37 0a 09 66 6f 72 20 48 4f 53  ER=10.7..for HOS
0b00: 54 20 69 6e 20 69 33 38 36 2d 61 70 70 6c 65 2d  T in i386-apple-
0b10: 64 61 72 77 69 6e 31 31 20 78 38 36 5f 36 34 2d  darwin11 x86_64-
0b20: 61 70 70 6c 65 2d 64 61 72 77 69 6e 31 31 3b 20  apple-darwin11; 
0b30: 64 6f 0a 09 09 67 65 6e 62 75 69 6c 64 0a 09 64  do...genbuild..d
0b40: 6f 6e 65 0a 09 6c 69 62 62 75 69 6c 64 0a 09 70  one..libbuild..p
0b50: 6b 67 62 75 69 6c 64 0a 7d 0a 0a 23 20 42 75 69  kgbuild.}..# Bui
0b60: 6c 64 20 66 75 6e 63 74 69 6f 6e 20 66 6f 72 20  ld function for 
0b70: 53 6e 6f 77 20 4c 65 6f 70 61 72 64 2f 4c 69 6f  Snow Leopard/Lio
0b80: 6e 2f 4d 6f 75 6e 74 61 69 6e 20 4c 69 6f 6e 0a  n/Mountain Lion.
0b90: 73 6c 74 6f 79 6f 73 28 29 20 7b 0a 09 6d 61 6b  sltoyos() {..mak
0ba0: 65 64 69 72 0a 09 48 45 41 44 45 52 53 3d 2f 44  edir..HEADERS=/D
0bb0: 65 76 65 6c 6f 70 65 72 2f 53 44 4b 73 2f 4d 61  eveloper/SDKs/Ma
0bc0: 63 4f 53 58 31 30 2e 36 2e 73 64 6b 2f 53 79 73  cOSX10.6.sdk/Sys
0bd0: 74 65 6d 2f 4c 69 62 72 61 72 79 2f 46 72 61 6d  tem/Library/Fram
0be0: 65 77 6f 72 6b 73 2f 50 43 53 43 2e 66 72 61 6d  eworks/PCSC.fram
0bf0: 65 77 6f 72 6b 2f 56 65 72 73 69 6f 6e 73 2f 41  ework/Versions/A
0c00: 2f 48 65 61 64 65 72 73 2f 0a 09 4c 49 42 52 41  /Headers/..LIBRA
0c10: 52 59 3d 2f 44 65 76 65 6c 6f 70 65 72 2f 53 44  RY=/Developer/SD
0c20: 4b 73 2f 4d 61 63 4f 53 58 31 30 2e 36 2e 73 64  Ks/MacOSX10.6.sd
0c30: 6b 2f 53 79 73 74 65 6d 2f 4c 69 62 72 61 72 79  k/System/Library
0c40: 2f 46 72 61 6d 65 77 6f 72 6b 73 2f 50 43 53 43  /Frameworks/PCSC
0c50: 2e 66 72 61 6d 65 77 6f 72 6b 2f 50 43 53 43 0a  .framework/PCSC.
0c60: 09 4c 49 42 3d 22 22 0a 09 41 52 43 48 4c 49 53  .LIB=""..ARCHLIS
0c70: 54 3d 22 22 0a 09 44 4c 49 42 3d 22 22 0a 09 44  T=""..DLIB=""..D
0c80: 41 52 43 48 4c 49 53 54 3d 22 22 0a 09 4f 53 58  ARCHLIST=""..OSX
0c90: 3d 53 6c 74 6f 79 6f 73 0a 09 50 4b 54 41 52 47  =Sltoyos..PKTARG
0ca0: 45 54 4f 53 3d 33 0a 09 43 55 52 4f 53 58 56 45  ETOS=3..CUROSXVE
0cb0: 52 3d 31 30 2e 36 0a 09 66 6f 72 20 48 4f 53 54  R=10.6..for HOST
0cc0: 20 69 6e 20 69 33 38 36 2d 61 70 70 6c 65 2d 64   in i386-apple-d
0cd0: 61 72 77 69 6e 31 30 20 78 38 36 5f 36 34 2d 61  arwin10 x86_64-a
0ce0: 70 70 6c 65 2d 64 61 72 77 69 6e 31 30 3b 20 64  pple-darwin10; d
0cf0: 6f 0a 09 09 67 65 6e 62 75 69 6c 64 0a 09 64 6f  o...genbuild..do
0d00: 6e 65 0a 09 6c 69 62 62 75 69 6c 64 0a 09 70 6b  ne..libbuild..pk
0d10: 67 62 75 69 6c 64 0a 7d 0a 0a 23 20 42 75 69 6c  gbuild.}..# Buil
0d20: 64 20 66 75 6e 63 74 69 6f 6e 20 66 6f 72 20 53  d function for S
0d30: 6e 6f 77 20 4c 65 6f 70 61 72 64 2f 4c 69 6f 6e  now Leopard/Lion
0d40: 2f 4d 6f 75 6e 74 61 69 6e 20 4c 69 6f 6e 0a 73  /Mountain Lion.s
0d50: 6c 74 6f 79 6f 73 28 29 20 7b 0a 09 6d 61 6b 65  ltoyos() {..make
0d60: 64 69 72 0a 09 48 45 41 44 45 52 53 3d 2f 44 65  dir..HEADERS=/De
0d70: 76 65 6c 6f 70 65 72 2f 53 44 4b 73 2f 4d 61 63  veloper/SDKs/Mac
0d80: 4f 53 58 31 30 2e 36 2e 73 64 6b 2f 53 79 73 74  OSX10.6.sdk/Syst
0d90: 65 6d 2f 4c 69 62 72 61 72 79 2f 46 72 61 6d 65  em/Library/Frame
0da0: 77 6f 72 6b 73 2f 50 43 53 43 2e 66 72 61 6d 65  works/PCSC.frame
0db0: 77 6f 72 6b 2f 56 65 72 73 69 6f 6e 73 2f 41 2f  work/Versions/A/
0dc0: 48 65 61 64 65 72 73 2f 0a 09 4c 49 42 52 41 52  Headers/..LIBRAR
0dd0: 59 3d 2f 44 65 76 65 6c 6f 70 65 72 2f 53 44 4b  Y=/Developer/SDK
0de0: 73 2f 4d 61 63 4f 53 58 31 30 2e 36 2e 73 64 6b  s/MacOSX10.6.sdk
0df0: 2f 53 79 73 74 65 6d 2f 4c 69 62 72 61 72 79 2f  /System/Library/
0e00: 46 72 61 6d 65 77 6f 72 6b 73 2f 50 43 53 43 2e  Frameworks/PCSC.
0e10: 66 72 61 6d 65 77 6f 72 6b 2f 50 43 53 43 0a 09  framework/PCSC..
0e20: 4c 49 42 3d 22 22 0a 09 41 52 43 48 4c 49 53 54  LIB=""..ARCHLIST
0e30: 3d 22 22 0a 09 44 4c 49 42 3d 22 22 0a 09 44 41  =""..DLIB=""..DA
0e40: 52 43 48 4c 49 53 54 3d 22 22 0a 09 4f 53 58 3d  RCHLIST=""..OSX=
0e50: 53 6c 74 6f 79 6f 73 0a 09 50 4b 54 41 52 47 45  Sltoyos..PKTARGE
0e60: 54 4f 53 3d 33 0a 09 43 55 52 4f 53 58 56 45 52  TOS=3..CUROSXVER
0e70: 3d 31 30 2e 36 0a 09 66 6f 72 20 48 4f 53 54 20  =10.6..for HOST 
0e80: 69 6e 20 69 33 38 36 2d 61 70 70 6c 65 2d 64 61  in i386-apple-da
0e90: 72 77 69 6e 31 30 20 78 38 36 5f 36 34 2d 61 70  rwin10 x86_64-ap
0ea0: 70 6c 65 2d 64 61 72 77 69 6e 31 30 3b 20 64 6f  ple-darwin10; do
0eb0: 0a 09 09 67 65 6e 62 75 69 6c 64 0a 09 64 6f 6e  ...genbuild..don
0ec0: 65 0a 09 6c 69 62 62 75 69 6c 64 0a 09 70 6b 67  e..libbuild..pkg
0ed0: 62 75 69 6c 64 0a 7d 0a 0a 23 20 47 65 6e 65 72  build.}..# Gener
0ee0: 69 63 20 62 75 69 6c 64 20 66 75 6e 63 74 69 6f  ic build functio
0ef0: 6e 0a 67 65 6e 62 75 69 6c 64 28 29 20 7b 0a 09  n.genbuild() {..
0f00: 6d 61 6b 65 20 64 69 73 74 63 6c 65 61 6e 0a 09  make distclean..
0f10: 41 52 43 48 3d 60 65 63 68 6f 20 24 7b 48 4f 53  ARCH=`echo ${HOS
0f20: 54 7d 20 7c 20 63 75 74 20 2d 64 20 22 2d 22 20  T} | cut -d "-" 
0f30: 2d 66 20 31 60 0a 09 69 66 20 5b 20 24 7b 41 52  -f 1`..if [ ${AR
0f40: 43 48 7d 20 3d 3d 20 22 70 6f 77 65 72 70 63 22  CH} == "powerpc"
0f50: 20 5d 3b 20 74 68 65 6e 0a 09 09 69 66 20 5b 20   ]; then...if [ 
0f60: 24 7b 4f 53 58 7d 20 3d 3d 20 22 4c 65 6f 70 61  ${OSX} == "Leopa
0f70: 72 64 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 41  rd" ]; then....A
0f80: 52 43 48 3d 22 70 70 63 20 2d 6d 63 70 75 3d 47  RCH="ppc -mcpu=G
0f90: 34 22 0a 09 09 65 6c 73 65 0a 09 09 09 41 52 43  4"...else....ARC
0fa0: 48 3d 22 70 70 63 20 2d 6d 63 70 75 3d 47 33 22  H="ppc -mcpu=G3"
0fb0: 0a 09 09 66 69 0a 09 66 69 0a 09 69 66 20 5b 20  ...fi..fi..if [ 
0fc0: 22 24 7b 4c 49 4f 4e 42 55 49 4c 44 7d 22 20 3d  "${LIONBUILD}" =
0fd0: 20 31 20 5d 3b 20 74 68 65 6e 0a 09 09 69 66 20   1 ]; then...if 
0fe0: 5b 20 22 24 7b 41 52 43 48 7d 22 20 3d 3d 20 22  [ "${ARCH}" == "
0ff0: 70 70 63 20 2d 6d 63 70 75 3d 47 34 22 20 5d 3b  ppc -mcpu=G4" ];
1000: 20 74 68 65 6e 0a 09 09 09 43 43 3d 70 6f 77 65   then....CC=powe
1010: 72 70 63 2d 61 70 70 6c 65 2d 64 61 72 77 69 6e  rpc-apple-darwin
1020: 31 31 2d 67 63 63 2d 34 2e 32 2e 31 20 43 50 50  11-gcc-4.2.1 CPP
1030: 3d 70 6f 77 65 72 70 63 2d 61 70 70 6c 65 2d 64  =powerpc-apple-d
1040: 61 72 77 69 6e 31 31 2d 63 70 70 2d 34 2e 32 2e  arwin11-cpp-4.2.
1050: 31 20 43 46 4c 41 47 53 3d 22 2d 6d 33 32 20 2d  1 CFLAGS="-m32 -
1060: 49 2f 44 65 76 65 6c 6f 70 65 72 2f 50 6c 61 74  I/Developer/Plat
1070: 66 6f 72 6d 73 2f 69 50 68 6f 6e 65 4f 53 2e 70  forms/iPhoneOS.p
1080: 6c 61 74 66 6f 72 6d 2f 44 65 76 65 6c 6f 70 65  latform/Develope
1090: 72 2f 75 73 72 2f 6c 69 62 2f 67 63 63 2f 70 6f  r/usr/lib/gcc/po
10a0: 77 65 72 70 63 2d 61 70 70 6c 65 2d 64 61 72 77  werpc-apple-darw
10b0: 69 6e 31 30 2f 34 2e 32 2e 31 2f 69 6e 63 6c 75  in10/4.2.1/inclu
10c0: 64 65 20 2d 69 73 79 73 72 6f 6f 74 20 2f 44 65  de -isysroot /De
10d0: 76 65 6c 6f 70 65 72 2f 53 44 4b 73 2f 4d 61 63  veloper/SDKs/Mac
10e0: 4f 53 58 31 30 2e 35 2e 73 64 6b 22 20 43 50 50  OSX10.5.sdk" CPP
10f0: 46 4c 41 47 53 3d 22 2d 44 5f 4c 49 42 43 5f 4c  FLAGS="-D_LIBC_L
1100: 49 4d 49 54 53 5f 48 5f 22 20 2e 2f 63 6f 6e 66  IMITS_H_" ./conf
1110: 69 67 75 72 65 20 2d 2d 77 69 74 68 2d 70 63 73  igure --with-pcs
1120: 63 2d 68 65 61 64 65 72 73 3d 24 7b 48 45 41 44  c-headers=${HEAD
1130: 45 52 53 7d 20 2d 2d 77 69 74 68 2d 70 63 73 63  ERS} --with-pcsc
1140: 2d 6c 69 62 73 3d 24 7b 4c 49 42 52 41 52 59 7d  -libs=${LIBRARY}
1150: 20 2d 2d 68 6f 73 74 3d 24 7b 48 4f 53 54 7d 20   --host=${HOST} 
1160: 2d 2d 65 6e 61 62 6c 65 2d 64 6f 64 2d 63 65 72  --enable-dod-cer
1170: 74 73 2d 6f 6e 2d 68 77 2d 73 6c 6f 74 73 0a 09  ts-on-hw-slots..
1180: 09 65 6c 73 65 0a 09 09 09 43 46 4c 41 47 53 3d  .else....CFLAGS=
1190: 22 2d 61 72 63 68 20 24 7b 41 52 43 48 7d 22 20  "-arch ${ARCH}" 
11a0: 2e 2f 63 6f 6e 66 69 67 75 72 65 20 2d 2d 77 69  ./configure --wi
11b0: 74 68 2d 70 63 73 63 2d 68 65 61 64 65 72 73 3d  th-pcsc-headers=
11c0: 24 7b 48 45 41 44 45 52 53 7d 20 2d 2d 77 69 74  ${HEADERS} --wit
11d0: 68 2d 70 63 73 63 2d 6c 69 62 73 3d 24 7b 4c 49  h-pcsc-libs=${LI
11e0: 42 52 41 52 59 7d 20 2d 2d 68 6f 73 74 3d 24 7b  BRARY} --host=${
11f0: 48 4f 53 54 7d 20 2d 2d 65 6e 61 62 6c 65 2d 64  HOST} --enable-d
1200: 6f 64 2d 63 65 72 74 73 2d 6f 6e 2d 68 77 2d 73  od-certs-on-hw-s
1210: 6c 6f 74 73 0a 09 09 66 69 0a 09 65 6c 73 65 0a  lots...fi..else.
1220: 09 09 43 46 4c 41 47 53 3d 22 2d 61 72 63 68 20  ..CFLAGS="-arch 
1230: 24 7b 41 52 43 48 7d 22 20 2e 2f 63 6f 6e 66 69  ${ARCH}" ./confi
1240: 67 75 72 65 20 2d 2d 77 69 74 68 2d 70 63 73 63  gure --with-pcsc
1250: 2d 68 65 61 64 65 72 73 3d 24 7b 48 45 41 44 45  -headers=${HEADE
1260: 52 53 7d 20 2d 2d 77 69 74 68 2d 70 63 73 63 2d  RS} --with-pcsc-
1270: 6c 69 62 73 3d 24 7b 4c 49 42 52 41 52 59 7d 20  libs=${LIBRARY} 
1280: 2d 2d 68 6f 73 74 3d 24 7b 48 4f 53 54 7d 20 2d  --host=${HOST} -
1290: 2d 65 6e 61 62 6c 65 2d 64 6f 64 2d 63 65 72 74  -enable-dod-cert
12a0: 73 2d 6f 6e 2d 68 77 2d 73 6c 6f 74 73 0a 09 66  s-on-hw-slots..f
12b0: 69 0a 09 6d 61 6b 65 0a 09 63 70 20 6c 69 62 63  i..make..cp libc
12c0: 61 63 6b 65 79 2e 64 79 6c 69 62 20 6d 61 63 62  ackey.dylib macb
12d0: 75 69 6c 64 2f 24 7b 4f 53 58 7d 2f 6c 69 62 63  uild/${OSX}/libc
12e0: 61 63 6b 65 79 2e 64 79 6c 69 62 2e 60 65 63 68  ackey.dylib.`ech
12f0: 6f 20 24 7b 41 52 43 48 7d 20 7c 20 63 75 74 20  o ${ARCH} | cut 
1300: 2d 64 20 27 20 27 20 2d 66 20 31 60 0a 09 63 70  -d ' ' -f 1`..cp
1310: 20 6c 69 62 63 61 63 6b 65 79 5f 67 2e 64 79 6c   libcackey_g.dyl
1320: 69 62 20 6d 61 63 62 75 69 6c 64 2f 24 7b 4f 53  ib macbuild/${OS
1330: 58 7d 2f 6c 69 62 63 61 63 6b 65 79 5f 67 2e 64  X}/libcackey_g.d
1340: 79 6c 69 62 2e 60 65 63 68 6f 20 24 7b 41 52 43  ylib.`echo ${ARC
1350: 48 7d 20 7c 20 63 75 74 20 2d 64 20 27 20 27 20  H} | cut -d ' ' 
1360: 2d 66 20 31 60 20 0a 7d 0a 0a 23 20 4c 69 62 72  -f 1` .}..# Libr
1370: 61 72 79 20 62 75 69 6c 64 20 66 75 6e 63 74 69  ary build functi
1380: 6f 6e 0a 6c 69 62 62 75 69 6c 64 28 29 20 7b 0a  on.libbuild() {.
1390: 09 66 6f 72 20 4c 49 42 20 69 6e 20 6d 61 63 62  .for LIB in macb
13a0: 75 69 6c 64 2f 24 7b 4f 53 58 7d 2f 6c 69 62 63  uild/${OSX}/libc
13b0: 61 63 6b 65 79 2e 64 79 6c 69 62 2e 2a 3b 20 64  ackey.dylib.*; d
13c0: 6f 0a 09 09 41 52 43 48 4c 49 53 54 3d 22 24 7b  o...ARCHLIST="${
13d0: 41 52 43 48 4c 49 53 54 7d 20 60 65 63 68 6f 20  ARCHLIST} `echo 
13e0: 27 2d 61 72 63 68 20 27 60 20 60 65 63 68 6f 20  '-arch '` `echo 
13f0: 24 7b 4c 49 42 7d 20 7c 20 63 75 74 20 2d 64 20  ${LIB} | cut -d 
1400: 2e 20 2d 66 20 33 60 20 60 65 63 68 6f 20 27 20  . -f 3` `echo ' 
1410: 27 60 20 60 65 63 68 6f 20 24 7b 4c 49 42 7d 60  '` `echo ${LIB}`
1420: 22 0a 09 64 6f 6e 65 0a 09 6c 69 70 6f 20 2d 63  "..done..lipo -c
1430: 72 65 61 74 65 20 24 7b 41 52 43 48 4c 49 53 54  reate ${ARCHLIST
1440: 7d 20 2d 6f 75 74 70 75 74 20 6d 61 63 62 75 69  } -output macbui
1450: 6c 64 2f 24 7b 4f 53 58 7d 2f 6c 69 62 63 61 63  ld/${OSX}/libcac
1460: 6b 65 79 2e 64 79 6c 69 62 0a 09 66 6f 72 20 44  key.dylib..for D
1470: 4c 49 42 20 69 6e 20 6d 61 63 62 75 69 6c 64 2f  LIB in macbuild/
1480: 24 7b 4f 53 58 7d 2f 6c 69 62 63 61 63 6b 65 79  ${OSX}/libcackey
1490: 5f 67 2e 64 79 6c 69 62 2e 2a 3b 20 64 6f 0a 09  _g.dylib.*; do..
14a0: 09 44 41 52 43 48 4c 49 53 54 3d 22 24 7b 44 41  .DARCHLIST="${DA
14b0: 52 43 48 4c 49 53 54 7d 20 60 65 63 68 6f 20 27  RCHLIST} `echo '
14c0: 2d 61 72 63 68 20 27 60 20 60 65 63 68 6f 20 24  -arch '` `echo $
14d0: 7b 44 4c 49 42 7d 20 7c 20 63 75 74 20 2d 64 20  {DLIB} | cut -d 
14e0: 2e 20 2d 66 20 33 60 20 60 65 63 68 6f 20 27 20  . -f 3` `echo ' 
14f0: 27 60 20 60 65 63 68 6f 20 24 7b 44 4c 49 42 7d  '` `echo ${DLIB}
1500: 60 22 0a 09 64 6f 6e 65 0a 09 6c 69 70 6f 20 2d  `"..done..lipo -
1510: 63 72 65 61 74 65 20 24 7b 44 41 52 43 48 4c 49  create ${DARCHLI
1520: 53 54 7d 20 2d 6f 75 74 70 75 74 20 6d 61 63 62  ST} -output macb
1530: 75 69 6c 64 2f 24 7b 4f 53 58 7d 2f 6c 69 62 63  uild/${OSX}/libc
1540: 61 63 6b 65 79 5f 67 2e 64 79 6c 69 62 0a 09 72  ackey_g.dylib..r
1550: 6d 20 6d 61 63 62 75 69 6c 64 2f 24 7b 4f 53 58  m macbuild/${OSX
1560: 7d 2f 6c 69 62 63 61 63 6b 65 79 2a 2e 64 79 6c  }/libcackey*.dyl
1570: 69 62 2e 2a 0a 7d 0a 0a 23 20 46 75 6e 63 74 69  ib.*.}..# Functi
1580: 6f 6e 20 74 6f 20 62 75 69 6c 64 20 4d 61 63 20  on to build Mac 
1590: 4f 53 20 58 20 50 61 63 6b 61 67 65 73 0a 70 6b  OS X Packages.pk
15a0: 67 62 75 69 6c 64 28 29 20 7b 0a 09 69 66 20 5b  gbuild() {..if [
15b0: 20 22 60 75 6e 61 6d 65 20 2d 72 20 7c 20 63 75   "`uname -r | cu
15c0: 74 20 2d 64 20 2e 20 2d 66 20 31 60 22 20 2d 6c  t -d . -f 1`" -l
15d0: 74 20 22 31 30 22 20 5d 3b 20 74 68 65 6e 0a 09  t "10" ]; then..
15e0: 09 4c 49 42 43 41 43 4b 45 59 47 3d 6c 69 62 63  .LIBCACKEYG=libc
15f0: 61 63 6b 65 79 67 2e 70 6b 67 0a 09 65 6c 73 65  ackeyg.pkg..else
1600: 0a 09 09 4c 49 42 43 41 43 4b 45 59 47 3d 6c 69  ...LIBCACKEYG=li
1610: 62 63 61 63 6b 65 79 5f 67 2e 70 6b 67 0a 09 66  bcackey_g.pkg..f
1620: 69 0a 09 72 6d 20 2d 66 20 62 75 69 6c 64 2f 63  i..rm -f build/c
1630: 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64 2f  ackey_osx_build/
1640: 63 61 63 6b 65 79 2e 64 79 6c 69 62 0a 09 6c 6e  cackey.dylib..ln
1650: 20 6d 61 63 62 75 69 6c 64 2f 24 7b 4f 53 58 7d   macbuild/${OSX}
1660: 2f 6c 69 62 63 61 63 6b 65 79 2e 64 79 6c 69 62  /libcackey.dylib
1670: 20 62 75 69 6c 64 2f 63 61 63 6b 65 79 5f 6f 73   build/cackey_os
1680: 78 5f 62 75 69 6c 64 2f 63 61 63 6b 65 79 2e 64  x_build/cackey.d
1690: 79 6c 69 62 0a 09 72 6d 20 2d 72 66 20 62 75 69  ylib..rm -rf bui
16a0: 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75  ld/cackey_osx_bu
16b0: 69 6c 64 2f 50 4b 43 53 31 31 2e 74 6f 6b 65 6e  ild/PKCS11.token
16c0: 64 0a 09 69 66 20 5b 20 22 24 7b 4c 49 4f 4e 42  d..if [ "${LIONB
16d0: 55 49 4c 44 7d 22 20 3d 20 31 20 5d 3b 20 74 68  UILD}" = 1 ]; th
16e0: 65 6e 0a 09 09 54 41 52 3d 67 6e 75 74 61 72 0a  en...TAR=gnutar.
16f0: 09 65 6c 73 65 0a 09 09 54 41 52 3d 74 61 72 0a  .else...TAR=tar.
1700: 09 66 69 0a 09 69 66 20 5b 20 22 24 7b 4f 53 58  .fi..if [ "${OSX
1710: 7d 22 20 3d 20 22 4c 65 6f 70 61 72 64 22 20 5d  }" = "Leopard" ]
1720: 3b 20 74 68 65 6e 0a 09 09 63 75 72 6c 20 68 74  ; then...curl ht
1730: 74 70 3a 2f 2f 64 65 76 65 6c 2e 6b 76 61 6e 61  tp://devel.kvana
1740: 6c 73 2e 6f 72 67 2f 50 4b 43 53 31 31 5f 54 6f  ls.org/PKCS11_To
1750: 6b 65 6e 64 2f 50 4b 43 53 31 31 5f 74 6f 6b 65  kend/PKCS11_toke
1760: 6e 64 2d 6c 61 74 65 73 74 2e 74 61 72 2e 67 7a  nd-latest.tar.gz
1770: 20 7c 20 24 7b 54 41 52 7d 20 2d 2d 73 74 72 69   | ${TAR} --stri
1780: 70 2d 63 6f 6d 70 6f 6e 65 6e 74 73 20 33 20 2d  p-components 3 -
1790: 2d 77 69 6c 64 63 61 72 64 73 20 2d 78 20 2d 7a  -wildcards -x -z
17a0: 20 2d 66 20 2d 20 22 50 4b 43 53 31 31 5f 74 6f   -f - "PKCS11_to
17b0: 6b 65 6e 64 2d 2a 2f 70 72 65 62 75 69 6c 74 2f  kend-*/prebuilt/
17c0: 6c 65 6f 70 61 72 64 2f 50 4b 43 53 31 31 2e 74  leopard/PKCS11.t
17d0: 6f 6b 65 6e 64 22 0a 09 09 6d 76 20 50 4b 43 53  okend"...mv PKCS
17e0: 31 31 2e 74 6f 6b 65 6e 64 20 62 75 69 6c 64 2f  11.tokend build/
17f0: 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64  cackey_osx_build
1800: 2f 50 4b 43 53 31 31 2e 74 6f 6b 65 6e 64 0a 09  /PKCS11.tokend..
1810: 65 6c 73 65 0a 09 09 63 75 72 6c 20 68 74 74 70  else...curl http
1820: 3a 2f 2f 64 65 76 65 6c 2e 6b 76 61 6e 61 6c 73  ://devel.kvanals
1830: 2e 6f 72 67 2f 50 4b 43 53 31 31 5f 54 6f 6b 65  .org/PKCS11_Toke
1840: 6e 64 2f 50 4b 43 53 31 31 5f 74 6f 6b 65 6e 64  nd/PKCS11_tokend
1850: 2d 6c 61 74 65 73 74 2e 74 61 72 2e 67 7a 20 7c  -latest.tar.gz |
1860: 20 24 7b 54 41 52 7d 20 2d 2d 73 74 72 69 70 2d   ${TAR} --strip-
1870: 63 6f 6d 70 6f 6e 65 6e 74 73 20 33 20 2d 2d 77  components 3 --w
1880: 69 6c 64 63 61 72 64 73 20 2d 78 20 2d 7a 20 2d  ildcards -x -z -
1890: 66 20 2d 20 22 50 4b 43 53 31 31 5f 74 6f 6b 65  f - "PKCS11_toke
18a0: 6e 64 2d 2a 2f 70 72 65 62 75 69 6c 74 2f 73 6e  nd-*/prebuilt/sn
18b0: 6f 77 6c 65 6f 70 61 72 64 2f 50 4b 43 53 31 31  owleopard/PKCS11
18c0: 2e 74 6f 6b 65 6e 64 22 0a 09 09 6d 76 20 50 4b  .tokend"...mv PK
18d0: 43 53 31 31 2e 74 6f 6b 65 6e 64 20 62 75 69 6c  CS11.tokend buil
18e0: 64 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69  d/cackey_osx_bui
18f0: 6c 64 2f 50 4b 43 53 31 31 2e 74 6f 6b 65 6e 64  ld/PKCS11.tokend
1900: 0a 09 66 69 0a 09 66 6f 72 20 50 4d 44 4f 43 20  ..fi..for PMDOC 
1910: 69 6e 20 62 75 69 6c 64 2f 63 61 63 6b 65 79 5f  in build/cackey_
1920: 6f 73 78 5f 62 75 69 6c 64 2f 54 65 6d 70 6c 61  osx_build/Templa
1930: 74 65 5f 70 6d 62 75 69 6c 64 2f 2a 2e 69 6e 3b  te_pmbuild/*.in;
1940: 20 64 6f 0a 09 09 50 4d 44 4f 43 3d 22 60 65 63   do...PMDOC="`ec
1950: 68 6f 20 22 24 7b 50 4d 44 4f 43 7d 22 20 7c 20  ho "${PMDOC}" | 
1960: 73 65 64 20 27 73 7c 6c 2e 69 6e 7c 6c 7c 67 27  sed 's|l.in|l|g'
1970: 20 7c 20 73 65 64 20 27 73 7c 62 75 69 6c 64 2f   | sed 's|build/
1980: 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64  cackey_osx_build
1990: 2f 54 65 6d 70 6c 61 74 65 5f 70 6d 62 75 69 6c  /Template_pmbuil
19a0: 64 2f 7c 7c 67 27 60 22 0a 09 09 55 55 49 44 3d  d/||g'`"...UUID=
19b0: 22 60 70 79 74 68 6f 6e 20 2d 63 20 27 69 6d 70  "`python -c 'imp
19c0: 6f 72 74 20 75 75 69 64 3b 20 70 72 69 6e 74 20  ort uuid; print 
19d0: 75 75 69 64 2e 75 75 69 64 31 28 29 27 20 7c 20  uuid.uuid1()' | 
19e0: 64 64 20 63 6f 6e 76 3d 75 63 61 73 65 20 32 3e  dd conv=ucase 2>
19f0: 2f 64 65 76 2f 6e 75 6c 6c 60 22 0a 09 09 6d 6b  /dev/null`"...mk
1a00: 64 69 72 20 2d 70 20 62 75 69 6c 64 2f 63 61 63  dir -p build/cac
1a10: 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64 2f 24 7b  key_osx_build/${
1a20: 4f 53 58 7d 5f 70 6d 62 75 69 6c 64 2e 70 6d 64  OSX}_pmbuild.pmd
1a30: 6f 63 0a 09 09 73 65 64 20 22 73 7c 40 40 42 55  oc...sed "s|@@BU
1a40: 49 4c 44 52 4f 4f 54 44 49 52 40 40 7c 24 28 70  ILDROOTDIR@@|$(p
1a50: 77 64 29 7c 67 22 20 62 75 69 6c 64 2f 63 61 63  wd)|g" build/cac
1a60: 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64 2f 54 65  key_osx_build/Te
1a70: 6d 70 6c 61 74 65 5f 70 6d 62 75 69 6c 64 2f 24  mplate_pmbuild/$
1a80: 7b 50 4d 44 4f 43 7d 2e 69 6e 20 3e 20 62 75 69  {PMDOC}.in > bui
1a90: 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75  ld/cackey_osx_bu
1aa0: 69 6c 64 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75 69  ild/${OSX}_pmbui
1ab0: 6c 64 2e 70 6d 64 6f 63 2f 24 7b 50 4d 44 4f 43  ld.pmdoc/${PMDOC
1ac0: 7d 0a 09 09 73 65 64 20 22 73 7c 40 40 4f 53 58  }...sed "s|@@OSX
1ad0: 56 45 52 53 49 4f 4e 40 40 7c 24 7b 4f 53 58 7d  VERSION@@|${OSX}
1ae0: 7c 67 22 20 62 75 69 6c 64 2f 63 61 63 6b 65 79  |g" build/cackey
1af0: 5f 6f 73 78 5f 62 75 69 6c 64 2f 24 7b 4f 53 58  _osx_build/${OSX
1b00: 7d 5f 70 6d 62 75 69 6c 64 2e 70 6d 64 6f 63 2f  }_pmbuild.pmdoc/
1b10: 24 7b 50 4d 44 4f 43 7d 20 3e 20 62 75 69 6c 64  ${PMDOC} > build
1b20: 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c  /cackey_osx_buil
1b30: 64 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75 69 6c 64  d/${OSX}_pmbuild
1b40: 2e 70 6d 64 6f 63 2f 24 7b 50 4d 44 4f 43 7d 2e  .pmdoc/${PMDOC}.
1b50: 31 0a 09 09 73 65 64 20 22 73 7c 40 40 55 55 49  1...sed "s|@@UUI
1b60: 44 40 40 7c 24 7b 55 55 49 44 7d 7c 67 22 20 62  D@@|${UUID}|g" b
1b70: 75 69 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78 5f  uild/cackey_osx_
1b80: 62 75 69 6c 64 2f 24 7b 4f 53 58 7d 5f 70 6d 62  build/${OSX}_pmb
1b90: 75 69 6c 64 2e 70 6d 64 6f 63 2f 24 7b 50 4d 44  uild.pmdoc/${PMD
1ba0: 4f 43 7d 2e 31 20 3e 20 62 75 69 6c 64 2f 63 61  OC}.1 > build/ca
1bb0: 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64 2f 24  ckey_osx_build/$
1bc0: 7b 4f 53 58 7d 5f 70 6d 62 75 69 6c 64 2e 70 6d  {OSX}_pmbuild.pm
1bd0: 64 6f 63 2f 24 7b 50 4d 44 4f 43 7d 0a 09 09 73  doc/${PMDOC}...s
1be0: 65 64 20 22 73 7c 40 40 54 41 52 47 45 54 4f 53  ed "s|@@TARGETOS
1bf0: 40 40 7c 24 7b 50 4b 54 41 52 47 45 54 4f 53 7d  @@|${PKTARGETOS}
1c00: 7c 67 22 20 62 75 69 6c 64 2f 63 61 63 6b 65 79  |g" build/cackey
1c10: 5f 6f 73 78 5f 62 75 69 6c 64 2f 24 7b 4f 53 58  _osx_build/${OSX
1c20: 7d 5f 70 6d 62 75 69 6c 64 2e 70 6d 64 6f 63 2f  }_pmbuild.pmdoc/
1c30: 24 7b 50 4d 44 4f 43 7d 20 3e 20 62 75 69 6c 64  ${PMDOC} > build
1c40: 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c  /cackey_osx_buil
1c50: 64 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75 69 6c 64  d/${OSX}_pmbuild
1c60: 2e 70 6d 64 6f 63 2f 24 7b 50 4d 44 4f 43 7d 2e  .pmdoc/${PMDOC}.
1c70: 31 0a 09 09 73 65 64 20 22 73 7c 40 40 43 55 52  1...sed "s|@@CUR
1c80: 4f 53 58 56 45 52 40 40 7c 24 7b 43 55 52 4f 53  OSXVER@@|${CUROS
1c90: 58 56 45 52 7d 7c 67 22 20 62 75 69 6c 64 2f 63  XVER}|g" build/c
1ca0: 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64 2f  ackey_osx_build/
1cb0: 24 7b 4f 53 58 7d 5f 70 6d 62 75 69 6c 64 2e 70  ${OSX}_pmbuild.p
1cc0: 6d 64 6f 63 2f 24 7b 50 4d 44 4f 43 7d 20 3e 20  mdoc/${PMDOC} > 
1cd0: 62 75 69 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78  build/cackey_osx
1ce0: 5f 62 75 69 6c 64 2f 24 7b 4f 53 58 7d 5f 70 6d  _build/${OSX}_pm
1cf0: 62 75 69 6c 64 2e 70 6d 64 6f 63 2f 24 7b 50 4d  build.pmdoc/${PM
1d00: 44 4f 43 7d 2e 31 0a 09 09 73 65 64 20 22 73 7c  DOC}.1...sed "s|
1d10: 40 40 4c 49 42 43 41 43 4b 45 59 47 40 40 7c 24  @@LIBCACKEYG@@|$
1d20: 7b 4c 49 42 43 41 43 4b 45 59 47 7d 7c 67 22 20  {LIBCACKEYG}|g" 
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 2e 31 20 3e 20 62 75 69 6c 64 2f 63  DOC}.1 > build/c
1d70: 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64 2f  ackey_osx_build/
1d80: 24 7b 4f 53 58 7d 5f 70 6d 62 75 69 6c 64 2e 70  ${OSX}_pmbuild.p
1d90: 6d 64 6f 63 2f 24 7b 50 4d 44 4f 43 7d 0a 09 09  mdoc/${PMDOC}...
1da0: 63 70 20 62 75 69 6c 64 2f 63 61 63 6b 65 79 5f  cp build/cackey_
1db0: 6f 73 78 5f 62 75 69 6c 64 2f 24 7b 4f 53 58 7d  osx_build/${OSX}
1dc0: 5f 70 6d 62 75 69 6c 64 2e 70 6d 64 6f 63 2f 24  _pmbuild.pmdoc/$
1dd0: 7b 50 4d 44 4f 43 7d 20 62 75 69 6c 64 2f 63 61  {PMDOC} build/ca
1de0: 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64 2f 24  ckey_osx_build/$
1df0: 7b 4f 53 58 7d 5f 70 6d 62 75 69 6c 64 2e 70 6d  {OSX}_pmbuild.pm
1e00: 64 6f 63 2f 24 7b 50 4d 44 4f 43 7d 2e 31 0a 09  doc/${PMDOC}.1..
1e10: 09 6d 76 20 62 75 69 6c 64 2f 63 61 63 6b 65 79  .mv build/cackey
1e20: 5f 6f 73 78 5f 62 75 69 6c 64 2f 24 7b 4f 53 58  _osx_build/${OSX
1e30: 7d 5f 70 6d 62 75 69 6c 64 2e 70 6d 64 6f 63 2f  }_pmbuild.pmdoc/
1e40: 24 7b 50 4d 44 4f 43 7d 2e 31 20 62 75 69 6c 64  ${PMDOC}.1 build
1e50: 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c  /cackey_osx_buil
1e60: 64 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75 69 6c 64  d/${OSX}_pmbuild
1e70: 2e 70 6d 64 6f 63 2f 24 7b 50 4d 44 4f 43 7d 0a  .pmdoc/${PMDOC}.
1e80: 09 64 6f 6e 65 0a 09 45 58 54 3d 70 6b 67 0a 09  .done..EXT=pkg..
1e90: 69 66 20 5b 20 24 7b 4f 53 58 7d 20 3d 3d 20 22  if [ ${OSX} == "
1ea0: 53 6e 6f 77 6c 65 6f 70 61 72 64 22 20 5d 3b 20  Snowleopard" ]; 
1eb0: 74 68 65 6e 0a 09 09 63 61 74 20 62 75 69 6c 64  then...cat build
1ec0: 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c  /cackey_osx_buil
1ed0: 64 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75 69 6c 64  d/${OSX}_pmbuild
1ee0: 2e 70 6d 64 6f 63 2f 69 6e 64 65 78 2e 78 6d 6c  .pmdoc/index.xml
1ef0: 20 7c 20 73 65 64 20 27 73 7c 66 6f 72 20 4d 61   | sed 's|for Ma
1f00: 63 20 4f 53 20 58 20 53 6e 6f 77 6c 65 6f 70 61  c OS X Snowleopa
1f10: 72 64 7c 66 6f 72 20 4d 61 63 20 4f 53 20 58 20  rd|for Mac OS X 
1f20: 53 6e 6f 77 4c 65 6f 70 61 72 64 7c 67 27 20 3e  SnowLeopard|g' >
1f30: 20 62 75 69 6c 64 2f 63 61 63 6b 65 79 5f 6f 73   build/cackey_os
1f40: 78 5f 62 75 69 6c 64 2f 24 7b 4f 53 58 7d 5f 70  x_build/${OSX}_p
1f50: 6d 62 75 69 6c 64 2e 70 6d 64 6f 63 2f 69 6e 64  mbuild.pmdoc/ind
1f60: 65 78 2e 78 6d 6c 2e 6e 65 77 0a 09 09 6d 76 20  ex.xml.new...mv 
1f70: 62 75 69 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78  build/cackey_osx
1f80: 5f 62 75 69 6c 64 2f 24 7b 4f 53 58 7d 5f 70 6d  _build/${OSX}_pm
1f90: 62 75 69 6c 64 2e 70 6d 64 6f 63 2f 69 6e 64 65  build.pmdoc/inde
1fa0: 78 2e 78 6d 6c 2e 6e 65 77 20 62 75 69 6c 64 2f  x.xml.new build/
1fb0: 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64  cackey_osx_build
1fc0: 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75 69 6c 64 2e  /${OSX}_pmbuild.
1fd0: 70 6d 64 6f 63 2f 69 6e 64 65 78 2e 78 6d 6c 0a  pmdoc/index.xml.
1fe0: 09 66 69 0a 09 69 66 20 5b 20 24 7b 4f 53 58 7d  .fi..if [ ${OSX}
1ff0: 20 3d 3d 20 22 53 6c 74 6f 79 6f 73 22 20 5d 3b   == "Sltoyos" ];
2000: 20 74 68 65 6e 0a 09 09 63 61 74 20 62 75 69 6c   then...cat buil
2010: 64 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69  d/cackey_osx_bui
2020: 6c 64 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75 69 6c  ld/${OSX}_pmbuil
2030: 64 2e 70 6d 64 6f 63 2f 69 6e 64 65 78 2e 78 6d  d.pmdoc/index.xm
2040: 6c 20 7c 20 73 65 64 20 27 73 7c 66 6f 72 20 4d  l | sed 's|for M
2050: 61 63 20 4f 53 20 58 20 53 6c 74 6f 79 6f 73 7c  ac OS X Sltoyos|
2060: 66 6f 72 20 4d 61 63 20 4f 53 20 58 20 53 4c 74  for Mac OS X SLt
2070: 6f 59 6f 73 7c 67 27 20 3e 20 62 75 69 6c 64 2f  oYos|g' > build/
2080: 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64  cackey_osx_build
2090: 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75 69 6c 64 2e  /${OSX}_pmbuild.
20a0: 70 6d 64 6f 63 2f 69 6e 64 65 78 2e 78 6d 6c 2e  pmdoc/index.xml.
20b0: 6e 65 77 0a 09 09 6d 76 20 62 75 69 6c 64 2f 63  new...mv build/c
20c0: 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64 2f  ackey_osx_build/
20d0: 24 7b 4f 53 58 7d 5f 70 6d 62 75 69 6c 64 2e 70  ${OSX}_pmbuild.p
20e0: 6d 64 6f 63 2f 69 6e 64 65 78 2e 78 6d 6c 2e 6e  mdoc/index.xml.n
20f0: 65 77 20 62 75 69 6c 64 2f 63 61 63 6b 65 79 5f  ew build/cackey_
2100: 6f 73 78 5f 62 75 69 6c 64 2f 24 7b 4f 53 58 7d  osx_build/${OSX}
2110: 5f 70 6d 62 75 69 6c 64 2e 70 6d 64 6f 63 2f 69  _pmbuild.pmdoc/i
2120: 6e 64 65 78 2e 78 6d 6c 0a 09 66 69 0a 09 2f 44  ndex.xml..fi../D
2130: 65 76 65 6c 6f 70 65 72 2f 41 70 70 6c 69 63 61  eveloper/Applica
2140: 74 69 6f 6e 73 2f 55 74 69 6c 69 74 69 65 73 2f  tions/Utilities/
2150: 50 61 63 6b 61 67 65 4d 61 6b 65 72 2e 61 70 70  PackageMaker.app
2160: 2f 43 6f 6e 74 65 6e 74 73 2f 4d 61 63 4f 53 2f  /Contents/MacOS/
2170: 50 61 63 6b 61 67 65 4d 61 6b 65 72 20 2d 64 20  PackageMaker -d 
2180: 62 75 69 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78  build/cackey_osx
2190: 5f 62 75 69 6c 64 2f 24 7b 4f 53 58 7d 5f 70 6d  _build/${OSX}_pm
21a0: 62 75 69 6c 64 2e 70 6d 64 6f 63 20 2d 6f 20 6d  build.pmdoc -o m
21b0: 61 63 62 75 69 6c 64 2f 70 6b 67 2f 43 41 43 4b  acbuild/pkg/CACK
21c0: 65 79 5f 24 7b 43 41 43 4b 45 59 5f 56 45 52 53  ey_${CACKEY_VERS
21d0: 49 4f 4e 7d 5f 24 7b 4f 53 58 7d 2e 24 7b 45 58  ION}_${OSX}.${EX
21e0: 54 7d 0a 09 74 61 72 20 2d 2d 63 72 65 61 74 65  T}..tar --create
21f0: 20 2d 2d 64 69 72 65 63 74 6f 72 79 20 6d 61 63   --directory mac
2200: 62 75 69 6c 64 2f 70 6b 67 2f 20 2d 2d 66 69 6c  build/pkg/ --fil
2210: 65 20 6d 61 63 62 75 69 6c 64 2f 70 6b 67 2f 43  e macbuild/pkg/C
2220: 41 43 4b 65 79 5f 24 7b 43 41 43 4b 45 59 5f 56  ACKey_${CACKEY_V
2230: 45 52 53 49 4f 4e 7d 5f 24 7b 4f 53 58 7d 2e 24  ERSION}_${OSX}.$
2240: 7b 45 58 54 7d 2e 74 61 72 20 43 41 43 4b 65 79  {EXT}.tar CACKey
2250: 5f 24 7b 43 41 43 4b 45 59 5f 56 45 52 53 49 4f  _${CACKEY_VERSIO
2260: 4e 7d 5f 24 7b 4f 53 58 7d 2e 24 7b 45 58 54 7d  N}_${OSX}.${EXT}
2270: 0a 09 67 7a 69 70 20 2d 39 20 6d 61 63 62 75 69  ..gzip -9 macbui
2280: 6c 64 2f 70 6b 67 2f 43 41 43 4b 65 79 5f 24 7b  ld/pkg/CACKey_${
2290: 43 41 43 4b 45 59 5f 56 45 52 53 49 4f 4e 7d 5f  CACKEY_VERSION}_
22a0: 24 7b 4f 53 58 7d 2e 24 7b 45 58 54 7d 2e 74 61  ${OSX}.${EXT}.ta
22b0: 72 0a 09 72 6d 20 2d 72 66 20 6d 61 63 62 75 69  r..rm -rf macbui
22c0: 6c 64 2f 70 6b 67 2f 43 41 43 4b 65 79 5f 24 7b  ld/pkg/CACKey_${
22d0: 43 41 43 4b 45 59 5f 56 45 52 53 49 4f 4e 7d 5f  CACKEY_VERSION}_
22e0: 24 7b 4f 53 58 7d 2e 24 7b 45 58 54 7d 0a 09 72  ${OSX}.${EXT}..r
22f0: 6d 20 2d 66 20 62 75 69 6c 64 2f 63 61 63 6b 65  m -f build/cacke
2300: 79 5f 6f 73 78 5f 62 75 69 6c 64 2f 63 61 63 6b  y_osx_build/cack
2310: 65 79 2e 64 79 6c 69 62 0a 09 72 6d 20 2d 72 66  ey.dylib..rm -rf
2320: 20 62 75 69 6c 64 2f 63 61 63 6b 65 79 5f 6f 73   build/cackey_os
2330: 78 5f 62 75 69 6c 64 2f 50 4b 43 53 31 31 2e 74  x_build/PKCS11.t
2340: 6f 6b 65 6e 64 0a 09 65 63 68 6f 20 22 24 7b 4f  okend..echo "${O
2350: 53 58 7d 20 62 75 69 6c 64 20 63 6f 6d 70 6c 65  SX} build comple
2360: 74 65 22 0a 7d 0a 0a 23 20 54 61 6b 65 20 63 6f  te".}..# Take co
2370: 6d 6d 61 6e 64 20 6c 69 6e 65 20 61 72 67 75 6d  mmand line argum
2380: 65 6e 74 73 20 61 6e 64 20 65 78 65 63 75 74 65  ents and execute
2390: 0a 63 61 73 65 20 22 24 31 22 20 69 6e 0a 09 22  .case "$1" in.."
23a0: 22 29 0a 09 09 75 73 61 67 65 0a 09 09 65 78 69  ")...usage...exi
23b0: 74 20 24 3f 0a 09 3b 3b 0a 0a 09 22 6c 65 6f 70  t $?..;;..."leop
23c0: 61 72 64 22 29 0a 09 09 2e 2f 61 75 74 6f 67 65  ard")..../autoge
23d0: 6e 2e 73 68 0a 09 09 6c 65 6f 70 61 72 64 0a 09  n.sh...leopard..
23e0: 09 65 78 69 74 20 24 3f 0a 09 3b 3b 0a 0a 09 22  .exit $?..;;..."
23f0: 73 6e 6f 77 6c 65 6f 70 61 72 64 22 29 0a 09 09  snowleopard")...
2400: 2e 2f 61 75 74 6f 67 65 6e 2e 73 68 0a 09 09 73  ./autogen.sh...s
2410: 6e 6f 77 6c 65 6f 70 61 72 64 0a 09 09 65 78 69  nowleopard...exi
2420: 74 20 24 3f 0a 09 3b 3b 0a 09 0a 09 22 6c 69 6f  t $?..;;...."lio
2430: 6e 22 29 0a 09 09 2e 2f 61 75 74 6f 67 65 6e 2e  n")..../autogen.
2440: 73 68 0a 09 09 6c 69 6f 6e 0a 09 09 65 78 69 74  sh...lion...exit
2450: 20 24 3f 0a 09 3b 3b 0a 09 0a 09 22 73 6c 74 6f   $?..;;...."slto
2460: 79 6f 73 22 29 0a 09 09 2e 2f 61 75 74 6f 67 65  yos")..../autoge
2470: 6e 2e 73 68 0a 09 09 73 6c 74 6f 79 6f 73 0a 09  n.sh...sltoyos..
2480: 09 65 78 69 74 20 24 3f 0a 09 3b 3b 0a 0a 09 22  .exit $?..;;..."
2490: 61 6c 6c 22 29 0a 09 09 2e 2f 61 75 74 6f 67 65  all")..../autoge
24a0: 6e 2e 73 68 0a 09 09 6c 65 6f 70 61 72 64 0a 09  n.sh...leopard..
24b0: 09 73 6c 74 6f 79 6f 73 0a 09 09 65 63 68 6f 20  .sltoyos...echo 
24c0: 22 22 0a 09 09 65 63 68 6f 20 22 41 6c 6c 20 62  ""...echo "All b
24d0: 75 69 6c 64 73 20 63 6f 6d 70 6c 65 74 65 2e 22  uilds complete."
24e0: 0a 09 09 65 78 69 74 20 24 3f 0a 09 3b 3b 0a 0a  ...exit $?..;;..
24f0: 09 22 63 6c 65 61 6e 22 29 0a 09 09 63 6c 65 61  ."clean")...clea
2500: 6e 0a 09 09 65 78 69 74 20 24 3f 0a 09 3b 3b 0a  n...exit $?..;;.
2510: 0a 09 2a 29 0a 09 09 75 73 61 67 65 0a 09 09 65  ..*)...usage...e
2520: 78 69 74 20 24 3f 0a 09 3b 3b 0a 65 73 61 63 20  xit $?..;;.esac 
2530: 0a                                               .