Hex Artifact Content

Artifact 361c9900ba18804e5846b6663765913ac42047df:


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 43 55 52 4f 53 58 56 45 52 3d 31 30 2e 35  ..CUROSXVER=10.5
07a0: 0a 09 66 6f 72 20 48 4f 53 54 20 69 6e 20 70 6f  ..for HOST in po
07b0: 77 65 72 70 63 2d 61 70 70 6c 65 2d 64 61 72 77  werpc-apple-darw
07c0: 69 6e 39 20 69 33 38 36 2d 61 70 70 6c 65 2d 64  in9 i386-apple-d
07d0: 61 72 77 69 6e 39 3b 20 64 6f 0a 09 09 67 65 6e  arwin9; do...gen
07e0: 62 75 69 6c 64 0a 09 64 6f 6e 65 0a 09 6c 69 62  build..done..lib
07f0: 62 75 69 6c 64 0a 09 70 6b 67 62 75 69 6c 64 0a  build..pkgbuild.
0800: 7d 0a 0a 23 20 42 75 69 6c 64 20 66 75 6e 63 74  }..# Build funct
0810: 69 6f 6e 20 66 6f 72 20 53 6e 6f 77 20 4c 65 6f  ion for Snow Leo
0820: 70 61 72 64 0a 73 6e 6f 77 6c 65 6f 70 61 72 64  pard.snowleopard
0830: 28 29 20 7b 0a 09 6d 61 6b 65 64 69 72 0a 09 48  () {..makedir..H
0840: 45 41 44 45 52 53 3d 2f 44 65 76 65 6c 6f 70 65  EADERS=/Develope
0850: 72 2f 53 44 4b 73 2f 4d 61 63 4f 53 58 31 30 2e  r/SDKs/MacOSX10.
0860: 36 2e 73 64 6b 2f 53 79 73 74 65 6d 2f 4c 69 62  6.sdk/System/Lib
0870: 72 61 72 79 2f 46 72 61 6d 65 77 6f 72 6b 73 2f  rary/Frameworks/
0880: 50 43 53 43 2e 66 72 61 6d 65 77 6f 72 6b 2f 56  PCSC.framework/V
0890: 65 72 73 69 6f 6e 73 2f 41 2f 48 65 61 64 65 72  ersions/A/Header
08a0: 73 2f 0a 09 4c 49 42 52 41 52 59 3d 2f 44 65 76  s/..LIBRARY=/Dev
08b0: 65 6c 6f 70 65 72 2f 53 44 4b 73 2f 4d 61 63 4f  eloper/SDKs/MacO
08c0: 53 58 31 30 2e 36 2e 73 64 6b 2f 53 79 73 74 65  SX10.6.sdk/Syste
08d0: 6d 2f 4c 69 62 72 61 72 79 2f 46 72 61 6d 65 77  m/Library/Framew
08e0: 6f 72 6b 73 2f 50 43 53 43 2e 66 72 61 6d 65 77  orks/PCSC.framew
08f0: 6f 72 6b 2f 50 43 53 43 0a 09 4c 49 42 3d 22 22  ork/PCSC..LIB=""
0900: 0a 09 41 52 43 48 4c 49 53 54 3d 22 22 0a 09 44  ..ARCHLIST=""..D
0910: 4c 49 42 3d 22 22 0a 09 44 41 52 43 48 4c 49 53  LIB=""..DARCHLIS
0920: 54 3d 22 22 0a 09 4f 53 58 3d 53 6e 6f 77 6c 65  T=""..OSX=Snowle
0930: 6f 70 61 72 64 0a 09 50 4b 54 41 52 47 45 54 4f  opard..PKTARGETO
0940: 53 3d 33 0a 09 43 55 52 4f 53 58 56 45 52 3d 31  S=3..CUROSXVER=1
0950: 30 2e 36 0a 09 66 6f 72 20 48 4f 53 54 20 69 6e  0.6..for HOST in
0960: 20 69 33 38 36 2d 61 70 70 6c 65 2d 64 61 72 77   i386-apple-darw
0970: 69 6e 31 30 20 78 38 36 5f 36 34 2d 61 70 70 6c  in10 x86_64-appl
0980: 65 2d 64 61 72 77 69 6e 31 30 3b 20 64 6f 0a 09  e-darwin10; do..
0990: 09 67 65 6e 62 75 69 6c 64 0a 09 64 6f 6e 65 0a  .genbuild..done.
09a0: 09 6c 69 62 62 75 69 6c 64 0a 09 70 6b 67 62 75  .libbuild..pkgbu
09b0: 69 6c 64 0a 7d 0a 0a 23 20 42 75 69 6c 64 20 66  ild.}..# Build f
09c0: 75 6e 63 74 69 6f 6e 20 66 6f 72 20 4c 69 6f 6e  unction for Lion
09d0: 0a 6c 69 6f 6e 28 29 20 7b 0a 09 6d 61 6b 65 64  .lion() {..maked
09e0: 69 72 0a 09 48 45 41 44 45 52 53 3d 2f 44 65 76  ir..HEADERS=/Dev
09f0: 65 6c 6f 70 65 72 2f 53 44 4b 73 2f 4d 61 63 4f  eloper/SDKs/MacO
0a00: 53 58 31 30 2e 37 2e 73 64 6b 2f 53 79 73 74 65  SX10.7.sdk/Syste
0a10: 6d 2f 4c 69 62 72 61 72 79 2f 46 72 61 6d 65 77  m/Library/Framew
0a20: 6f 72 6b 73 2f 50 43 53 43 2e 66 72 61 6d 65 77  orks/PCSC.framew
0a30: 6f 72 6b 2f 56 65 72 73 69 6f 6e 73 2f 41 2f 48  ork/Versions/A/H
0a40: 65 61 64 65 72 73 2f 0a 09 4c 49 42 52 41 52 59  eaders/..LIBRARY
0a50: 3d 2f 44 65 76 65 6c 6f 70 65 72 2f 53 44 4b 73  =/Developer/SDKs
0a60: 2f 4d 61 63 4f 53 58 31 30 2e 37 2e 73 64 6b 2f  /MacOSX10.7.sdk/
0a70: 53 79 73 74 65 6d 2f 4c 69 62 72 61 72 79 2f 46  System/Library/F
0a80: 72 61 6d 65 77 6f 72 6b 73 2f 50 43 53 43 2e 66  rameworks/PCSC.f
0a90: 72 61 6d 65 77 6f 72 6b 2f 50 43 53 43 0a 09 4c  ramework/PCSC..L
0aa0: 49 42 3d 22 22 0a 09 41 52 43 48 4c 49 53 54 3d  IB=""..ARCHLIST=
0ab0: 22 22 0a 09 44 4c 49 42 3d 22 22 0a 09 44 41 52  ""..DLIB=""..DAR
0ac0: 43 48 4c 49 53 54 3d 22 22 0a 09 4f 53 58 3d 4c  CHLIST=""..OSX=L
0ad0: 69 6f 6e 0a 09 50 4b 54 41 52 47 45 54 4f 53 3d  ion..PKTARGETOS=
0ae0: 33 0a 09 43 55 52 4f 53 58 56 45 52 3d 31 30 2e  3..CUROSXVER=10.
0af0: 37 0a 09 66 6f 72 20 48 4f 53 54 20 69 6e 20 69  7..for HOST in i
0b00: 33 38 36 2d 61 70 70 6c 65 2d 64 61 72 77 69 6e  386-apple-darwin
0b10: 31 31 20 78 38 36 5f 36 34 2d 61 70 70 6c 65 2d  11 x86_64-apple-
0b20: 64 61 72 77 69 6e 31 31 3b 20 64 6f 0a 09 09 67  darwin11; do...g
0b30: 65 6e 62 75 69 6c 64 0a 09 64 6f 6e 65 0a 09 6c  enbuild..done..l
0b40: 69 62 62 75 69 6c 64 0a 09 70 6b 67 62 75 69 6c  ibbuild..pkgbuil
0b50: 64 0a 7d 0a 0a 23 20 42 75 69 6c 64 20 66 75 6e  d.}..# Build fun
0b60: 63 74 69 6f 6e 20 66 6f 72 20 53 6e 6f 77 20 4c  ction for Snow L
0b70: 65 6f 70 61 72 64 2f 4c 69 6f 6e 2f 4d 6f 75 6e  eopard/Lion/Moun
0b80: 74 61 69 6e 20 4c 69 6f 6e 0a 73 6c 74 6f 6d 61  tain Lion.sltoma
0b90: 76 28 29 20 7b 0a 09 6d 61 6b 65 64 69 72 0a 09  v() {..makedir..
0ba0: 48 45 41 44 45 52 53 3d 2f 44 65 76 65 6c 6f 70  HEADERS=/Develop
0bb0: 65 72 2f 53 44 4b 73 2f 4d 61 63 4f 53 58 31 30  er/SDKs/MacOSX10
0bc0: 2e 36 2e 73 64 6b 2f 53 79 73 74 65 6d 2f 4c 69  .6.sdk/System/Li
0bd0: 62 72 61 72 79 2f 46 72 61 6d 65 77 6f 72 6b 73  brary/Frameworks
0be0: 2f 50 43 53 43 2e 66 72 61 6d 65 77 6f 72 6b 2f  /PCSC.framework/
0bf0: 56 65 72 73 69 6f 6e 73 2f 41 2f 48 65 61 64 65  Versions/A/Heade
0c00: 72 73 2f 0a 09 4c 49 42 52 41 52 59 3d 2f 44 65  rs/..LIBRARY=/De
0c10: 76 65 6c 6f 70 65 72 2f 53 44 4b 73 2f 4d 61 63  veloper/SDKs/Mac
0c20: 4f 53 58 31 30 2e 36 2e 73 64 6b 2f 53 79 73 74  OSX10.6.sdk/Syst
0c30: 65 6d 2f 4c 69 62 72 61 72 79 2f 46 72 61 6d 65  em/Library/Frame
0c40: 77 6f 72 6b 73 2f 50 43 53 43 2e 66 72 61 6d 65  works/PCSC.frame
0c50: 77 6f 72 6b 2f 50 43 53 43 0a 09 4c 49 42 3d 22  work/PCSC..LIB="
0c60: 22 0a 09 41 52 43 48 4c 49 53 54 3d 22 22 0a 09  "..ARCHLIST=""..
0c70: 44 4c 49 42 3d 22 22 0a 09 44 41 52 43 48 4c 49  DLIB=""..DARCHLI
0c80: 53 54 3d 22 22 0a 09 4f 53 58 3d 53 6c 74 6f 6d  ST=""..OSX=Sltom
0c90: 61 76 0a 09 50 4b 54 41 52 47 45 54 4f 53 3d 33  av..PKTARGETOS=3
0ca0: 0a 09 43 55 52 4f 53 58 56 45 52 3d 31 30 2e 36  ..CUROSXVER=10.6
0cb0: 0a 09 66 6f 72 20 48 4f 53 54 20 69 6e 20 69 33  ..for HOST in i3
0cc0: 38 36 2d 61 70 70 6c 65 2d 64 61 72 77 69 6e 31  86-apple-darwin1
0cd0: 30 20 78 38 36 5f 36 34 2d 61 70 70 6c 65 2d 64  0 x86_64-apple-d
0ce0: 61 72 77 69 6e 31 30 3b 20 64 6f 0a 09 09 67 65  arwin10; do...ge
0cf0: 6e 62 75 69 6c 64 0a 09 64 6f 6e 65 0a 09 6c 69  nbuild..done..li
0d00: 62 62 75 69 6c 64 0a 09 70 6b 67 62 75 69 6c 64  bbuild..pkgbuild
0d10: 0a 7d 0a 0a 23 20 42 75 69 6c 64 20 66 75 6e 63  .}..# Build func
0d20: 74 69 6f 6e 20 66 6f 72 20 53 6e 6f 77 20 4c 65  tion for Snow Le
0d30: 6f 70 61 72 64 2f 4c 69 6f 6e 2f 4d 6f 75 6e 74  opard/Lion/Mount
0d40: 61 69 6e 20 4c 69 6f 6e 0a 73 6c 74 6f 6d 61 76  ain Lion.sltomav
0d50: 28 29 20 7b 0a 09 6d 61 6b 65 64 69 72 0a 09 48  () {..makedir..H
0d60: 45 41 44 45 52 53 3d 2f 44 65 76 65 6c 6f 70 65  EADERS=/Develope
0d70: 72 2f 53 44 4b 73 2f 4d 61 63 4f 53 58 31 30 2e  r/SDKs/MacOSX10.
0d80: 36 2e 73 64 6b 2f 53 79 73 74 65 6d 2f 4c 69 62  6.sdk/System/Lib
0d90: 72 61 72 79 2f 46 72 61 6d 65 77 6f 72 6b 73 2f  rary/Frameworks/
0da0: 50 43 53 43 2e 66 72 61 6d 65 77 6f 72 6b 2f 56  PCSC.framework/V
0db0: 65 72 73 69 6f 6e 73 2f 41 2f 48 65 61 64 65 72  ersions/A/Header
0dc0: 73 2f 0a 09 4c 49 42 52 41 52 59 3d 2f 44 65 76  s/..LIBRARY=/Dev
0dd0: 65 6c 6f 70 65 72 2f 53 44 4b 73 2f 4d 61 63 4f  eloper/SDKs/MacO
0de0: 53 58 31 30 2e 36 2e 73 64 6b 2f 53 79 73 74 65  SX10.6.sdk/Syste
0df0: 6d 2f 4c 69 62 72 61 72 79 2f 46 72 61 6d 65 77  m/Library/Framew
0e00: 6f 72 6b 73 2f 50 43 53 43 2e 66 72 61 6d 65 77  orks/PCSC.framew
0e10: 6f 72 6b 2f 50 43 53 43 0a 09 4c 49 42 3d 22 22  ork/PCSC..LIB=""
0e20: 0a 09 41 52 43 48 4c 49 53 54 3d 22 22 0a 09 44  ..ARCHLIST=""..D
0e30: 4c 49 42 3d 22 22 0a 09 44 41 52 43 48 4c 49 53  LIB=""..DARCHLIS
0e40: 54 3d 22 22 0a 09 4f 53 58 3d 53 6c 74 6f 6d 61  T=""..OSX=Sltoma
0e50: 76 0a 09 50 4b 54 41 52 47 45 54 4f 53 3d 33 0a  v..PKTARGETOS=3.
0e60: 09 43 55 52 4f 53 58 56 45 52 3d 31 30 2e 36 0a  .CUROSXVER=10.6.
0e70: 09 66 6f 72 20 48 4f 53 54 20 69 6e 20 69 33 38  .for HOST in i38
0e80: 36 2d 61 70 70 6c 65 2d 64 61 72 77 69 6e 31 30  6-apple-darwin10
0e90: 20 78 38 36 5f 36 34 2d 61 70 70 6c 65 2d 64 61   x86_64-apple-da
0ea0: 72 77 69 6e 31 30 3b 20 64 6f 0a 09 09 67 65 6e  rwin10; do...gen
0eb0: 62 75 69 6c 64 0a 09 64 6f 6e 65 0a 09 6c 69 62  build..done..lib
0ec0: 62 75 69 6c 64 0a 09 70 6b 67 62 75 69 6c 64 0a  build..pkgbuild.
0ed0: 7d 0a 0a 23 20 47 65 6e 65 72 69 63 20 62 75 69  }..# Generic bui
0ee0: 6c 64 20 66 75 6e 63 74 69 6f 6e 0a 67 65 6e 62  ld function.genb
0ef0: 75 69 6c 64 28 29 20 7b 0a 09 6d 61 6b 65 20 64  uild() {..make d
0f00: 69 73 74 63 6c 65 61 6e 0a 09 41 52 43 48 3d 60  istclean..ARCH=`
0f10: 65 63 68 6f 20 24 7b 48 4f 53 54 7d 20 7c 20 63  echo ${HOST} | c
0f20: 75 74 20 2d 64 20 22 2d 22 20 2d 66 20 31 60 0a  ut -d "-" -f 1`.
0f30: 09 69 66 20 5b 20 24 7b 41 52 43 48 7d 20 3d 3d  .if [ ${ARCH} ==
0f40: 20 22 70 6f 77 65 72 70 63 22 20 5d 3b 20 74 68   "powerpc" ]; th
0f50: 65 6e 0a 09 09 69 66 20 5b 20 24 7b 4f 53 58 7d  en...if [ ${OSX}
0f60: 20 3d 3d 20 22 4c 65 6f 70 61 72 64 22 20 5d 3b   == "Leopard" ];
0f70: 20 74 68 65 6e 0a 09 09 09 41 52 43 48 3d 22 70   then....ARCH="p
0f80: 70 63 20 2d 6d 63 70 75 3d 47 34 22 0a 09 09 65  pc -mcpu=G4"...e
0f90: 6c 73 65 0a 09 09 09 41 52 43 48 3d 22 70 70 63  lse....ARCH="ppc
0fa0: 20 2d 6d 63 70 75 3d 47 33 22 0a 09 09 66 69 0a   -mcpu=G3"...fi.
0fb0: 09 66 69 0a 09 69 66 20 5b 20 22 24 7b 4c 49 4f  .fi..if [ "${LIO
0fc0: 4e 42 55 49 4c 44 7d 22 20 3d 20 31 20 5d 3b 20  NBUILD}" = 1 ]; 
0fd0: 74 68 65 6e 0a 09 09 69 66 20 5b 20 22 24 7b 41  then...if [ "${A
0fe0: 52 43 48 7d 22 20 3d 3d 20 22 70 70 63 20 2d 6d  RCH}" == "ppc -m
0ff0: 63 70 75 3d 47 34 22 20 5d 3b 20 74 68 65 6e 0a  cpu=G4" ]; then.
1000: 09 09 09 43 43 3d 70 6f 77 65 72 70 63 2d 61 70  ...CC=powerpc-ap
1010: 70 6c 65 2d 64 61 72 77 69 6e 31 31 2d 67 63 63  ple-darwin11-gcc
1020: 2d 34 2e 32 2e 31 20 43 50 50 3d 70 6f 77 65 72  -4.2.1 CPP=power
1030: 70 63 2d 61 70 70 6c 65 2d 64 61 72 77 69 6e 31  pc-apple-darwin1
1040: 31 2d 63 70 70 2d 34 2e 32 2e 31 20 43 46 4c 41  1-cpp-4.2.1 CFLA
1050: 47 53 3d 22 2d 6d 33 32 20 2d 49 2f 44 65 76 65  GS="-m32 -I/Deve
1060: 6c 6f 70 65 72 2f 50 6c 61 74 66 6f 72 6d 73 2f  loper/Platforms/
1070: 69 50 68 6f 6e 65 4f 53 2e 70 6c 61 74 66 6f 72  iPhoneOS.platfor
1080: 6d 2f 44 65 76 65 6c 6f 70 65 72 2f 75 73 72 2f  m/Developer/usr/
1090: 6c 69 62 2f 67 63 63 2f 70 6f 77 65 72 70 63 2d  lib/gcc/powerpc-
10a0: 61 70 70 6c 65 2d 64 61 72 77 69 6e 31 30 2f 34  apple-darwin10/4
10b0: 2e 32 2e 31 2f 69 6e 63 6c 75 64 65 20 2d 69 73  .2.1/include -is
10c0: 79 73 72 6f 6f 74 20 2f 44 65 76 65 6c 6f 70 65  ysroot /Develope
10d0: 72 2f 53 44 4b 73 2f 4d 61 63 4f 53 58 31 30 2e  r/SDKs/MacOSX10.
10e0: 35 2e 73 64 6b 22 20 43 50 50 46 4c 41 47 53 3d  5.sdk" CPPFLAGS=
10f0: 22 2d 44 5f 4c 49 42 43 5f 4c 49 4d 49 54 53 5f  "-D_LIBC_LIMITS_
1100: 48 5f 22 20 2e 2f 63 6f 6e 66 69 67 75 72 65 20  H_" ./configure 
1110: 2d 2d 77 69 74 68 2d 70 63 73 63 2d 68 65 61 64  --with-pcsc-head
1120: 65 72 73 3d 24 7b 48 45 41 44 45 52 53 7d 20 2d  ers=${HEADERS} -
1130: 2d 77 69 74 68 2d 70 63 73 63 2d 6c 69 62 73 3d  -with-pcsc-libs=
1140: 24 7b 4c 49 42 52 41 52 59 7d 20 2d 2d 68 6f 73  ${LIBRARY} --hos
1150: 74 3d 24 7b 48 4f 53 54 7d 20 2d 2d 65 6e 61 62  t=${HOST} --enab
1160: 6c 65 2d 64 6f 64 2d 63 65 72 74 73 2d 6f 6e 2d  le-dod-certs-on-
1170: 68 77 2d 73 6c 6f 74 73 0a 09 09 65 6c 73 65 0a  hw-slots...else.
1180: 09 09 09 43 46 4c 41 47 53 3d 22 2d 61 72 63 68  ...CFLAGS="-arch
1190: 20 24 7b 41 52 43 48 7d 22 20 2e 2f 63 6f 6e 66   ${ARCH}" ./conf
11a0: 69 67 75 72 65 20 2d 2d 77 69 74 68 2d 70 63 73  igure --with-pcs
11b0: 63 2d 68 65 61 64 65 72 73 3d 24 7b 48 45 41 44  c-headers=${HEAD
11c0: 45 52 53 7d 20 2d 2d 77 69 74 68 2d 70 63 73 63  ERS} --with-pcsc
11d0: 2d 6c 69 62 73 3d 24 7b 4c 49 42 52 41 52 59 7d  -libs=${LIBRARY}
11e0: 20 2d 2d 68 6f 73 74 3d 24 7b 48 4f 53 54 7d 20   --host=${HOST} 
11f0: 2d 2d 65 6e 61 62 6c 65 2d 64 6f 64 2d 63 65 72  --enable-dod-cer
1200: 74 73 2d 6f 6e 2d 68 77 2d 73 6c 6f 74 73 0a 09  ts-on-hw-slots..
1210: 09 66 69 0a 09 65 6c 73 65 0a 09 09 43 46 4c 41  .fi..else...CFLA
1220: 47 53 3d 22 2d 61 72 63 68 20 24 7b 41 52 43 48  GS="-arch ${ARCH
1230: 7d 22 20 2e 2f 63 6f 6e 66 69 67 75 72 65 20 2d  }" ./configure -
1240: 2d 77 69 74 68 2d 70 63 73 63 2d 68 65 61 64 65  -with-pcsc-heade
1250: 72 73 3d 24 7b 48 45 41 44 45 52 53 7d 20 2d 2d  rs=${HEADERS} --
1260: 77 69 74 68 2d 70 63 73 63 2d 6c 69 62 73 3d 24  with-pcsc-libs=$
1270: 7b 4c 49 42 52 41 52 59 7d 20 2d 2d 68 6f 73 74  {LIBRARY} --host
1280: 3d 24 7b 48 4f 53 54 7d 20 2d 2d 65 6e 61 62 6c  =${HOST} --enabl
1290: 65 2d 64 6f 64 2d 63 65 72 74 73 2d 6f 6e 2d 68  e-dod-certs-on-h
12a0: 77 2d 73 6c 6f 74 73 0a 09 66 69 0a 09 6d 61 6b  w-slots..fi..mak
12b0: 65 0a 09 63 70 20 6c 69 62 63 61 63 6b 65 79 2e  e..cp libcackey.
12c0: 64 79 6c 69 62 20 6d 61 63 62 75 69 6c 64 2f 24  dylib macbuild/$
12d0: 7b 4f 53 58 7d 2f 6c 69 62 63 61 63 6b 65 79 2e  {OSX}/libcackey.
12e0: 64 79 6c 69 62 2e 60 65 63 68 6f 20 24 7b 41 52  dylib.`echo ${AR
12f0: 43 48 7d 20 7c 20 63 75 74 20 2d 64 20 27 20 27  CH} | cut -d ' '
1300: 20 2d 66 20 31 60 0a 09 63 70 20 6c 69 62 63 61   -f 1`..cp libca
1310: 63 6b 65 79 5f 67 2e 64 79 6c 69 62 20 6d 61 63  ckey_g.dylib mac
1320: 62 75 69 6c 64 2f 24 7b 4f 53 58 7d 2f 6c 69 62  build/${OSX}/lib
1330: 63 61 63 6b 65 79 5f 67 2e 64 79 6c 69 62 2e 60  cackey_g.dylib.`
1340: 65 63 68 6f 20 24 7b 41 52 43 48 7d 20 7c 20 63  echo ${ARCH} | c
1350: 75 74 20 2d 64 20 27 20 27 20 2d 66 20 31 60 20  ut -d ' ' -f 1` 
1360: 0a 7d 0a 0a 23 20 4c 69 62 72 61 72 79 20 62 75  .}..# Library bu
1370: 69 6c 64 20 66 75 6e 63 74 69 6f 6e 0a 6c 69 62  ild function.lib
1380: 62 75 69 6c 64 28 29 20 7b 0a 09 66 6f 72 20 4c  build() {..for L
1390: 49 42 20 69 6e 20 6d 61 63 62 75 69 6c 64 2f 24  IB in macbuild/$
13a0: 7b 4f 53 58 7d 2f 6c 69 62 63 61 63 6b 65 79 2e  {OSX}/libcackey.
13b0: 64 79 6c 69 62 2e 2a 3b 20 64 6f 0a 09 09 41 52  dylib.*; do...AR
13c0: 43 48 4c 49 53 54 3d 22 24 7b 41 52 43 48 4c 49  CHLIST="${ARCHLI
13d0: 53 54 7d 20 60 65 63 68 6f 20 27 2d 61 72 63 68  ST} `echo '-arch
13e0: 20 27 60 20 60 65 63 68 6f 20 24 7b 4c 49 42 7d   '` `echo ${LIB}
13f0: 20 7c 20 63 75 74 20 2d 64 20 2e 20 2d 66 20 33   | cut -d . -f 3
1400: 60 20 60 65 63 68 6f 20 27 20 27 60 20 60 65 63  ` `echo ' '` `ec
1410: 68 6f 20 24 7b 4c 49 42 7d 60 22 0a 09 64 6f 6e  ho ${LIB}`"..don
1420: 65 0a 09 6c 69 70 6f 20 2d 63 72 65 61 74 65 20  e..lipo -create 
1430: 24 7b 41 52 43 48 4c 49 53 54 7d 20 2d 6f 75 74  ${ARCHLIST} -out
1440: 70 75 74 20 6d 61 63 62 75 69 6c 64 2f 24 7b 4f  put macbuild/${O
1450: 53 58 7d 2f 6c 69 62 63 61 63 6b 65 79 2e 64 79  SX}/libcackey.dy
1460: 6c 69 62 0a 09 66 6f 72 20 44 4c 49 42 20 69 6e  lib..for DLIB in
1470: 20 6d 61 63 62 75 69 6c 64 2f 24 7b 4f 53 58 7d   macbuild/${OSX}
1480: 2f 6c 69 62 63 61 63 6b 65 79 5f 67 2e 64 79 6c  /libcackey_g.dyl
1490: 69 62 2e 2a 3b 20 64 6f 0a 09 09 44 41 52 43 48  ib.*; do...DARCH
14a0: 4c 49 53 54 3d 22 24 7b 44 41 52 43 48 4c 49 53  LIST="${DARCHLIS
14b0: 54 7d 20 60 65 63 68 6f 20 27 2d 61 72 63 68 20  T} `echo '-arch 
14c0: 27 60 20 60 65 63 68 6f 20 24 7b 44 4c 49 42 7d  '` `echo ${DLIB}
14d0: 20 7c 20 63 75 74 20 2d 64 20 2e 20 2d 66 20 33   | cut -d . -f 3
14e0: 60 20 60 65 63 68 6f 20 27 20 27 60 20 60 65 63  ` `echo ' '` `ec
14f0: 68 6f 20 24 7b 44 4c 49 42 7d 60 22 0a 09 64 6f  ho ${DLIB}`"..do
1500: 6e 65 0a 09 6c 69 70 6f 20 2d 63 72 65 61 74 65  ne..lipo -create
1510: 20 24 7b 44 41 52 43 48 4c 49 53 54 7d 20 2d 6f   ${DARCHLIST} -o
1520: 75 74 70 75 74 20 6d 61 63 62 75 69 6c 64 2f 24  utput macbuild/$
1530: 7b 4f 53 58 7d 2f 6c 69 62 63 61 63 6b 65 79 5f  {OSX}/libcackey_
1540: 67 2e 64 79 6c 69 62 0a 09 72 6d 20 6d 61 63 62  g.dylib..rm macb
1550: 75 69 6c 64 2f 24 7b 4f 53 58 7d 2f 6c 69 62 63  uild/${OSX}/libc
1560: 61 63 6b 65 79 2a 2e 64 79 6c 69 62 2e 2a 0a 7d  ackey*.dylib.*.}
1570: 0a 0a 23 20 46 75 6e 63 74 69 6f 6e 20 74 6f 20  ..# Function to 
1580: 62 75 69 6c 64 20 4d 61 63 20 4f 53 20 58 20 50  build Mac OS X P
1590: 61 63 6b 61 67 65 73 0a 70 6b 67 62 75 69 6c 64  ackages.pkgbuild
15a0: 28 29 20 7b 0a 09 69 66 20 5b 20 22 60 75 6e 61  () {..if [ "`una
15b0: 6d 65 20 2d 72 20 7c 20 63 75 74 20 2d 64 20 2e  me -r | cut -d .
15c0: 20 2d 66 20 31 60 22 20 2d 6c 74 20 22 31 30 22   -f 1`" -lt "10"
15d0: 20 5d 3b 20 74 68 65 6e 0a 09 09 4c 49 42 43 41   ]; then...LIBCA
15e0: 43 4b 45 59 47 3d 6c 69 62 63 61 63 6b 65 79 67  CKEYG=libcackeyg
15f0: 2e 70 6b 67 0a 09 65 6c 73 65 0a 09 09 4c 49 42  .pkg..else...LIB
1600: 43 41 43 4b 45 59 47 3d 6c 69 62 63 61 63 6b 65  CACKEYG=libcacke
1610: 79 5f 67 2e 70 6b 67 0a 09 66 69 0a 09 72 6d 20  y_g.pkg..fi..rm 
1620: 2d 66 20 62 75 69 6c 64 2f 63 61 63 6b 65 79 5f  -f build/cackey_
1630: 6f 73 78 5f 62 75 69 6c 64 2f 63 61 63 6b 65 79  osx_build/cackey
1640: 2e 64 79 6c 69 62 0a 09 6c 6e 20 6d 61 63 62 75  .dylib..ln macbu
1650: 69 6c 64 2f 24 7b 4f 53 58 7d 2f 6c 69 62 63 61  ild/${OSX}/libca
1660: 63 6b 65 79 2e 64 79 6c 69 62 20 62 75 69 6c 64  ckey.dylib build
1670: 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c  /cackey_osx_buil
1680: 64 2f 63 61 63 6b 65 79 2e 64 79 6c 69 62 0a 09  d/cackey.dylib..
1690: 72 6d 20 2d 72 66 20 62 75 69 6c 64 2f 63 61 63  rm -rf build/cac
16a0: 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64 2f 50 4b  key_osx_build/PK
16b0: 43 53 31 31 2e 74 6f 6b 65 6e 64 0a 09 69 66 20  CS11.tokend..if 
16c0: 5b 20 22 24 7b 4c 49 4f 4e 42 55 49 4c 44 7d 22  [ "${LIONBUILD}"
16d0: 20 3d 20 31 20 5d 3b 20 74 68 65 6e 0a 09 09 54   = 1 ]; then...T
16e0: 41 52 3d 67 6e 75 74 61 72 0a 09 65 6c 73 65 0a  AR=gnutar..else.
16f0: 09 09 54 41 52 3d 74 61 72 0a 09 66 69 0a 09 69  ..TAR=tar..fi..i
1700: 66 20 5b 20 22 24 7b 4f 53 58 7d 22 20 3d 20 22  f [ "${OSX}" = "
1710: 4c 65 6f 70 61 72 64 22 20 5d 3b 20 74 68 65 6e  Leopard" ]; then
1720: 0a 09 09 63 75 72 6c 20 68 74 74 70 3a 2f 2f 64  ...curl http://d
1730: 65 76 65 6c 2e 6b 76 61 6e 61 6c 73 2e 6f 72 67  evel.kvanals.org
1740: 2f 50 4b 43 53 31 31 5f 54 6f 6b 65 6e 64 2f 50  /PKCS11_Tokend/P
1750: 4b 43 53 31 31 5f 74 6f 6b 65 6e 64 2d 6c 61 74  KCS11_tokend-lat
1760: 65 73 74 2e 74 61 72 2e 67 7a 20 7c 20 24 7b 54  est.tar.gz | ${T
1770: 41 52 7d 20 2d 2d 73 74 72 69 70 2d 63 6f 6d 70  AR} --strip-comp
1780: 6f 6e 65 6e 74 73 20 33 20 2d 2d 77 69 6c 64 63  onents 3 --wildc
1790: 61 72 64 73 20 2d 78 20 2d 7a 20 2d 66 20 2d 20  ards -x -z -f - 
17a0: 22 50 4b 43 53 31 31 5f 74 6f 6b 65 6e 64 2d 2a  "PKCS11_tokend-*
17b0: 2f 70 72 65 62 75 69 6c 74 2f 6c 65 6f 70 61 72  /prebuilt/leopar
17c0: 64 2f 50 4b 43 53 31 31 2e 74 6f 6b 65 6e 64 22  d/PKCS11.tokend"
17d0: 0a 09 09 6d 76 20 50 4b 43 53 31 31 2e 74 6f 6b  ...mv PKCS11.tok
17e0: 65 6e 64 20 62 75 69 6c 64 2f 63 61 63 6b 65 79  end build/cackey
17f0: 5f 6f 73 78 5f 62 75 69 6c 64 2f 50 4b 43 53 31  _osx_build/PKCS1
1800: 31 2e 74 6f 6b 65 6e 64 0a 09 65 6c 73 65 0a 09  1.tokend..else..
1810: 09 63 75 72 6c 20 68 74 74 70 3a 2f 2f 64 65 76  .curl http://dev
1820: 65 6c 2e 6b 76 61 6e 61 6c 73 2e 6f 72 67 2f 50  el.kvanals.org/P
1830: 4b 43 53 31 31 5f 54 6f 6b 65 6e 64 2f 50 4b 43  KCS11_Tokend/PKC
1840: 53 31 31 5f 74 6f 6b 65 6e 64 2d 6c 61 74 65 73  S11_tokend-lates
1850: 74 2e 74 61 72 2e 67 7a 20 7c 20 24 7b 54 41 52  t.tar.gz | ${TAR
1860: 7d 20 2d 2d 73 74 72 69 70 2d 63 6f 6d 70 6f 6e  } --strip-compon
1870: 65 6e 74 73 20 33 20 2d 2d 77 69 6c 64 63 61 72  ents 3 --wildcar
1880: 64 73 20 2d 78 20 2d 7a 20 2d 66 20 2d 20 22 50  ds -x -z -f - "P
1890: 4b 43 53 31 31 5f 74 6f 6b 65 6e 64 2d 2a 2f 70  KCS11_tokend-*/p
18a0: 72 65 62 75 69 6c 74 2f 73 6e 6f 77 6c 65 6f 70  rebuilt/snowleop
18b0: 61 72 64 2f 50 4b 43 53 31 31 2e 74 6f 6b 65 6e  ard/PKCS11.token
18c0: 64 22 0a 09 09 6d 76 20 50 4b 43 53 31 31 2e 74  d"...mv PKCS11.t
18d0: 6f 6b 65 6e 64 20 62 75 69 6c 64 2f 63 61 63 6b  okend build/cack
18e0: 65 79 5f 6f 73 78 5f 62 75 69 6c 64 2f 50 4b 43  ey_osx_build/PKC
18f0: 53 31 31 2e 74 6f 6b 65 6e 64 0a 09 66 69 0a 09  S11.tokend..fi..
1900: 66 6f 72 20 50 4d 44 4f 43 20 69 6e 20 62 75 69  for PMDOC in bui
1910: 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75  ld/cackey_osx_bu
1920: 69 6c 64 2f 54 65 6d 70 6c 61 74 65 5f 70 6d 62  ild/Template_pmb
1930: 75 69 6c 64 2f 2a 2e 69 6e 3b 20 64 6f 0a 09 09  uild/*.in; do...
1940: 50 4d 44 4f 43 3d 22 60 65 63 68 6f 20 22 24 7b  PMDOC="`echo "${
1950: 50 4d 44 4f 43 7d 22 20 7c 20 73 65 64 20 27 73  PMDOC}" | sed 's
1960: 7c 6c 2e 69 6e 7c 6c 7c 67 27 20 7c 20 73 65 64  |l.in|l|g' | sed
1970: 20 27 73 7c 62 75 69 6c 64 2f 63 61 63 6b 65 79   's|build/cackey
1980: 5f 6f 73 78 5f 62 75 69 6c 64 2f 54 65 6d 70 6c  _osx_build/Templ
1990: 61 74 65 5f 70 6d 62 75 69 6c 64 2f 7c 7c 67 27  ate_pmbuild/||g'
19a0: 60 22 0a 09 09 55 55 49 44 3d 22 60 70 79 74 68  `"...UUID="`pyth
19b0: 6f 6e 20 2d 63 20 27 69 6d 70 6f 72 74 20 75 75  on -c 'import uu
19c0: 69 64 3b 20 70 72 69 6e 74 20 75 75 69 64 2e 75  id; print uuid.u
19d0: 75 69 64 31 28 29 27 20 7c 20 64 64 20 63 6f 6e  uid1()' | dd con
19e0: 76 3d 75 63 61 73 65 20 32 3e 2f 64 65 76 2f 6e  v=ucase 2>/dev/n
19f0: 75 6c 6c 60 22 0a 09 09 6d 6b 64 69 72 20 2d 70  ull`"...mkdir -p
1a00: 20 62 75 69 6c 64 2f 63 61 63 6b 65 79 5f 6f 73   build/cackey_os
1a10: 78 5f 62 75 69 6c 64 2f 24 7b 4f 53 58 7d 5f 70  x_build/${OSX}_p
1a20: 6d 62 75 69 6c 64 2e 70 6d 64 6f 63 0a 09 09 73  mbuild.pmdoc...s
1a30: 65 64 20 22 73 7c 40 40 42 55 49 4c 44 52 4f 4f  ed "s|@@BUILDROO
1a40: 54 44 49 52 40 40 7c 24 28 70 77 64 29 7c 67 22  TDIR@@|$(pwd)|g"
1a50: 20 62 75 69 6c 64 2f 63 61 63 6b 65 79 5f 6f 73   build/cackey_os
1a60: 78 5f 62 75 69 6c 64 2f 54 65 6d 70 6c 61 74 65  x_build/Template
1a70: 5f 70 6d 62 75 69 6c 64 2f 24 7b 50 4d 44 4f 43  _pmbuild/${PMDOC
1a80: 7d 2e 69 6e 20 3e 20 62 75 69 6c 64 2f 63 61 63  }.in > build/cac
1a90: 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64 2f 24 7b  key_osx_build/${
1aa0: 4f 53 58 7d 5f 70 6d 62 75 69 6c 64 2e 70 6d 64  OSX}_pmbuild.pmd
1ab0: 6f 63 2f 24 7b 50 4d 44 4f 43 7d 0a 09 09 73 65  oc/${PMDOC}...se
1ac0: 64 20 22 73 7c 40 40 4f 53 58 56 45 52 53 49 4f  d "s|@@OSXVERSIO
1ad0: 4e 40 40 7c 24 7b 4f 53 58 7d 7c 67 22 20 62 75  N@@|${OSX}|g" bu
1ae0: 69 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62  ild/cackey_osx_b
1af0: 75 69 6c 64 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75  uild/${OSX}_pmbu
1b00: 69 6c 64 2e 70 6d 64 6f 63 2f 24 7b 50 4d 44 4f  ild.pmdoc/${PMDO
1b10: 43 7d 20 3e 20 62 75 69 6c 64 2f 63 61 63 6b 65  C} > build/cacke
1b20: 79 5f 6f 73 78 5f 62 75 69 6c 64 2f 24 7b 4f 53  y_osx_build/${OS
1b30: 58 7d 5f 70 6d 62 75 69 6c 64 2e 70 6d 64 6f 63  X}_pmbuild.pmdoc
1b40: 2f 24 7b 50 4d 44 4f 43 7d 2e 31 0a 09 09 73 65  /${PMDOC}.1...se
1b50: 64 20 22 73 7c 40 40 55 55 49 44 40 40 7c 24 7b  d "s|@@UUID@@|${
1b60: 55 55 49 44 7d 7c 67 22 20 62 75 69 6c 64 2f 63  UUID}|g" build/c
1b70: 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64 2f  ackey_osx_build/
1b80: 24 7b 4f 53 58 7d 5f 70 6d 62 75 69 6c 64 2e 70  ${OSX}_pmbuild.p
1b90: 6d 64 6f 63 2f 24 7b 50 4d 44 4f 43 7d 2e 31 20  mdoc/${PMDOC}.1 
1ba0: 3e 20 62 75 69 6c 64 2f 63 61 63 6b 65 79 5f 6f  > build/cackey_o
1bb0: 73 78 5f 62 75 69 6c 64 2f 24 7b 4f 53 58 7d 5f  sx_build/${OSX}_
1bc0: 70 6d 62 75 69 6c 64 2e 70 6d 64 6f 63 2f 24 7b  pmbuild.pmdoc/${
1bd0: 50 4d 44 4f 43 7d 0a 09 09 73 65 64 20 22 73 7c  PMDOC}...sed "s|
1be0: 40 40 54 41 52 47 45 54 4f 53 40 40 7c 24 7b 50  @@TARGETOS@@|${P
1bf0: 4b 54 41 52 47 45 54 4f 53 7d 7c 67 22 20 62 75  KTARGETOS}|g" bu
1c00: 69 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62  ild/cackey_osx_b
1c10: 75 69 6c 64 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75  uild/${OSX}_pmbu
1c20: 69 6c 64 2e 70 6d 64 6f 63 2f 24 7b 50 4d 44 4f  ild.pmdoc/${PMDO
1c30: 43 7d 20 3e 20 62 75 69 6c 64 2f 63 61 63 6b 65  C} > build/cacke
1c40: 79 5f 6f 73 78 5f 62 75 69 6c 64 2f 24 7b 4f 53  y_osx_build/${OS
1c50: 58 7d 5f 70 6d 62 75 69 6c 64 2e 70 6d 64 6f 63  X}_pmbuild.pmdoc
1c60: 2f 24 7b 50 4d 44 4f 43 7d 2e 31 0a 09 09 73 65  /${PMDOC}.1...se
1c70: 64 20 22 73 7c 40 40 43 55 52 4f 53 58 56 45 52  d "s|@@CUROSXVER
1c80: 40 40 7c 24 7b 43 55 52 4f 53 58 56 45 52 7d 7c  @@|${CUROSXVER}|
1c90: 67 22 20 62 75 69 6c 64 2f 63 61 63 6b 65 79 5f  g" build/cackey_
1ca0: 6f 73 78 5f 62 75 69 6c 64 2f 24 7b 4f 53 58 7d  osx_build/${OSX}
1cb0: 5f 70 6d 62 75 69 6c 64 2e 70 6d 64 6f 63 2f 24  _pmbuild.pmdoc/$
1cc0: 7b 50 4d 44 4f 43 7d 20 3e 20 62 75 69 6c 64 2f  {PMDOC} > build/
1cd0: 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64  cackey_osx_build
1ce0: 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75 69 6c 64 2e  /${OSX}_pmbuild.
1cf0: 70 6d 64 6f 63 2f 24 7b 50 4d 44 4f 43 7d 2e 31  pmdoc/${PMDOC}.1
1d00: 0a 09 09 73 65 64 20 22 73 7c 40 40 4c 49 42 43  ...sed "s|@@LIBC
1d10: 41 43 4b 45 59 47 40 40 7c 24 7b 4c 49 42 43 41  ACKEYG@@|${LIBCA
1d20: 43 4b 45 59 47 7d 7c 67 22 20 62 75 69 6c 64 2f  CKEYG}|g" build/
1d30: 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64  cackey_osx_build
1d40: 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75 69 6c 64 2e  /${OSX}_pmbuild.
1d50: 70 6d 64 6f 63 2f 24 7b 50 4d 44 4f 43 7d 2e 31  pmdoc/${PMDOC}.1
1d60: 20 3e 20 62 75 69 6c 64 2f 63 61 63 6b 65 79 5f   > build/cackey_
1d70: 6f 73 78 5f 62 75 69 6c 64 2f 24 7b 4f 53 58 7d  osx_build/${OSX}
1d80: 5f 70 6d 62 75 69 6c 64 2e 70 6d 64 6f 63 2f 24  _pmbuild.pmdoc/$
1d90: 7b 50 4d 44 4f 43 7d 0a 09 09 63 70 20 62 75 69  {PMDOC}...cp bui
1da0: 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75  ld/cackey_osx_bu
1db0: 69 6c 64 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75 69  ild/${OSX}_pmbui
1dc0: 6c 64 2e 70 6d 64 6f 63 2f 24 7b 50 4d 44 4f 43  ld.pmdoc/${PMDOC
1dd0: 7d 20 62 75 69 6c 64 2f 63 61 63 6b 65 79 5f 6f  } build/cackey_o
1de0: 73 78 5f 62 75 69 6c 64 2f 24 7b 4f 53 58 7d 5f  sx_build/${OSX}_
1df0: 70 6d 62 75 69 6c 64 2e 70 6d 64 6f 63 2f 24 7b  pmbuild.pmdoc/${
1e00: 50 4d 44 4f 43 7d 2e 31 0a 09 09 6d 76 20 62 75  PMDOC}.1...mv bu
1e10: 69 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62  ild/cackey_osx_b
1e20: 75 69 6c 64 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75  uild/${OSX}_pmbu
1e30: 69 6c 64 2e 70 6d 64 6f 63 2f 24 7b 50 4d 44 4f  ild.pmdoc/${PMDO
1e40: 43 7d 2e 31 20 62 75 69 6c 64 2f 63 61 63 6b 65  C}.1 build/cacke
1e50: 79 5f 6f 73 78 5f 62 75 69 6c 64 2f 24 7b 4f 53  y_osx_build/${OS
1e60: 58 7d 5f 70 6d 62 75 69 6c 64 2e 70 6d 64 6f 63  X}_pmbuild.pmdoc
1e70: 2f 24 7b 50 4d 44 4f 43 7d 0a 09 64 6f 6e 65 0a  /${PMDOC}..done.
1e80: 09 45 58 54 3d 70 6b 67 0a 09 69 66 20 5b 20 24  .EXT=pkg..if [ $
1e90: 7b 4f 53 58 7d 20 3d 3d 20 22 53 6e 6f 77 6c 65  {OSX} == "Snowle
1ea0: 6f 70 61 72 64 22 20 5d 3b 20 74 68 65 6e 0a 09  opard" ]; then..
1eb0: 09 63 61 74 20 62 75 69 6c 64 2f 63 61 63 6b 65  .cat build/cacke
1ec0: 79 5f 6f 73 78 5f 62 75 69 6c 64 2f 24 7b 4f 53  y_osx_build/${OS
1ed0: 58 7d 5f 70 6d 62 75 69 6c 64 2e 70 6d 64 6f 63  X}_pmbuild.pmdoc
1ee0: 2f 69 6e 64 65 78 2e 78 6d 6c 20 7c 20 73 65 64  /index.xml | sed
1ef0: 20 27 73 7c 66 6f 72 20 4d 61 63 20 4f 53 20 58   's|for Mac OS X
1f00: 20 53 6e 6f 77 6c 65 6f 70 61 72 64 7c 66 6f 72   Snowleopard|for
1f10: 20 4d 61 63 20 4f 53 20 58 20 53 6e 6f 77 4c 65   Mac OS X SnowLe
1f20: 6f 70 61 72 64 7c 67 27 20 3e 20 62 75 69 6c 64  opard|g' > build
1f30: 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c  /cackey_osx_buil
1f40: 64 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75 69 6c 64  d/${OSX}_pmbuild
1f50: 2e 70 6d 64 6f 63 2f 69 6e 64 65 78 2e 78 6d 6c  .pmdoc/index.xml
1f60: 2e 6e 65 77 0a 09 09 6d 76 20 62 75 69 6c 64 2f  .new...mv build/
1f70: 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64  cackey_osx_build
1f80: 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75 69 6c 64 2e  /${OSX}_pmbuild.
1f90: 70 6d 64 6f 63 2f 69 6e 64 65 78 2e 78 6d 6c 2e  pmdoc/index.xml.
1fa0: 6e 65 77 20 62 75 69 6c 64 2f 63 61 63 6b 65 79  new build/cackey
1fb0: 5f 6f 73 78 5f 62 75 69 6c 64 2f 24 7b 4f 53 58  _osx_build/${OSX
1fc0: 7d 5f 70 6d 62 75 69 6c 64 2e 70 6d 64 6f 63 2f  }_pmbuild.pmdoc/
1fd0: 69 6e 64 65 78 2e 78 6d 6c 0a 09 66 69 0a 09 69  index.xml..fi..i
1fe0: 66 20 5b 20 24 7b 4f 53 58 7d 20 3d 3d 20 22 53  f [ ${OSX} == "S
1ff0: 6c 74 6f 6d 61 76 22 20 5d 3b 20 74 68 65 6e 0a  ltomav" ]; then.
2000: 09 09 63 61 74 20 62 75 69 6c 64 2f 63 61 63 6b  ..cat build/cack
2010: 65 79 5f 6f 73 78 5f 62 75 69 6c 64 2f 24 7b 4f  ey_osx_build/${O
2020: 53 58 7d 5f 70 6d 62 75 69 6c 64 2e 70 6d 64 6f  SX}_pmbuild.pmdo
2030: 63 2f 69 6e 64 65 78 2e 78 6d 6c 20 7c 20 73 65  c/index.xml | se
2040: 64 20 27 73 7c 66 6f 72 20 4d 61 63 20 4f 53 20  d 's|for Mac OS 
2050: 58 20 53 6c 74 6f 6d 61 76 7c 66 6f 72 20 4d 61  X Sltomav|for Ma
2060: 63 20 4f 53 20 58 20 53 4c 74 6f 4d 61 76 7c 67  c OS X SLtoMav|g
2070: 27 20 3e 20 62 75 69 6c 64 2f 63 61 63 6b 65 79  ' > build/cackey
2080: 5f 6f 73 78 5f 62 75 69 6c 64 2f 24 7b 4f 53 58  _osx_build/${OSX
2090: 7d 5f 70 6d 62 75 69 6c 64 2e 70 6d 64 6f 63 2f  }_pmbuild.pmdoc/
20a0: 69 6e 64 65 78 2e 78 6d 6c 2e 6e 65 77 0a 09 09  index.xml.new...
20b0: 6d 76 20 62 75 69 6c 64 2f 63 61 63 6b 65 79 5f  mv build/cackey_
20c0: 6f 73 78 5f 62 75 69 6c 64 2f 24 7b 4f 53 58 7d  osx_build/${OSX}
20d0: 5f 70 6d 62 75 69 6c 64 2e 70 6d 64 6f 63 2f 69  _pmbuild.pmdoc/i
20e0: 6e 64 65 78 2e 78 6d 6c 2e 6e 65 77 20 62 75 69  ndex.xml.new bui
20f0: 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75  ld/cackey_osx_bu
2100: 69 6c 64 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75 69  ild/${OSX}_pmbui
2110: 6c 64 2e 70 6d 64 6f 63 2f 69 6e 64 65 78 2e 78  ld.pmdoc/index.x
2120: 6d 6c 0a 09 66 69 0a 09 2f 44 65 76 65 6c 6f 70  ml..fi../Develop
2130: 65 72 2f 41 70 70 6c 69 63 61 74 69 6f 6e 73 2f  er/Applications/
2140: 55 74 69 6c 69 74 69 65 73 2f 50 61 63 6b 61 67  Utilities/Packag
2150: 65 4d 61 6b 65 72 2e 61 70 70 2f 43 6f 6e 74 65  eMaker.app/Conte
2160: 6e 74 73 2f 4d 61 63 4f 53 2f 50 61 63 6b 61 67  nts/MacOS/Packag
2170: 65 4d 61 6b 65 72 20 2d 64 20 62 75 69 6c 64 2f  eMaker -d build/
2180: 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c 64  cackey_osx_build
2190: 2f 24 7b 4f 53 58 7d 5f 70 6d 62 75 69 6c 64 2e  /${OSX}_pmbuild.
21a0: 70 6d 64 6f 63 20 2d 6f 20 6d 61 63 62 75 69 6c  pmdoc -o macbuil
21b0: 64 2f 70 6b 67 2f 43 41 43 4b 65 79 5f 24 7b 43  d/pkg/CACKey_${C
21c0: 41 43 4b 45 59 5f 56 45 52 53 49 4f 4e 7d 5f 24  ACKEY_VERSION}_$
21d0: 7b 4f 53 58 7d 2e 24 7b 45 58 54 7d 0a 09 74 61  {OSX}.${EXT}..ta
21e0: 72 20 2d 2d 63 72 65 61 74 65 20 2d 2d 64 69 72  r --create --dir
21f0: 65 63 74 6f 72 79 20 6d 61 63 62 75 69 6c 64 2f  ectory macbuild/
2200: 70 6b 67 2f 20 2d 2d 66 69 6c 65 20 6d 61 63 62  pkg/ --file macb
2210: 75 69 6c 64 2f 70 6b 67 2f 43 41 43 4b 65 79 5f  uild/pkg/CACKey_
2220: 24 7b 43 41 43 4b 45 59 5f 56 45 52 53 49 4f 4e  ${CACKEY_VERSION
2230: 7d 5f 24 7b 4f 53 58 7d 2e 24 7b 45 58 54 7d 2e  }_${OSX}.${EXT}.
2240: 74 61 72 20 43 41 43 4b 65 79 5f 24 7b 43 41 43  tar CACKey_${CAC
2250: 4b 45 59 5f 56 45 52 53 49 4f 4e 7d 5f 24 7b 4f  KEY_VERSION}_${O
2260: 53 58 7d 2e 24 7b 45 58 54 7d 0a 09 67 7a 69 70  SX}.${EXT}..gzip
2270: 20 2d 39 20 6d 61 63 62 75 69 6c 64 2f 70 6b 67   -9 macbuild/pkg
2280: 2f 43 41 43 4b 65 79 5f 24 7b 43 41 43 4b 45 59  /CACKey_${CACKEY
2290: 5f 56 45 52 53 49 4f 4e 7d 5f 24 7b 4f 53 58 7d  _VERSION}_${OSX}
22a0: 2e 24 7b 45 58 54 7d 2e 74 61 72 0a 09 72 6d 20  .${EXT}.tar..rm 
22b0: 2d 72 66 20 6d 61 63 62 75 69 6c 64 2f 70 6b 67  -rf macbuild/pkg
22c0: 2f 43 41 43 4b 65 79 5f 24 7b 43 41 43 4b 45 59  /CACKey_${CACKEY
22d0: 5f 56 45 52 53 49 4f 4e 7d 5f 24 7b 4f 53 58 7d  _VERSION}_${OSX}
22e0: 2e 24 7b 45 58 54 7d 0a 09 72 6d 20 2d 66 20 62  .${EXT}..rm -f b
22f0: 75 69 6c 64 2f 63 61 63 6b 65 79 5f 6f 73 78 5f  uild/cackey_osx_
2300: 62 75 69 6c 64 2f 63 61 63 6b 65 79 2e 64 79 6c  build/cackey.dyl
2310: 69 62 0a 09 72 6d 20 2d 72 66 20 62 75 69 6c 64  ib..rm -rf build
2320: 2f 63 61 63 6b 65 79 5f 6f 73 78 5f 62 75 69 6c  /cackey_osx_buil
2330: 64 2f 50 4b 43 53 31 31 2e 74 6f 6b 65 6e 64 0a  d/PKCS11.tokend.
2340: 09 65 63 68 6f 20 22 24 7b 4f 53 58 7d 20 62 75  .echo "${OSX} bu
2350: 69 6c 64 20 63 6f 6d 70 6c 65 74 65 22 0a 7d 0a  ild complete".}.
2360: 0a 23 20 54 61 6b 65 20 63 6f 6d 6d 61 6e 64 20  .# Take command 
2370: 6c 69 6e 65 20 61 72 67 75 6d 65 6e 74 73 20 61  line arguments a
2380: 6e 64 20 65 78 65 63 75 74 65 0a 63 61 73 65 20  nd execute.case 
2390: 22 24 31 22 20 69 6e 0a 09 22 22 29 0a 09 09 75  "$1" in.."")...u
23a0: 73 61 67 65 0a 09 09 65 78 69 74 20 24 3f 0a 09  sage...exit $?..
23b0: 3b 3b 0a 0a 09 22 6c 65 6f 70 61 72 64 22 29 0a  ;;..."leopard").
23c0: 09 09 2e 2f 61 75 74 6f 67 65 6e 2e 73 68 0a 09  .../autogen.sh..
23d0: 09 6c 65 6f 70 61 72 64 0a 09 09 65 78 69 74 20  .leopard...exit 
23e0: 24 3f 0a 09 3b 3b 0a 0a 09 22 73 6e 6f 77 6c 65  $?..;;..."snowle
23f0: 6f 70 61 72 64 22 29 0a 09 09 2e 2f 61 75 74 6f  opard")..../auto
2400: 67 65 6e 2e 73 68 0a 09 09 73 6e 6f 77 6c 65 6f  gen.sh...snowleo
2410: 70 61 72 64 0a 09 09 65 78 69 74 20 24 3f 0a 09  pard...exit $?..
2420: 3b 3b 0a 09 0a 09 22 6c 69 6f 6e 22 29 0a 09 09  ;;...."lion")...
2430: 2e 2f 61 75 74 6f 67 65 6e 2e 73 68 0a 09 09 6c  ./autogen.sh...l
2440: 69 6f 6e 0a 09 09 65 78 69 74 20 24 3f 0a 09 3b  ion...exit $?..;
2450: 3b 0a 09 0a 09 22 73 6c 74 6f 6d 61 76 22 29 0a  ;...."sltomav").
2460: 09 09 2e 2f 61 75 74 6f 67 65 6e 2e 73 68 0a 09  .../autogen.sh..
2470: 09 73 6c 74 6f 6d 61 76 0a 09 09 65 78 69 74 20  .sltomav...exit 
2480: 24 3f 0a 09 3b 3b 0a 0a 09 22 61 6c 6c 22 29 0a  $?..;;..."all").
2490: 09 09 2e 2f 61 75 74 6f 67 65 6e 2e 73 68 0a 09  .../autogen.sh..
24a0: 09 6c 65 6f 70 61 72 64 0a 09 09 73 6c 74 6f 6d  .leopard...sltom
24b0: 61 76 0a 09 09 65 63 68 6f 20 22 22 0a 09 09 65  av...echo ""...e
24c0: 63 68 6f 20 22 41 6c 6c 20 62 75 69 6c 64 73 20  cho "All builds 
24d0: 63 6f 6d 70 6c 65 74 65 2e 22 0a 09 09 65 78 69  complete."...exi
24e0: 74 20 24 3f 0a 09 3b 3b 0a 0a 09 22 63 6c 65 61  t $?..;;..."clea
24f0: 6e 22 29 0a 09 09 63 6c 65 61 6e 0a 09 09 65 78  n")...clean...ex
2500: 69 74 20 24 3f 0a 09 3b 3b 0a 0a 09 2a 29 0a 09  it $?..;;...*)..
2510: 09 75 73 61 67 65 0a 09 09 65 78 69 74 20 24 3f  .usage...exit $?
2520: 0a 09 3b 3b 0a 65 73 61 63 20 0a                 ..;;.esac .