[SmartcardServices-Dev] Building using darwinbuild

William Siegrist wsiegrist at apple.com
Thu Jul 9 17:50:54 PDT 2009

I wanted to report on recent work done to make SmartCardServices  
buildable outside of Apple. You can now build the Tokend and  
SmartCardServices projects that shipped with 10.5.6 and 10.5.7 using  
darwinbuild. We had to add a patch that adds includes that were needed  
to build with CFLite, but otherwise the source is unmodified.  
Darwinbuild helps by automatically putting roots in a chroot that have  
the private headers you need.

First, install darwinbuild ( http://darwinbuild.macosforge.org/ ), then:

# create a build environment
$ mkdir ~/9J61 && cd ~/9J61
$ sudo darwinbuild -init 9J61

# build stuff
$ sudo darwinbuild SmartCardServices
$ sudo darwinbuild Tokend

That's it. In this example, everything is kept in a chroot under ~/ 
9J61/BuildRoot/.  You can use /usr/local/share/darwinbuild/ 
packageRoots to produce a tarball in ~/9J61/Packages/ of your build.   
You can use /usr/local/bin/darwinup to install it like so:

$ sudo darwinup install ~/9J61/Packages/SmartCardServices.root.tar.gz

... and to uninstall

$ sudo darwinup list
$ sudo darwinup uninstall <uuid from the list output above>


More information about the SmartcardServices-Dev mailing list