Belgian EID PKCS11 library, based on OpenSC (www.opensc.bat)

How to build on Windows
=======================

  Notes:
  - You should have cvs, perl, sed and (until V.1.3) flex installed (e.g. use Cygwin).
  - You should have the OpenSSL libs available and added to your lib and include settings, e.g.
        set include=E:\eid\dev\openssl\include;%include%
        set lib=E:\eid\dev\openssl\lib;%lib%

  cvs -d :ext:stef@212.35.97.189:/home/cvs/eid checkout pkcs11
  cd pkcs11
  cvs -d :pserver:cvs@cvs.opensc.org:/pub/cvsroot checkout -rRELEASE_0_8_1 opensc
  mergebp.bat (merges the OpenSC sources with the Belpic-specific things)
  make
  release.bat (This will make the a dir ..\release\win32\belpic-pkcs11 containing everything)
              (NOTE: you should also have pp_emulator downloaded from our CV)

How to build on Linux
=====================

For RELEASE_08APR2003:
    cd pkcs11/opensc/
    ./bootstrap
    ./configure
    make
    make install      (-> as root)

For V1.3 (RELEASE_17NOV2003):
    cvs -d :ext:stef@212.35.97.189:/home/cvs/eid checkout pkcs11 -r RELEASE_17NOV2003
    cd pkcs11
    cvs -d :pserver:cvs@cvs.opensc.org:/pub/cvsroot checkout -rRELEASE_0_8_0 opensc
    ./mergebp  (ignore the 'p: omitting directory XXX' warnings)
    cd opensc
    ./bootstrap  (ignore the warnings about the flags)
    ./configure
    cd ..
    ./static_openssl  (in order to statically link OpenSSL)
    cd opensc
    make
    su
    make install
    cd ..
    ./release

For V1.4 (RELEASE_09FEB2003):
  cvs -d :ext:stef@212.35.97.189:/home/cvs/eid checkout pkcs11
  cd pkcs11
  cvs -d :pserver:cvs@cvs.opensc.org:/pub/cvsroot checkout -rRELEASE_0_8_1 opensc
  ./mergebp   (ignore the 'p: omitting directory XXX' warnings)
  cd opensc
  ./bootstrap  (ignore the warnings about the flags)
  ./configure
  cd ..
  ./static_openssl  (in order to statically link OpenSSL
  cd opensc
  make
  su
  make install
  cd ..
  ./release

  (To view the result: rpm -qpi /usr/src/RPM/RPMS/i586/Belgium-EID-pkcs11-1.4-1.i586.rpm)
  (To install (as root): rpm -i --nodeps /usr/src/RPM/RPMS/i586/Belgium-EID-pkcs11-1.4-1.i586.rpm)
  (To un-install (as root): rpm -e Belgium-EID-pkcs11-1.4-1)

How to build on Mac:
  idem as V1.4 on Linux, except
  - run "./mergebp.mac" instead of "./mergebp"
  - don't run "./static_openssl"
  - run "./release.mac" instead of "./release"
  - after the "./mergebp", run "./make_pkcs11-tool.mac"
  - "su" doesn't seem to work, use "sudo /bin/bash" instead

How to archive everthing used in a release (using a tag):

- as the tag, use something like RELEASE_15MAY2038
- make a dir named like the tag in opensc-snapshots, and
  copy the opensc/ from the OpenSC CVS to it (so you would
  get opensc-snapshots/RELEASE_15MAY2038/opensc),
  and commit RELEASE_15MAY2038 to the opensc-snapshots
  repository (NOT to the eid repository!)
- Add release info to pkcs11/releases.txt and commit it
- tag the pkcs11/ and pp_emulator/ repositories
  (e.g. cvs tag -R RELEASE_15MAY2038)


How to get back to a previous (tagged) version:

- Checkout this pkcs11 with the desired tag
- DON'T do a getos.bat or getos as you would do normally
- Checkout the dir with the tag name from opensc-snapshots,
  and copy the opensc dir it contains to pkcs11/opensc/
- Do mergebp.bat or merge and then following the rest of the instruction as given above.

