Hex Artifact Content

Artifact 8dd8386c032b5c4b88775ac4a3a1783c438a6911:


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: 6d 61 76 20 2d 20 28 42 75 69 6c 64 73 20 55 6e  mav - (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 20 4c 69 62 72  7/10.8/10.9 Libr
02b0: 61 72 79 20 66 6f 72 20 69 33 38 36 2f 78 38 36  ary for i386/x86
02c0: 5f 36 34 29 22 0a 09 65 63 68 6f 20 22 20 20 20  _64)"..echo "   
02d0: 20 61 6c 6c 20 2d 20 28 42 75 69 6c 64 73 20 66   all - (Builds f
02e0: 6f 72 20 61 6c 6c 20 73 75 70 70 6f 72 74 65 64  or all supported
02f0: 20 74 61 72 67 65 74 73 29 22 0a 09 65 63 68 6f   targets)"..echo
0300: 20 22 20 20 20 20 63 6c 65 61 6e 20 2d 20 28 43   "    clean - (C
0310: 6c 65 61 6e 73 20 75 70 29 22 0a 09 65 63 68 6f  leans up)"..echo
0320: 20 22 52 75 6e 20 66 72 6f 6d 20 43 41 43 4b 65   "Run from CACKe
0330: 79 20 42 75 69 6c 64 20 52 6f 6f 74 2e 22 0a 09  y Build Root."..
0340: 65 78 69 74 20 24 3f 0a 7d 0a 0a 23 20 43 6c 65  exit $?.}..# Cle
0350: 61 6e 20 75 70 20 66 75 6e 63 74 69 6f 6e 0a 63  an up function.c
0360: 6c 65 61 6e 28 29 20 7b 0a 09 72 6d 20 2d 66 20  lean() {..rm -f 
0370: 62 75 69 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78  build/cackey_osx
0380: 5f 62 75 69 6c 64 2f 63 61 63 6b 65 79 2e 64 79  _build/cackey.dy
0390: 6c 69 62 0a 09 72 6d 20 2d 72 66 20 62 75 69 6c  lib..rm -rf buil
03a0: 64 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69  d/cackey_osx_bui
03b0: 6c 64 2f 50 4b 43 53 31 31 2e 74 6f 6b 65 6e 64  ld/PKCS11.tokend
03c0: 0a 09 72 6d 20 2d 72 66 20 50 4b 43 53 31 31 2e  ..rm -rf PKCS11.
03d0: 74 6f 6b 65 6e 64 0a 09 72 6d 20 2d 72 66 20 6d  tokend..rm -rf m
03e0: 61 63 62 75 69 6c 64 0a 09 72 6d 20 2d 72 66 20  acbuild..rm -rf 
03f0: 62 75 69 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78  build/cackey_osx
0400: 5f 62 75 69 6c 64 2f 2a 2e 70 6d 64 6f 63 0a 09  _build/*.pmdoc..
0410: 6d 61 6b 65 20 64 69 73 74 63 6c 65 61 6e 0a 7d  make distclean.}
0420: 0a 0a 23 20 44 69 72 65 63 74 6f 72 79 20 63 72  ..# Directory cr
0430: 65 61 74 69 6f 6e 20 66 75 6e 63 74 69 6f 6e 0a  eation function.
0440: 6d 61 6b 65 64 69 72 28 29 20 7b 0a 09 69 66 20  makedir() {..if 
0450: 5b 20 22 60 75 6e 61 6d 65 20 2d 72 20 7c 20 63  [ "`uname -r | c
0460: 75 74 20 2d 64 20 2e 20 2d 66 20 31 60 22 20 2d  ut -d . -f 1`" -
0470: 6c 74 20 22 31 30 22 20 5d 3b 20 74 68 65 6e 0a  lt "10" ]; then.
0480: 09 09 4c 49 42 54 4f 4f 4c 44 49 52 3d 2f 44 65  ..LIBTOOLDIR=/De
0490: 76 65 6c 6f 70 65 72 2f 75 73 72 2f 73 68 61 72  veloper/usr/shar
04a0: 65 2f 6c 69 62 74 6f 6f 6c 0a 09 65 6c 73 65 0a  e/libtool..else.
04b0: 09 09 4c 49 42 54 4f 4f 4c 44 49 52 3d 2f 44 65  ..LIBTOOLDIR=/De
04c0: 76 65 6c 6f 70 65 72 2f 75 73 72 2f 73 68 61 72  veloper/usr/shar
04d0: 65 2f 6c 69 62 74 6f 6f 6c 2f 63 6f 6e 66 69 67  e/libtool/config
04e0: 0a 09 66 69 0a 09 69 66 20 5b 20 21 20 2d 64 20  ..fi..if [ ! -d 
04f0: 6d 61 63 62 75 69 6c 64 20 5d 3b 20 74 68 65 6e  macbuild ]; then
0500: 0a 09 09 6d 6b 64 69 72 20 6d 61 63 62 75 69 6c  ...mkdir macbuil
0510: 64 0a 09 09 6d 6b 64 69 72 20 6d 61 63 62 75 69  d...mkdir macbui
0520: 6c 64 2f 4c 65 6f 70 61 72 64 0a 09 09 6d 6b 64  ld/Leopard...mkd
0530: 69 72 20 6d 61 63 62 75 69 6c 64 2f 53 6e 6f 77  ir macbuild/Snow
0540: 6c 65 6f 70 61 72 64 0a 09 09 6d 6b 64 69 72 20  leopard...mkdir 
0550: 6d 61 63 62 75 69 6c 64 2f 4c 69 6f 6e 0a 09 09  macbuild/Lion...
0560: 6d 6b 64 69 72 20 6d 61 63 62 75 69 6c 64 2f 53  mkdir macbuild/S
0570: 6c 74 6f 6d 61 76 0a 09 09 6d 6b 64 69 72 20 6d  ltomav...mkdir m
0580: 61 63 62 75 69 6c 64 2f 70 6b 67 0a 09 66 69 0a  acbuild/pkg..fi.
0590: 09 69 66 20 5b 20 21 20 2d 66 20 63 6f 6e 66 69  .if [ ! -f confi
05a0: 67 2e 67 75 65 73 73 20 5d 3b 20 74 68 65 6e 0a  g.guess ]; then.
05b0: 09 09 63 70 20 24 7b 4c 49 42 54 4f 4f 4c 44 49  ..cp ${LIBTOOLDI
05c0: 52 7d 2f 63 6f 6e 66 69 67 2e 67 75 65 73 73 20  R}/config.guess 
05d0: 2e 0a 09 66 69 0a 09 69 66 20 5b 20 21 20 2d 66  ...fi..if [ ! -f
05e0: 20 63 6f 6e 66 69 67 2e 73 75 62 20 5d 3b 20 74   config.sub ]; t
05f0: 68 65 6e 0a 09 09 63 70 20 24 7b 4c 49 42 54 4f  hen...cp ${LIBTO
0600: 4f 4c 44 49 52 7d 2f 63 6f 6e 66 69 67 2e 73 75  OLDIR}/config.su
0610: 62 20 2e 0a 09 66 69 0a 09 69 66 20 5b 20 21 20  b ...fi..if [ ! 
0620: 2d 66 20 69 6e 73 74 61 6c 6c 2d 73 68 20 5d 3b  -f install-sh ];
0630: 20 74 68 65 6e 0a 09 09 63 70 20 24 7b 4c 49 42   then...cp ${LIB
0640: 54 4f 4f 4c 44 49 52 7d 2f 69 6e 73 74 61 6c 6c  TOOLDIR}/install
0650: 2d 73 68 20 2e 0a 09 66 69 0a 7d 0a 0a 23 20 42  -sh ...fi.}..# B
0660: 75 69 6c 64 20 66 75 6e 63 74 69 6f 6e 20 66 6f  uild function fo
0670: 72 20 4c 65 6f 70 61 72 64 0a 6c 65 6f 70 61 72  r Leopard.leopar
0680: 64 28 29 20 7b 0a 09 6d 61 6b 65 64 69 72 0a 09  d() {..makedir..
0690: 48 45 41 44 45 52 53 3d 2f 44 65 76 65 6c 6f 70  HEADERS=/Develop
06a0: 65 72 2f 53 44 4b 73 2f 4d 61 63 4f 53 58 31 30  er/SDKs/MacOSX10
06b0: 2e 35 2e 73 64 6b 2f 53 79 73 74 65 6d 2f 4c 69  .5.sdk/System/Li
06c0: 62 72 61 72 79 2f 46 72 61 6d 65 77 6f 72 6b 73  brary/Frameworks
06d0: 2f 50 43 53 43 2e 66 72 61 6d 65 77 6f 72 6b 2f  /PCSC.framework/
06e0: 56 65 72 73 69 6f 6e 73 2f 41 2f 48 65 61 64 65  Versions/A/Heade
06f0: 72 73 2f 0a 09 4c 49 42 52 41 52 59 3d 2f 44 65  rs/..LIBRARY=/De
0700: 76 65 6c 6f 70 65 72 2f 53 44 4b 73 2f 4d 61 63  veloper/SDKs/Mac
0710: 4f 53 58 31 30 2e 35 2e 73 64 6b 2f 53 79 73 74  OSX10.5.sdk/Syst
0720: 65 6d 2f 4c 69 62 72 61 72 79 2f 46 72 61 6d 65  em/Library/Frame
0730: 77 6f 72 6b 73 2f 50 43 53 43 2e 66 72 61 6d 65  works/PCSC.frame
0740: 77 6f 72 6b 2f 50 43 53 43 0a 09 4c 49 42 3d 22  work/PCSC..LIB="
0750: 22 0a 09 41 52 43 48 4c 49 53 54 3d 22 22 0a 09  "..ARCHLIST=""..
0760: 44 4c 49 42 3d 22 22 0a 09 44 41 52 43 48 4c 49  DLIB=""..DARCHLI
0770: 53 54 3d 22 22 0a 09 4f 53 58 3d 4c 65 6f 70 61  ST=""..OSX=Leopa
0780: 72 64 0a 09 50 4b 54 41 52 47 45 54 4f 53 3d 33  rd..PKTARGETOS=3
0790: 0a 09 54 48 49 53 4f 53 58 56 45 52 3d 31 30 2e  ..THISOSXVER=10.
07a0: 35 2e 39 39 0a 09 43 55 52 4f 53 58 56 45 52 3d  5.99..CUROSXVER=
07b0: 31 30 2e 35 0a 09 66 6f 72 20 48 4f 53 54 20 69  10.5..for HOST i
07c0: 6e 20 70 6f 77 65 72 70 63 2d 61 70 70 6c 65 2d  n powerpc-apple-
07d0: 64 61 72 77 69 6e 39 20 69 33 38 36 2d 61 70 70  darwin9 i386-app
07e0: 6c 65 2d 64 61 72 77 69 6e 39 3b 20 64 6f 0a 09  le-darwin9; do..
07f0: 09 67 65 6e 62 75 69 6c 64 0a 09 64 6f 6e 65 0a  .genbuild..done.
0800: 09 6c 69 62 62 75 69 6c 64 0a 09 70 6b 67 62 75  .libbuild..pkgbu
0810: 69 6c 64 0a 7d 0a 0a 23 20 42 75 69 6c 64 20 66  ild.}..# Build f
0820: 75 6e 63 74 69 6f 6e 20 66 6f 72 20 53 6e 6f 77  unction for Snow
0830: 20 4c 65 6f 70 61 72 64 0a 73 6e 6f 77 6c 65 6f   Leopard.snowleo
0840: 70 61 72 64 28 29 20 7b 0a 09 6d 61 6b 65 64 69  pard() {..makedi
0850: 72 0a 09 48 45 41 44 45 52 53 3d 2f 44 65 76 65  r..HEADERS=/Deve
0860: 6c 6f 70 65 72 2f 53 44 4b 73 2f 4d 61 63 4f 53  loper/SDKs/MacOS
0870: 58 31 30 2e 36 2e 73 64 6b 2f 53 79 73 74 65 6d  X10.6.sdk/System
0880: 2f 4c 69 62 72 61 72 79 2f 46 72 61 6d 65 77 6f  /Library/Framewo
0890: 72 6b 73 2f 50 43 53 43 2e 66 72 61 6d 65 77 6f  rks/PCSC.framewo
08a0: 72 6b 2f 56 65 72 73 69 6f 6e 73 2f 41 2f 48 65  rk/Versions/A/He
08b0: 61 64 65 72 73 2f 0a 09 4c 49 42 52 41 52 59 3d  aders/..LIBRARY=
08c0: 2f 44 65 76 65 6c 6f 70 65 72 2f 53 44 4b 73 2f  /Developer/SDKs/
08d0: 4d 61 63 4f 53 58 31 30 2e 36 2e 73 64 6b 2f 53  MacOSX10.6.sdk/S
08e0: 79 73 74 65 6d 2f 4c 69 62 72 61 72 79 2f 46 72  ystem/Library/Fr
08f0: 61 6d 65 77 6f 72 6b 73 2f 50 43 53 43 2e 66 72  ameworks/PCSC.fr
0900: 61 6d 65 77 6f 72 6b 2f 50 43 53 43 0a 09 4c 49  amework/PCSC..LI
0910: 42 3d 22 22 0a 09 41 52 43 48 4c 49 53 54 3d 22  B=""..ARCHLIST="
0920: 22 0a 09 44 4c 49 42 3d 22 22 0a 09 44 41 52 43  "..DLIB=""..DARC
0930: 48 4c 49 53 54 3d 22 22 0a 09 4f 53 58 3d 53 6e  HLIST=""..OSX=Sn
0940: 6f 77 6c 65 6f 70 61 72 64 0a 09 50 4b 54 41 52  owleopard..PKTAR
0950: 47 45 54 4f 53 3d 33 0a 09 54 48 49 53 4f 53 58  GETOS=3..THISOSX
0960: 56 45 52 3d 31 30 2e 36 2e 39 39 0a 09 43 55 52  VER=10.6.99..CUR
0970: 4f 53 58 56 45 52 3d 31 30 2e 36 0a 09 66 6f 72  OSXVER=10.6..for
0980: 20 48 4f 53 54 20 69 6e 20 69 33 38 36 2d 61 70   HOST in i386-ap
0990: 70 6c 65 2d 64 61 72 77 69 6e 31 30 20 78 38 36  ple-darwin10 x86
09a0: 5f 36 34 2d 61 70 70 6c 65 2d 64 61 72 77 69 6e  _64-apple-darwin
09b0: 31 30 3b 20 64 6f 0a 09 09 67 65 6e 62 75 69 6c  10; do...genbuil
09c0: 64 0a 09 64 6f 6e 65 0a 09 6c 69 62 62 75 69 6c  d..done..libbuil
09d0: 64 0a 09 70 6b 67 62 75 69 6c 64 0a 7d 0a 0a 23  d..pkgbuild.}..#
09e0: 20 42 75 69 6c 64 20 66 75 6e 63 74 69 6f 6e 20   Build function 
09f0: 66 6f 72 20 4c 69 6f 6e 0a 6c 69 6f 6e 28 29 20  for Lion.lion() 
0a00: 7b 0a 09 6d 61 6b 65 64 69 72 0a 09 48 45 41 44  {..makedir..HEAD
0a10: 45 52 53 3d 2f 44 65 76 65 6c 6f 70 65 72 2f 53  ERS=/Developer/S
0a20: 44 4b 73 2f 4d 61 63 4f 53 58 31 30 2e 37 2e 73  DKs/MacOSX10.7.s
0a30: 64 6b 2f 53 79 73 74 65 6d 2f 4c 69 62 72 61 72  dk/System/Librar
0a40: 79 2f 46 72 61 6d 65 77 6f 72 6b 73 2f 50 43 53  y/Frameworks/PCS
0a50: 43 2e 66 72 61 6d 65 77 6f 72 6b 2f 56 65 72 73  C.framework/Vers
0a60: 69 6f 6e 73 2f 41 2f 48 65 61 64 65 72 73 2f 0a  ions/A/Headers/.
0a70: 09 4c 49 42 52 41 52 59 3d 2f 44 65 76 65 6c 6f  .LIBRARY=/Develo
0a80: 70 65 72 2f 53 44 4b 73 2f 4d 61 63 4f 53 58 31  per/SDKs/MacOSX1
0a90: 30 2e 37 2e 73 64 6b 2f 53 79 73 74 65 6d 2f 4c  0.7.sdk/System/L
0aa0: 69 62 72 61 72 79 2f 46 72 61 6d 65 77 6f 72 6b  ibrary/Framework
0ab0: 73 2f 50 43 53 43 2e 66 72 61 6d 65 77 6f 72 6b  s/PCSC.framework
0ac0: 2f 50 43 53 43 0a 09 4c 49 42 3d 22 22 0a 09 41  /PCSC..LIB=""..A
0ad0: 52 43 48 4c 49 53 54 3d 22 22 0a 09 44 4c 49 42  RCHLIST=""..DLIB
0ae0: 3d 22 22 0a 09 44 41 52 43 48 4c 49 53 54 3d 22  =""..DARCHLIST="
0af0: 22 0a 09 4f 53 58 3d 4c 69 6f 6e 0a 09 50 4b 54  "..OSX=Lion..PKT
0b00: 41 52 47 45 54 4f 53 3d 33 0a 09 54 48 49 53 4f  ARGETOS=3..THISO
0b10: 53 58 56 45 52 3d 31 30 2e 37 2e 39 39 0a 09 43  SXVER=10.7.99..C
0b20: 55 52 4f 53 58 56 45 52 3d 31 30 2e 37 0a 09 66  UROSXVER=10.7..f
0b30: 6f 72 20 48 4f 53 54 20 69 6e 20 69 33 38 36 2d  or HOST in i386-
0b40: 61 70 70 6c 65 2d 64 61 72 77 69 6e 31 31 20 78  apple-darwin11 x
0b50: 38 36 5f 36 34 2d 61 70 70 6c 65 2d 64 61 72 77  86_64-apple-darw
0b60: 69 6e 31 31 3b 20 64 6f 0a 09 09 67 65 6e 62 75  in11; do...genbu
0b70: 69 6c 64 0a 09 64 6f 6e 65 0a 09 6c 69 62 62 75  ild..done..libbu
0b80: 69 6c 64 0a 09 70 6b 67 62 75 69 6c 64 0a 7d 0a  ild..pkgbuild.}.
0b90: 0a 23 20 42 75 69 6c 64 20 66 75 6e 63 74 69 6f  .# Build functio
0ba0: 6e 20 66 6f 72 20 53 6e 6f 77 20 4c 65 6f 70 61  n for Snow Leopa
0bb0: 72 64 2f 4c 69 6f 6e 2f 4d 6f 75 6e 74 61 69 6e  rd/Lion/Mountain
0bc0: 20 4c 69 6f 6e 0a 73 6c 74 6f 6d 61 76 28 29 20   Lion.sltomav() 
0bd0: 7b 0a 09 6d 61 6b 65 64 69 72 0a 09 48 45 41 44  {..makedir..HEAD
0be0: 45 52 53 3d 2f 44 65 76 65 6c 6f 70 65 72 2f 53  ERS=/Developer/S
0bf0: 44 4b 73 2f 4d 61 63 4f 53 58 31 30 2e 36 2e 73  DKs/MacOSX10.6.s
0c00: 64 6b 2f 53 79 73 74 65 6d 2f 4c 69 62 72 61 72  dk/System/Librar
0c10: 79 2f 46 72 61 6d 65 77 6f 72 6b 73 2f 50 43 53  y/Frameworks/PCS
0c20: 43 2e 66 72 61 6d 65 77 6f 72 6b 2f 56 65 72 73  C.framework/Vers
0c30: 69 6f 6e 73 2f 41 2f 48 65 61 64 65 72 73 2f 0a  ions/A/Headers/.
0c40: 09 4c 49 42 52 41 52 59 3d 2f 44 65 76 65 6c 6f  .LIBRARY=/Develo
0c50: 70 65 72 2f 53 44 4b 73 2f 4d 61 63 4f 53 58 31  per/SDKs/MacOSX1
0c60: 30 2e 36 2e 73 64 6b 2f 53 79 73 74 65 6d 2f 4c  0.6.sdk/System/L
0c70: 69 62 72 61 72 79 2f 46 72 61 6d 65 77 6f 72 6b  ibrary/Framework
0c80: 73 2f 50 43 53 43 2e 66 72 61 6d 65 77 6f 72 6b  s/PCSC.framework
0c90: 2f 50 43 53 43 0a 09 4c 49 42 3d 22 22 0a 09 41  /PCSC..LIB=""..A
0ca0: 52 43 48 4c 49 53 54 3d 22 22 0a 09 44 4c 49 42  RCHLIST=""..DLIB
0cb0: 3d 22 22 0a 09 44 41 52 43 48 4c 49 53 54 3d 22  =""..DARCHLIST="
0cc0: 22 0a 09 4f 53 58 3d 53 6c 74 6f 6d 61 76 0a 09  "..OSX=Sltomav..
0cd0: 50 4b 54 41 52 47 45 54 4f 53 3d 33 0a 09 54 48  PKTARGETOS=3..TH
0ce0: 49 53 4f 53 58 56 45 52 3d 31 30 2e 39 2e 39 39  ISOSXVER=10.9.99
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 42 75 69 6c 64 20 66 75 6e 63  .}..# Build func
0d70: 74 69 6f 6e 20 66 6f 72 20 53 6e 6f 77 20 4c 65  tion for Snow Le
0d80: 6f 70 61 72 64 2f 4c 69 6f 6e 2f 4d 6f 75 6e 74  opard/Lion/Mount
0d90: 61 69 6e 20 4c 69 6f 6e 0a 73 6c 74 6f 6d 61 76  ain Lion.sltomav
0da0: 28 29 20 7b 0a 09 6d 61 6b 65 64 69 72 0a 09 48  () {..makedir..H
0db0: 45 41 44 45 52 53 3d 2f 44 65 76 65 6c 6f 70 65  EADERS=/Develope
0dc0: 72 2f 53 44 4b 73 2f 4d 61 63 4f 53 58 31 30 2e  r/SDKs/MacOSX10.
0dd0: 36 2e 73 64 6b 2f 53 79 73 74 65 6d 2f 4c 69 62  6.sdk/System/Lib
0de0: 72 61 72 79 2f 46 72 61 6d 65 77 6f 72 6b 73 2f  rary/Frameworks/
0df0: 50 43 53 43 2e 66 72 61 6d 65 77 6f 72 6b 2f 56  PCSC.framework/V
0e00: 65 72 73 69 6f 6e 73 2f 41 2f 48 65 61 64 65 72  ersions/A/Header
0e10: 73 2f 0a 09 4c 49 42 52 41 52 59 3d 2f 44 65 76  s/..LIBRARY=/Dev
0e20: 65 6c 6f 70 65 72 2f 53 44 4b 73 2f 4d 61 63 4f  eloper/SDKs/MacO
0e30: 53 58 31 30 2e 36 2e 73 64 6b 2f 53 79 73 74 65  SX10.6.sdk/Syste
0e40: 6d 2f 4c 69 62 72 61 72 79 2f 46 72 61 6d 65 77  m/Library/Framew
0e50: 6f 72 6b 73 2f 50 43 53 43 2e 66 72 61 6d 65 77  orks/PCSC.framew
0e60: 6f 72 6b 2f 50 43 53 43 0a 09 4c 49 42 3d 22 22  ork/PCSC..LIB=""
0e70: 0a 09 41 52 43 48 4c 49 53 54 3d 22 22 0a 09 44  ..ARCHLIST=""..D
0e80: 4c 49 42 3d 22 22 0a 09 44 41 52 43 48 4c 49 53  LIB=""..DARCHLIS
0e90: 54 3d 22 22 0a 09 4f 53 58 3d 53 6c 74 6f 6d 61  T=""..OSX=Sltoma
0ea0: 76 0a 09 50 4b 54 41 52 47 45 54 4f 53 3d 33 0a  v..PKTARGETOS=3.
0eb0: 09 54 48 49 53 4f 53 58 56 45 52 3d 31 30 2e 39  .THISOSXVER=10.9
0ec0: 2e 39 39 0a 09 43 55 52 4f 53 58 56 45 52 3d 31  .99..CUROSXVER=1
0ed0: 30 2e 36 0a 09 66 6f 72 20 48 4f 53 54 20 69 6e  0.6..for HOST in
0ee0: 20 69 33 38 36 2d 61 70 70 6c 65 2d 64 61 72 77   i386-apple-darw
0ef0: 69 6e 31 30 20 78 38 36 5f 36 34 2d 61 70 70 6c  in10 x86_64-appl
0f00: 65 2d 64 61 72 77 69 6e 31 30 3b 20 64 6f 0a 09  e-darwin10; do..
0f10: 09 67 65 6e 62 75 69 6c 64 0a 09 64 6f 6e 65 0a  .genbuild..done.
0f20: 09 6c 69 62 62 75 69 6c 64 0a 09 70 6b 67 62 75  .libbuild..pkgbu
0f30: 69 6c 64 0a 7d 0a 0a 23 20 47 65 6e 65 72 69 63  ild.}..# Generic
0f40: 20 62 75 69 6c 64 20 66 75 6e 63 74 69 6f 6e 0a   build function.
0f50: 67 65 6e 62 75 69 6c 64 28 29 20 7b 0a 09 6d 61  genbuild() {..ma
0f60: 6b 65 20 64 69 73 74 63 6c 65 61 6e 0a 09 41 52  ke distclean..AR
0f70: 43 48 3d 60 65 63 68 6f 20 24 7b 48 4f 53 54 7d  CH=`echo ${HOST}
0f80: 20 7c 20 63 75 74 20 2d 64 20 22 2d 22 20 2d 66   | cut -d "-" -f
0f90: 20 31 60 0a 09 69 66 20 5b 20 24 7b 41 52 43 48   1`..if [ ${ARCH
0fa0: 7d 20 3d 3d 20 22 70 6f 77 65 72 70 63 22 20 5d  } == "powerpc" ]
0fb0: 3b 20 74 68 65 6e 0a 09 09 69 66 20 5b 20 24 7b  ; then...if [ ${
0fc0: 4f 53 58 7d 20 3d 3d 20 22 4c 65 6f 70 61 72 64  OSX} == "Leopard
0fd0: 22 20 5d 3b 20 74 68 65 6e 0a 09 09 09 41 52 43  " ]; then....ARC
0fe0: 48 3d 22 70 70 63 20 2d 6d 63 70 75 3d 47 34 22  H="ppc -mcpu=G4"
0ff0: 0a 09 09 65 6c 73 65 0a 09 09 09 41 52 43 48 3d  ...else....ARCH=
1000: 22 70 70 63 20 2d 6d 63 70 75 3d 47 33 22 0a 09  "ppc -mcpu=G3"..
1010: 09 66 69 0a 09 66 69 0a 09 69 66 20 5b 20 22 24  .fi..fi..if [ "$
1020: 7b 4c 49 4f 4e 42 55 49 4c 44 7d 22 20 3d 20 31  {LIONBUILD}" = 1
1030: 20 5d 3b 20 74 68 65 6e 0a 09 09 69 66 20 5b 20   ]; then...if [ 
1040: 22 24 7b 41 52 43 48 7d 22 20 3d 3d 20 22 70 70  "${ARCH}" == "pp
1050: 63 20 2d 6d 63 70 75 3d 47 34 22 20 5d 3b 20 74  c -mcpu=G4" ]; t
1060: 68 65 6e 0a 09 09 09 43 43 3d 70 6f 77 65 72 70  hen....CC=powerp
1070: 63 2d 61 70 70 6c 65 2d 64 61 72 77 69 6e 31 31  c-apple-darwin11
1080: 2d 67 63 63 2d 34 2e 32 2e 31 20 43 50 50 3d 70  -gcc-4.2.1 CPP=p
1090: 6f 77 65 72 70 63 2d 61 70 70 6c 65 2d 64 61 72  owerpc-apple-dar
10a0: 77 69 6e 31 31 2d 63 70 70 2d 34 2e 32 2e 31 20  win11-cpp-4.2.1 
10b0: 43 46 4c 41 47 53 3d 22 2d 6d 33 32 20 2d 49 2f  CFLAGS="-m32 -I/
10c0: 44 65 76 65 6c 6f 70 65 72 2f 50 6c 61 74 66 6f  Developer/Platfo
10d0: 72 6d 73 2f 69 50 68 6f 6e 65 4f 53 2e 70 6c 61  rms/iPhoneOS.pla
10e0: 74 66 6f 72 6d 2f 44 65 76 65 6c 6f 70 65 72 2f  tform/Developer/
10f0: 75 73 72 2f 6c 69 62 2f 67 63 63 2f 70 6f 77 65  usr/lib/gcc/powe
1100: 72 70 63 2d 61 70 70 6c 65 2d 64 61 72 77 69 6e  rpc-apple-darwin
1110: 31 30 2f 34 2e 32 2e 31 2f 69 6e 63 6c 75 64 65  10/4.2.1/include
1120: 20 2d 69 73 79 73 72 6f 6f 74 20 2f 44 65 76 65   -isysroot /Deve
1130: 6c 6f 70 65 72 2f 53 44 4b 73 2f 4d 61 63 4f 53  loper/SDKs/MacOS
1140: 58 31 30 2e 35 2e 73 64 6b 22 20 43 50 50 46 4c  X10.5.sdk" CPPFL
1150: 41 47 53 3d 22 2d 44 5f 4c 49 42 43 5f 4c 49 4d  AGS="-D_LIBC_LIM
1160: 49 54 53 5f 48 5f 22 20 2e 2f 63 6f 6e 66 69 67  ITS_H_" ./config
1170: 75 72 65 20 2d 2d 77 69 74 68 2d 70 63 73 63 2d  ure --with-pcsc-
1180: 68 65 61 64 65 72 73 3d 24 7b 48 45 41 44 45 52  headers=${HEADER
1190: 53 7d 20 2d 2d 77 69 74 68 2d 70 63 73 63 2d 6c  S} --with-pcsc-l
11a0: 69 62 73 3d 24 7b 4c 49 42 52 41 52 59 7d 20 2d  ibs=${LIBRARY} -
11b0: 2d 68 6f 73 74 3d 24 7b 48 4f 53 54 7d 20 2d 2d  -host=${HOST} --
11c0: 65 6e 61 62 6c 65 2d 64 6f 64 2d 63 65 72 74 73  enable-dod-certs
11d0: 2d 6f 6e 2d 68 77 2d 73 6c 6f 74 73 0a 09 09 65  -on-hw-slots...e
11e0: 6c 73 65 0a 09 09 09 43 46 4c 41 47 53 3d 22 2d  lse....CFLAGS="-
11f0: 61 72 63 68 20 24 7b 41 52 43 48 7d 22 20 2e 2f  arch ${ARCH}" ./
1200: 63 6f 6e 66 69 67 75 72 65 20 2d 2d 77 69 74 68  configure --with
1210: 2d 70 63 73 63 2d 68 65 61 64 65 72 73 3d 24 7b  -pcsc-headers=${
1220: 48 45 41 44 45 52 53 7d 20 2d 2d 77 69 74 68 2d  HEADERS} --with-
1230: 70 63 73 63 2d 6c 69 62 73 3d 24 7b 4c 49 42 52  pcsc-libs=${LIBR
1240: 41 52 59 7d 20 2d 2d 68 6f 73 74 3d 24 7b 48 4f  ARY} --host=${HO
1250: 53 54 7d 20 2d 2d 65 6e 61 62 6c 65 2d 64 6f 64  ST} --enable-dod
1260: 2d 63 65 72 74 73 2d 6f 6e 2d 68 77 2d 73 6c 6f  -certs-on-hw-slo
1270: 74 73 0a 09 09 66 69 0a 09 65 6c 73 65 0a 09 09  ts...fi..else...
1280: 43 46 4c 41 47 53 3d 22 2d 61 72 63 68 20 24 7b  CFLAGS="-arch ${
1290: 41 52 43 48 7d 22 20 2e 2f 63 6f 6e 66 69 67 75  ARCH}" ./configu
12a0: 72 65 20 2d 2d 77 69 74 68 2d 70 63 73 63 2d 68  re --with-pcsc-h
12b0: 65 61 64 65 72 73 3d 24 7b 48 45 41 44 45 52 53  eaders=${HEADERS
12c0: 7d 20 2d 2d 77 69 74 68 2d 70 63 73 63 2d 6c 69  } --with-pcsc-li
12d0: 62 73 3d 24 7b 4c 49 42 52 41 52 59 7d 20 2d 2d  bs=${LIBRARY} --
12e0: 68 6f 73 74 3d 24 7b 48 4f 53 54 7d 20 2d 2d 65  host=${HOST} --e
12f0: 6e 61 62 6c 65 2d 64 6f 64 2d 63 65 72 74 73 2d  nable-dod-certs-
1300: 6f 6e 2d 68 77 2d 73 6c 6f 74 73 0a 09 66 69 0a  on-hw-slots..fi.
1310: 09 6d 61 6b 65 0a 09 63 70 20 6c 69 62 63 61 63  .make..cp libcac
1320: 6b 65 79 2e 64 79 6c 69 62 20 6d 61 63 62 75 69  key.dylib macbui
1330: 6c 64 2f 24 7b 4f 53 58 7d 2f 6c 69 62 63 61 63  ld/${OSX}/libcac
1340: 6b 65 79 2e 64 79 6c 69 62 2e 60 65 63 68 6f 20  key.dylib.`echo 
1350: 24 7b 41 52 43 48 7d 20 7c 20 63 75 74 20 2d 64  ${ARCH} | cut -d
1360: 20 27 20 27 20 2d 66 20 31 60 0a 09 63 70 20 6c   ' ' -f 1`..cp l
1370: 69 62 63 61 63 6b 65 79 5f 67 2e 64 79 6c 69 62  ibcackey_g.dylib
1380: 20 6d 61 63 62 75 69 6c 64 2f 24 7b 4f 53 58 7d   macbuild/${OSX}
1390: 2f 6c 69 62 63 61 63 6b 65 79 5f 67 2e 64 79 6c  /libcackey_g.dyl
13a0: 69 62 2e 60 65 63 68 6f 20 24 7b 41 52 43 48 7d  ib.`echo ${ARCH}
13b0: 20 7c 20 63 75 74 20 2d 64 20 27 20 27 20 2d 66   | cut -d ' ' -f
13c0: 20 31 60 20 0a 7d 0a 0a 23 20 4c 69 62 72 61 72   1` .}..# Librar
13d0: 79 20 62 75 69 6c 64 20 66 75 6e 63 74 69 6f 6e  y build function
13e0: 0a 6c 69 62 62 75 69 6c 64 28 29 20 7b 0a 09 66  .libbuild() {..f
13f0: 6f 72 20 4c 49 42 20 69 6e 20 6d 61 63 62 75 69  or LIB in macbui
1400: 6c 64 2f 24 7b 4f 53 58 7d 2f 6c 69 62 63 61 63  ld/${OSX}/libcac
1410: 6b 65 79 2e 64 79 6c 69 62 2e 2a 3b 20 64 6f 0a  key.dylib.*; do.
1420: 09 09 41 52 43 48 4c 49 53 54 3d 22 24 7b 41 52  ..ARCHLIST="${AR
1430: 43 48 4c 49 53 54 7d 20 60 65 63 68 6f 20 27 2d  CHLIST} `echo '-
1440: 61 72 63 68 20 27 60 20 60 65 63 68 6f 20 24 7b  arch '` `echo ${
1450: 4c 49 42 7d 20 7c 20 63 75 74 20 2d 64 20 2e 20  LIB} | cut -d . 
1460: 2d 66 20 33 60 20 60 65 63 68 6f 20 27 20 27 60  -f 3` `echo ' '`
1470: 20 60 65 63 68 6f 20 24 7b 4c 49 42 7d 60 22 0a   `echo ${LIB}`".
1480: 09 64 6f 6e 65 0a 09 6c 69 70 6f 20 2d 63 72 65  .done..lipo -cre
1490: 61 74 65 20 24 7b 41 52 43 48 4c 49 53 54 7d 20  ate ${ARCHLIST} 
14a0: 2d 6f 75 74 70 75 74 20 6d 61 63 62 75 69 6c 64  -output macbuild
14b0: 2f 24 7b 4f 53 58 7d 2f 6c 69 62 63 61 63 6b 65  /${OSX}/libcacke
14c0: 79 2e 64 79 6c 69 62 0a 09 66 6f 72 20 44 4c 49  y.dylib..for DLI
14d0: 42 20 69 6e 20 6d 61 63 62 75 69 6c 64 2f 24 7b  B in macbuild/${
14e0: 4f 53 58 7d 2f 6c 69 62 63 61 63 6b 65 79 5f 67  OSX}/libcackey_g
14f0: 2e 64 79 6c 69 62 2e 2a 3b 20 64 6f 0a 09 09 44  .dylib.*; do...D
1500: 41 52 43 48 4c 49 53 54 3d 22 24 7b 44 41 52 43  ARCHLIST="${DARC
1510: 48 4c 49 53 54 7d 20 60 65 63 68 6f 20 27 2d 61  HLIST} `echo '-a
1520: 72 63 68 20 27 60 20 60 65 63 68 6f 20 24 7b 44  rch '` `echo ${D
1530: 4c 49 42 7d 20 7c 20 63 75 74 20 2d 64 20 2e 20  LIB} | cut -d . 
1540: 2d 66 20 33 60 20 60 65 63 68 6f 20 27 20 27 60  -f 3` `echo ' '`
1550: 20 60 65 63 68 6f 20 24 7b 44 4c 49 42 7d 60 22   `echo ${DLIB}`"
1560: 0a 09 64 6f 6e 65 0a 09 6c 69 70 6f 20 2d 63 72  ..done..lipo -cr
1570: 65 61 74 65 20 24 7b 44 41 52 43 48 4c 49 53 54  eate ${DARCHLIST
1580: 7d 20 2d 6f 75 74 70 75 74 20 6d 61 63 62 75 69  } -output macbui
1590: 6c 64 2f 24 7b 4f 53 58 7d 2f 6c 69 62 63 61 63  ld/${OSX}/libcac
15a0: 6b 65 79 5f 67 2e 64 79 6c 69 62 0a 09 72 6d 20  key_g.dylib..rm 
15b0: 6d 61 63 62 75 69 6c 64 2f 24 7b 4f 53 58 7d 2f  macbuild/${OSX}/
15c0: 6c 69 62 63 61 63 6b 65 79 2a 2e 64 79 6c 69 62  libcackey*.dylib
15d0: 2e 2a 0a 7d 0a 0a 23 20 46 75 6e 63 74 69 6f 6e  .*.}..# Function
15e0: 20 74 6f 20 62 75 69 6c 64 20 4d 61 63 20 4f 53   to build Mac OS
15f0: 20 58 20 50 61 63 6b 61 67 65 73 0a 70 6b 67 62   X Packages.pkgb
1600: 75 69 6c 64 28 29 20 7b 0a 09 69 66 20 5b 20 22  uild() {..if [ "
1610: 60 75 6e 61 6d 65 20 2d 72 20 7c 20 63 75 74 20  `uname -r | cut 
1620: 2d 64 20 2e 20 2d 66 20 31 60 22 20 2d 6c 74 20  -d . -f 1`" -lt 
1630: 22 31 30 22 20 5d 3b 20 74 68 65 6e 0a 09 09 4c  "10" ]; then...L
1640: 49 42 43 41 43 4b 45 59 47 3d 6c 69 62 63 61 63  IBCACKEYG=libcac
1650: 6b 65 79 67 2e 70 6b 67 0a 09 65 6c 73 65 0a 09  keyg.pkg..else..
1660: 09 4c 49 42 43 41 43 4b 45 59 47 3d 6c 69 62 63  .LIBCACKEYG=libc
1670: 61 63 6b 65 79 5f 67 2e 70 6b 67 0a 09 66 69 0a  ackey_g.pkg..fi.
1680: 09 72 6d 20 2d 66 20 62 75 69 6c 64 2f 63 61 63  .rm -f build/cac
1690: 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64 2f 63 61  key_osx_build/ca
16a0: 63 6b 65 79 2e 64 79 6c 69 62 0a 09 6c 6e 20 6d  ckey.dylib..ln m
16b0: 61 63 62 75 69 6c 64 2f 24 7b 4f 53 58 7d 2f 6c  acbuild/${OSX}/l
16c0: 69 62 63 61 63 6b 65 79 2e 64 79 6c 69 62 20 62  ibcackey.dylib b
16d0: 75 69 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78 5f  uild/cackey_osx_
16e0: 62 75 69 6c 64 2f 63 61 63 6b 65 79 2e 64 79 6c  build/cackey.dyl
16f0: 69 62 0a 09 72 6d 20 2d 72 66 20 62 75 69 6c 64  ib..rm -rf build
1700: 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c  /cackey_osx_buil
1710: 64 2f 50 4b 43 53 31 31 2e 74 6f 6b 65 6e 64 0a  d/PKCS11.tokend.
1720: 09 69 66 20 5b 20 22 24 7b 4c 49 4f 4e 42 55 49  .if [ "${LIONBUI
1730: 4c 44 7d 22 20 3d 20 31 20 5d 3b 20 74 68 65 6e  LD}" = 1 ]; then
1740: 0a 09 09 54 41 52 3d 67 6e 75 74 61 72 0a 09 65  ...TAR=gnutar..e
1750: 6c 73 65 0a 09 09 54 41 52 3d 74 61 72 0a 09 66  lse...TAR=tar..f
1760: 69 0a 09 69 66 20 5b 20 22 24 7b 4f 53 58 7d 22  i..if [ "${OSX}"
1770: 20 3d 20 22 4c 65 6f 70 61 72 64 22 20 5d 3b 20   = "Leopard" ]; 
1780: 74 68 65 6e 0a 09 09 63 75 72 6c 20 68 74 74 70  then...curl http
1790: 3a 2f 2f 64 65 76 65 6c 2e 6b 76 61 6e 61 6c 73  ://devel.kvanals
17a0: 2e 6f 72 67 2f 50 4b 43 53 31 31 5f 54 6f 6b 65  .org/PKCS11_Toke
17b0: 6e 64 2f 50 4b 43 53 31 31 5f 74 6f 6b 65 6e 64  nd/PKCS11_tokend
17c0: 2d 6c 61 74 65 73 74 2e 74 61 72 2e 67 7a 20 7c  -latest.tar.gz |
17d0: 20 24 7b 54 41 52 7d 20 2d 2d 73 74 72 69 70 2d   ${TAR} --strip-
17e0: 63 6f 6d 70 6f 6e 65 6e 74 73 20 33 20 2d 2d 77  components 3 --w
17f0: 69 6c 64 63 61 72 64 73 20 2d 78 20 2d 7a 20 2d  ildcards -x -z -
1800: 66 20 2d 20 22 50 4b 43 53 31 31 5f 74 6f 6b 65  f - "PKCS11_toke
1810: 6e 64 2d 2a 2f 70 72 65 62 75 69 6c 74 2f 6c 65  nd-*/prebuilt/le
1820: 6f 70 61 72 64 2f 50 4b 43 53 31 31 2e 74 6f 6b  opard/PKCS11.tok
1830: 65 6e 64 22 0a 09 09 6d 76 20 50 4b 43 53 31 31  end"...mv PKCS11
1840: 2e 74 6f 6b 65 6e 64 20 62 75 69 6c 64 2f 63 61  .tokend build/ca
1850: 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64 2f 50  ckey_osx_build/P
1860: 4b 43 53 31 31 2e 74 6f 6b 65 6e 64 0a 09 65 6c  KCS11.tokend..el
1870: 73 65 0a 09 09 63 75 72 6c 20 68 74 74 70 3a 2f  se...curl http:/
1880: 2f 64 65 76 65 6c 2e 6b 76 61 6e 61 6c 73 2e 6f  /devel.kvanals.o
1890: 72 67 2f 50 4b 43 53 31 31 5f 54 6f 6b 65 6e 64  rg/PKCS11_Tokend
18a0: 2f 50 4b 43 53 31 31 5f 74 6f 6b 65 6e 64 2d 6c  /PKCS11_tokend-l
18b0: 61 74 65 73 74 2e 74 61 72 2e 67 7a 20 7c 20 24  atest.tar.gz | $
18c0: 7b 54 41 52 7d 20 2d 2d 73 74 72 69 70 2d 63 6f  {TAR} --strip-co
18d0: 6d 70 6f 6e 65 6e 74 73 20 33 20 2d 2d 77 69 6c  mponents 3 --wil
18e0: 64 63 61 72 64 73 20 2d 78 20 2d 7a 20 2d 66 20  dcards -x -z -f 
18f0: 2d 20 22 50 4b 43 53 31 31 5f 74 6f 6b 65 6e 64  - "PKCS11_tokend
1900: 2d 2a 2f 70 72 65 62 75 69 6c 74 2f 73 6e 6f 77  -*/prebuilt/snow
1910: 6c 65 6f 70 61 72 64 2f 50 4b 43 53 31 31 2e 74  leopard/PKCS11.t
1920: 6f 6b 65 6e 64 22 0a 09 09 6d 76 20 50 4b 43 53  okend"...mv PKCS
1930: 31 31 2e 74 6f 6b 65 6e 64 20 62 75 69 6c 64 2f  11.tokend build/
1940: 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64  cackey_osx_build
1950: 2f 50 4b 43 53 31 31 2e 74 6f 6b 65 6e 64 0a 09  /PKCS11.tokend..
1960: 66 69 0a 09 66 6f 72 20 50 4d 44 4f 43 20 69 6e  fi..for PMDOC in
1970: 20 62 75 69 6c 64 2f 63 61 63 6b 65 79 5f 6f 73   build/cackey_os
1980: 78 5f 62 75 69 6c 64 2f 54 65 6d 70 6c 61 74 65  x_build/Template
1990: 5f 70 6d 62 75 69 6c 64 2f 2a 2e 69 6e 3b 20 64  _pmbuild/*.in; d
19a0: 6f 0a 09 09 50 4d 44 4f 43 3d 22 60 65 63 68 6f  o...PMDOC="`echo
19b0: 20 22 24 7b 50 4d 44 4f 43 7d 22 20 7c 20 73 65   "${PMDOC}" | se
19c0: 64 20 27 73 7c 6c 2e 69 6e 7c 6c 7c 67 27 20 7c  d 's|l.in|l|g' |
19d0: 20 73 65 64 20 27 73 7c 62 75 69 6c 64 2f 63 61   sed 's|build/ca
19e0: 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64 2f 54  ckey_osx_build/T
19f0: 65 6d 70 6c 61 74 65 5f 70 6d 62 75 69 6c 64 2f  emplate_pmbuild/
1a00: 7c 7c 67 27 60 22 0a 09 09 55 55 49 44 3d 22 60  ||g'`"...UUID="`
1a10: 70 79 74 68 6f 6e 20 2d 63 20 27 69 6d 70 6f 72  python -c 'impor
1a20: 74 20 75 75 69 64 3b 20 70 72 69 6e 74 20 75 75  t uuid; print uu
1a30: 69 64 2e 75 75 69 64 31 28 29 27 20 7c 20 64 64  id.uuid1()' | dd
1a40: 20 63 6f 6e 76 3d 75 63 61 73 65 20 32 3e 2f 64   conv=ucase 2>/d
1a50: 65 76 2f 6e 75 6c 6c 60 22 0a 09 09 6d 6b 64 69  ev/null`"...mkdi
1a60: 72 20 2d 70 20 62 75 69 6c 64 2f 63 61 63 6b 65  r -p build/cacke
1a70: 79 5f 6f 73 78 5f 62 75 69 6c 64 2f 24 7b 4f 53  y_osx_build/${OS
1a80: 58 7d 5f 70 6d 62 75 69 6c 64 2e 70 6d 64 6f 63  X}_pmbuild.pmdoc
1a90: 0a 09 09 73 65 64 20 22 73 7c 40 40 42 55 49 4c  ...sed "s|@@BUIL
1aa0: 44 52 4f 4f 54 44 49 52 40 40 7c 24 28 70 77 64  DROOTDIR@@|$(pwd
1ab0: 29 7c 67 22 20 62 75 69 6c 64 2f 63 61 63 6b 65  )|g" build/cacke
1ac0: 79 5f 6f 73 78 5f 62 75 69 6c 64 2f 54 65 6d 70  y_osx_build/Temp
1ad0: 6c 61 74 65 5f 70 6d 62 75 69 6c 64 2f 24 7b 50  late_pmbuild/${P
1ae0: 4d 44 4f 43 7d 2e 69 6e 20 3e 20 62 75 69 6c 64  MDOC}.in > build
1af0: 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c  /cackey_osx_buil
1b00: 64 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75 69 6c 64  d/${OSX}_pmbuild
1b10: 2e 70 6d 64 6f 63 2f 24 7b 50 4d 44 4f 43 7d 0a  .pmdoc/${PMDOC}.
1b20: 09 09 73 65 64 20 22 73 7c 40 40 4f 53 58 56 45  ..sed "s|@@OSXVE
1b30: 52 53 49 4f 4e 40 40 7c 24 7b 4f 53 58 7d 7c 67  RSION@@|${OSX}|g
1b40: 22 20 62 75 69 6c 64 2f 63 61 63 6b 65 79 5f 6f  " build/cackey_o
1b50: 73 78 5f 62 75 69 6c 64 2f 24 7b 4f 53 58 7d 5f  sx_build/${OSX}_
1b60: 70 6d 62 75 69 6c 64 2e 70 6d 64 6f 63 2f 24 7b  pmbuild.pmdoc/${
1b70: 50 4d 44 4f 43 7d 20 3e 20 62 75 69 6c 64 2f 63  PMDOC} > build/c
1b80: 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64 2f  ackey_osx_build/
1b90: 24 7b 4f 53 58 7d 5f 70 6d 62 75 69 6c 64 2e 70  ${OSX}_pmbuild.p
1ba0: 6d 64 6f 63 2f 24 7b 50 4d 44 4f 43 7d 2e 31 0a  mdoc/${PMDOC}.1.
1bb0: 09 09 73 65 64 20 22 73 7c 40 40 55 55 49 44 40  ..sed "s|@@UUID@
1bc0: 40 7c 24 7b 55 55 49 44 7d 7c 67 22 20 62 75 69  @|${UUID}|g" bui
1bd0: 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75  ld/cackey_osx_bu
1be0: 69 6c 64 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75 69  ild/${OSX}_pmbui
1bf0: 6c 64 2e 70 6d 64 6f 63 2f 24 7b 50 4d 44 4f 43  ld.pmdoc/${PMDOC
1c00: 7d 2e 31 20 3e 20 62 75 69 6c 64 2f 63 61 63 6b  }.1 > build/cack
1c10: 65 79 5f 6f 73 78 5f 62 75 69 6c 64 2f 24 7b 4f  ey_osx_build/${O
1c20: 53 58 7d 5f 70 6d 62 75 69 6c 64 2e 70 6d 64 6f  SX}_pmbuild.pmdo
1c30: 63 2f 24 7b 50 4d 44 4f 43 7d 0a 09 09 73 65 64  c/${PMDOC}...sed
1c40: 20 22 73 7c 40 40 54 41 52 47 45 54 4f 53 40 40   "s|@@TARGETOS@@
1c50: 7c 24 7b 50 4b 54 41 52 47 45 54 4f 53 7d 7c 67  |${PKTARGETOS}|g
1c60: 22 20 62 75 69 6c 64 2f 63 61 63 6b 65 79 5f 6f  " build/cackey_o
1c70: 73 78 5f 62 75 69 6c 64 2f 24 7b 4f 53 58 7d 5f  sx_build/${OSX}_
1c80: 70 6d 62 75 69 6c 64 2e 70 6d 64 6f 63 2f 24 7b  pmbuild.pmdoc/${
1c90: 50 4d 44 4f 43 7d 20 3e 20 62 75 69 6c 64 2f 63  PMDOC} > 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 2e 31 0a  mdoc/${PMDOC}.1.
1cd0: 09 09 73 65 64 20 22 73 7c 40 40 54 48 49 53 4f  ..sed "s|@@THISO
1ce0: 53 58 56 45 52 40 40 7c 24 7b 54 48 49 53 4f 53  SXVER@@|${THISOS
1cf0: 58 56 45 52 7d 7c 67 22 20 62 75 69 6c 64 2f 63  XVER}|g" build/c
1d00: 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64 2f  ackey_osx_build/
1d10: 24 7b 4f 53 58 7d 5f 70 6d 62 75 69 6c 64 2e 70  ${OSX}_pmbuild.p
1d20: 6d 64 6f 63 2f 24 7b 50 4d 44 4f 43 7d 2e 31 20  mdoc/${PMDOC}.1 
1d30: 3e 20 62 75 69 6c 64 2f 63 61 63 6b 65 79 5f 6f  > build/cackey_o
1d40: 73 78 5f 62 75 69 6c 64 2f 24 7b 4f 53 58 7d 5f  sx_build/${OSX}_
1d50: 70 6d 62 75 69 6c 64 2e 70 6d 64 6f 63 2f 24 7b  pmbuild.pmdoc/${
1d60: 50 4d 44 4f 43 7d 0a 09 09 73 65 64 20 22 73 7c  PMDOC}...sed "s|
1d70: 40 40 43 55 52 4f 53 58 56 45 52 40 40 7c 24 7b  @@CUROSXVER@@|${
1d80: 43 55 52 4f 53 58 56 45 52 7d 7c 67 22 20 62 75  CUROSXVER}|g" bu
1d90: 69 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62  ild/cackey_osx_b
1da0: 75 69 6c 64 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75  uild/${OSX}_pmbu
1db0: 69 6c 64 2e 70 6d 64 6f 63 2f 24 7b 50 4d 44 4f  ild.pmdoc/${PMDO
1dc0: 43 7d 20 3e 20 62 75 69 6c 64 2f 63 61 63 6b 65  C} > build/cacke
1dd0: 79 5f 6f 73 78 5f 62 75 69 6c 64 2f 24 7b 4f 53  y_osx_build/${OS
1de0: 58 7d 5f 70 6d 62 75 69 6c 64 2e 70 6d 64 6f 63  X}_pmbuild.pmdoc
1df0: 2f 24 7b 50 4d 44 4f 43 7d 2e 31 0a 09 09 73 65  /${PMDOC}.1...se
1e00: 64 20 22 73 7c 40 40 4c 49 42 43 41 43 4b 45 59  d "s|@@LIBCACKEY
1e10: 47 40 40 7c 24 7b 4c 49 42 43 41 43 4b 45 59 47  G@@|${LIBCACKEYG
1e20: 7d 7c 67 22 20 62 75 69 6c 64 2f 63 61 63 6b 65  }|g" build/cacke
1e30: 79 5f 6f 73 78 5f 62 75 69 6c 64 2f 24 7b 4f 53  y_osx_build/${OS
1e40: 58 7d 5f 70 6d 62 75 69 6c 64 2e 70 6d 64 6f 63  X}_pmbuild.pmdoc
1e50: 2f 24 7b 50 4d 44 4f 43 7d 2e 31 20 3e 20 62 75  /${PMDOC}.1 > bu
1e60: 69 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62  ild/cackey_osx_b
1e70: 75 69 6c 64 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75  uild/${OSX}_pmbu
1e80: 69 6c 64 2e 70 6d 64 6f 63 2f 24 7b 50 4d 44 4f  ild.pmdoc/${PMDO
1e90: 43 7d 0a 09 09 63 70 20 62 75 69 6c 64 2f 63 61  C}...cp build/ca
1ea0: 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64 2f 24  ckey_osx_build/$
1eb0: 7b 4f 53 58 7d 5f 70 6d 62 75 69 6c 64 2e 70 6d  {OSX}_pmbuild.pm
1ec0: 64 6f 63 2f 24 7b 50 4d 44 4f 43 7d 20 62 75 69  doc/${PMDOC} bui
1ed0: 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75  ld/cackey_osx_bu
1ee0: 69 6c 64 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75 69  ild/${OSX}_pmbui
1ef0: 6c 64 2e 70 6d 64 6f 63 2f 24 7b 50 4d 44 4f 43  ld.pmdoc/${PMDOC
1f00: 7d 2e 31 0a 09 09 6d 76 20 62 75 69 6c 64 2f 63  }.1...mv build/c
1f10: 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64 2f  ackey_osx_build/
1f20: 24 7b 4f 53 58 7d 5f 70 6d 62 75 69 6c 64 2e 70  ${OSX}_pmbuild.p
1f30: 6d 64 6f 63 2f 24 7b 50 4d 44 4f 43 7d 2e 31 20  mdoc/${PMDOC}.1 
1f40: 62 75 69 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78  build/cackey_osx
1f50: 5f 62 75 69 6c 64 2f 24 7b 4f 53 58 7d 5f 70 6d  _build/${OSX}_pm
1f60: 62 75 69 6c 64 2e 70 6d 64 6f 63 2f 24 7b 50 4d  build.pmdoc/${PM
1f70: 44 4f 43 7d 0a 09 64 6f 6e 65 0a 09 45 58 54 3d  DOC}..done..EXT=
1f80: 70 6b 67 0a 09 69 66 20 5b 20 24 7b 4f 53 58 7d  pkg..if [ ${OSX}
1f90: 20 3d 3d 20 22 53 6e 6f 77 6c 65 6f 70 61 72 64   == "Snowleopard
1fa0: 22 20 5d 3b 20 74 68 65 6e 0a 09 09 63 61 74 20  " ]; then...cat 
1fb0: 62 75 69 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78  build/cackey_osx
1fc0: 5f 62 75 69 6c 64 2f 24 7b 4f 53 58 7d 5f 70 6d  _build/${OSX}_pm
1fd0: 62 75 69 6c 64 2e 70 6d 64 6f 63 2f 69 6e 64 65  build.pmdoc/inde
1fe0: 78 2e 78 6d 6c 20 7c 20 73 65 64 20 27 73 7c 66  x.xml | sed 's|f
1ff0: 6f 72 20 4d 61 63 20 4f 53 20 58 20 53 6e 6f 77  or Mac OS X Snow
2000: 6c 65 6f 70 61 72 64 7c 66 6f 72 20 4d 61 63 20  leopard|for Mac 
2010: 4f 53 20 58 20 53 6e 6f 77 4c 65 6f 70 61 72 64  OS X SnowLeopard
2020: 7c 67 27 20 3e 20 62 75 69 6c 64 2f 63 61 63 6b  |g' > build/cack
2030: 65 79 5f 6f 73 78 5f 62 75 69 6c 64 2f 24 7b 4f  ey_osx_build/${O
2040: 53 58 7d 5f 70 6d 62 75 69 6c 64 2e 70 6d 64 6f  SX}_pmbuild.pmdo
2050: 63 2f 69 6e 64 65 78 2e 78 6d 6c 2e 6e 65 77 0a  c/index.xml.new.
2060: 09 09 6d 76 20 62 75 69 6c 64 2f 63 61 63 6b 65  ..mv build/cacke
2070: 79 5f 6f 73 78 5f 62 75 69 6c 64 2f 24 7b 4f 53  y_osx_build/${OS
2080: 58 7d 5f 70 6d 62 75 69 6c 64 2e 70 6d 64 6f 63  X}_pmbuild.pmdoc
2090: 2f 69 6e 64 65 78 2e 78 6d 6c 2e 6e 65 77 20 62  /index.xml.new b
20a0: 75 69 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78 5f  uild/cackey_osx_
20b0: 62 75 69 6c 64 2f 24 7b 4f 53 58 7d 5f 70 6d 62  build/${OSX}_pmb
20c0: 75 69 6c 64 2e 70 6d 64 6f 63 2f 69 6e 64 65 78  uild.pmdoc/index
20d0: 2e 78 6d 6c 0a 09 66 69 0a 09 69 66 20 5b 20 24  .xml..fi..if [ $
20e0: 7b 4f 53 58 7d 20 3d 3d 20 22 53 6c 74 6f 6d 61  {OSX} == "Sltoma
20f0: 76 22 20 5d 3b 20 74 68 65 6e 0a 09 09 63 61 74  v" ]; then...cat
2100: 20 62 75 69 6c 64 2f 63 61 63 6b 65 79 5f 6f 73   build/cackey_os
2110: 78 5f 62 75 69 6c 64 2f 24 7b 4f 53 58 7d 5f 70  x_build/${OSX}_p
2120: 6d 62 75 69 6c 64 2e 70 6d 64 6f 63 2f 69 6e 64  mbuild.pmdoc/ind
2130: 65 78 2e 78 6d 6c 20 7c 20 73 65 64 20 27 73 7c  ex.xml | sed 's|
2140: 66 6f 72 20 4d 61 63 20 4f 53 20 58 20 53 6c 74  for Mac OS X Slt
2150: 6f 6d 61 76 7c 66 6f 72 20 4d 61 63 20 4f 53 20  omav|for Mac OS 
2160: 58 20 53 4c 74 6f 4d 61 76 7c 67 27 20 3e 20 62  X SLtoMav|g' > b
2170: 75 69 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78 5f  uild/cackey_osx_
2180: 62 75 69 6c 64 2f 24 7b 4f 53 58 7d 5f 70 6d 62  build/${OSX}_pmb
2190: 75 69 6c 64 2e 70 6d 64 6f 63 2f 69 6e 64 65 78  uild.pmdoc/index
21a0: 2e 78 6d 6c 2e 6e 65 77 0a 09 09 6d 76 20 62 75  .xml.new...mv bu
21b0: 69 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62  ild/cackey_osx_b
21c0: 75 69 6c 64 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75  uild/${OSX}_pmbu
21d0: 69 6c 64 2e 70 6d 64 6f 63 2f 69 6e 64 65 78 2e  ild.pmdoc/index.
21e0: 78 6d 6c 2e 6e 65 77 20 62 75 69 6c 64 2f 63 61  xml.new build/ca
21f0: 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64 2f 24  ckey_osx_build/$
2200: 7b 4f 53 58 7d 5f 70 6d 62 75 69 6c 64 2e 70 6d  {OSX}_pmbuild.pm
2210: 64 6f 63 2f 69 6e 64 65 78 2e 78 6d 6c 0a 09 66  doc/index.xml..f
2220: 69 0a 09 2f 44 65 76 65 6c 6f 70 65 72 2f 41 70  i../Developer/Ap
2230: 70 6c 69 63 61 74 69 6f 6e 73 2f 55 74 69 6c 69  plications/Utili
2240: 74 69 65 73 2f 50 61 63 6b 61 67 65 4d 61 6b 65  ties/PackageMake
2250: 72 2e 61 70 70 2f 43 6f 6e 74 65 6e 74 73 2f 4d  r.app/Contents/M
2260: 61 63 4f 53 2f 50 61 63 6b 61 67 65 4d 61 6b 65  acOS/PackageMake
2270: 72 20 2d 64 20 62 75 69 6c 64 2f 63 61 63 6b 65  r -d build/cacke
2280: 79 5f 6f 73 78 5f 62 75 69 6c 64 2f 24 7b 4f 53  y_osx_build/${OS
2290: 58 7d 5f 70 6d 62 75 69 6c 64 2e 70 6d 64 6f 63  X}_pmbuild.pmdoc
22a0: 20 2d 6f 20 6d 61 63 62 75 69 6c 64 2f 70 6b 67   -o macbuild/pkg
22b0: 2f 43 41 43 4b 65 79 5f 24 7b 43 41 43 4b 45 59  /CACKey_${CACKEY
22c0: 5f 56 45 52 53 49 4f 4e 7d 5f 24 7b 4f 53 58 7d  _VERSION}_${OSX}
22d0: 2e 24 7b 45 58 54 7d 0a 09 74 61 72 20 2d 2d 63  .${EXT}..tar --c
22e0: 72 65 61 74 65 20 2d 2d 64 69 72 65 63 74 6f 72  reate --director
22f0: 79 20 6d 61 63 62 75 69 6c 64 2f 70 6b 67 2f 20  y macbuild/pkg/ 
2300: 2d 2d 66 69 6c 65 20 6d 61 63 62 75 69 6c 64 2f  --file macbuild/
2310: 70 6b 67 2f 43 41 43 4b 65 79 5f 24 7b 43 41 43  pkg/CACKey_${CAC
2320: 4b 45 59 5f 56 45 52 53 49 4f 4e 7d 5f 24 7b 4f  KEY_VERSION}_${O
2330: 53 58 7d 2e 24 7b 45 58 54 7d 2e 74 61 72 20 43  SX}.${EXT}.tar C
2340: 41 43 4b 65 79 5f 24 7b 43 41 43 4b 45 59 5f 56  ACKey_${CACKEY_V
2350: 45 52 53 49 4f 4e 7d 5f 24 7b 4f 53 58 7d 2e 24  ERSION}_${OSX}.$
2360: 7b 45 58 54 7d 0a 09 67 7a 69 70 20 2d 39 20 6d  {EXT}..gzip -9 m
2370: 61 63 62 75 69 6c 64 2f 70 6b 67 2f 43 41 43 4b  acbuild/pkg/CACK
2380: 65 79 5f 24 7b 43 41 43 4b 45 59 5f 56 45 52 53  ey_${CACKEY_VERS
2390: 49 4f 4e 7d 5f 24 7b 4f 53 58 7d 2e 24 7b 45 58  ION}_${OSX}.${EX
23a0: 54 7d 2e 74 61 72 0a 09 72 6d 20 2d 72 66 20 6d  T}.tar..rm -rf m
23b0: 61 63 62 75 69 6c 64 2f 70 6b 67 2f 43 41 43 4b  acbuild/pkg/CACK
23c0: 65 79 5f 24 7b 43 41 43 4b 45 59 5f 56 45 52 53  ey_${CACKEY_VERS
23d0: 49 4f 4e 7d 5f 24 7b 4f 53 58 7d 2e 24 7b 45 58  ION}_${OSX}.${EX
23e0: 54 7d 0a 09 72 6d 20 2d 66 20 62 75 69 6c 64 2f  T}..rm -f build/
23f0: 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64  cackey_osx_build
2400: 2f 63 61 63 6b 65 79 2e 64 79 6c 69 62 0a 09 72  /cackey.dylib..r
2410: 6d 20 2d 72 66 20 62 75 69 6c 64 2f 63 61 63 6b  m -rf build/cack
2420: 65 79 5f 6f 73 78 5f 62 75 69 6c 64 2f 50 4b 43  ey_osx_build/PKC
2430: 53 31 31 2e 74 6f 6b 65 6e 64 0a 09 65 63 68 6f  S11.tokend..echo
2440: 20 22 24 7b 4f 53 58 7d 20 62 75 69 6c 64 20 63   "${OSX} build c
2450: 6f 6d 70 6c 65 74 65 22 0a 7d 0a 0a 23 20 54 61  omplete".}..# Ta
2460: 6b 65 20 63 6f 6d 6d 61 6e 64 20 6c 69 6e 65 20  ke command line 
2470: 61 72 67 75 6d 65 6e 74 73 20 61 6e 64 20 65 78  arguments and ex
2480: 65 63 75 74 65 0a 63 61 73 65 20 22 24 31 22 20  ecute.case "$1" 
2490: 69 6e 0a 09 22 22 29 0a 09 09 75 73 61 67 65 0a  in.."")...usage.
24a0: 09 09 65 78 69 74 20 24 3f 0a 09 3b 3b 0a 0a 09  ..exit $?..;;...
24b0: 22 6c 65 6f 70 61 72 64 22 29 0a 09 09 2e 2f 61  "leopard")..../a
24c0: 75 74 6f 67 65 6e 2e 73 68 0a 09 09 6c 65 6f 70  utogen.sh...leop
24d0: 61 72 64 0a 09 09 65 78 69 74 20 24 3f 0a 09 3b  ard...exit $?..;
24e0: 3b 0a 0a 09 22 73 6e 6f 77 6c 65 6f 70 61 72 64  ;..."snowleopard
24f0: 22 29 0a 09 09 2e 2f 61 75 74 6f 67 65 6e 2e 73  ")..../autogen.s
2500: 68 0a 09 09 73 6e 6f 77 6c 65 6f 70 61 72 64 0a  h...snowleopard.
2510: 09 09 65 78 69 74 20 24 3f 0a 09 3b 3b 0a 09 0a  ..exit $?..;;...
2520: 09 22 6c 69 6f 6e 22 29 0a 09 09 2e 2f 61 75 74  ."lion")..../aut
2530: 6f 67 65 6e 2e 73 68 0a 09 09 6c 69 6f 6e 0a 09  ogen.sh...lion..
2540: 09 65 78 69 74 20 24 3f 0a 09 3b 3b 0a 09 0a 09  .exit $?..;;....
2550: 22 73 6c 74 6f 6d 61 76 22 29 0a 09 09 2e 2f 61  "sltomav")..../a
2560: 75 74 6f 67 65 6e 2e 73 68 0a 09 09 73 6c 74 6f  utogen.sh...slto
2570: 6d 61 76 0a 09 09 65 78 69 74 20 24 3f 0a 09 3b  mav...exit $?..;
2580: 3b 0a 0a 09 22 61 6c 6c 22 29 0a 09 09 2e 2f 61  ;..."all")..../a
2590: 75 74 6f 67 65 6e 2e 73 68 0a 09 09 6c 65 6f 70  utogen.sh...leop
25a0: 61 72 64 0a 09 09 73 6c 74 6f 6d 61 76 0a 09 09  ard...sltomav...
25b0: 65 63 68 6f 20 22 22 0a 09 09 65 63 68 6f 20 22  echo ""...echo "
25c0: 41 6c 6c 20 62 75 69 6c 64 73 20 63 6f 6d 70 6c  All builds compl
25d0: 65 74 65 2e 22 0a 09 09 65 78 69 74 20 24 3f 0a  ete."...exit $?.
25e0: 09 3b 3b 0a 0a 09 22 63 6c 65 61 6e 22 29 0a 09  .;;..."clean")..
25f0: 09 63 6c 65 61 6e 0a 09 09 65 78 69 74 20 24 3f  .clean...exit $?
2600: 0a 09 3b 3b 0a 0a 09 2a 29 0a 09 09 75 73 61 67  ..;;...*)...usag
2610: 65 0a 09 09 65 78 69 74 20 24 3f 0a 09 3b 3b 0a  e...exit $?..;;.
2620: 65 73 61 63 20 0a                                esac .