  Deutscher Text siehe Datei INSTALLATION

How to install MoneyPenny
=========================
Sorry, but this is neither easy nor straightforward, because
you need plenty of libraries in their right versions and configure options. The Linux kernel
should be 2.6.5-7.155  or later for cardreader support to work properly.
Especially libchipcard and the cardreader drivers are quite tricky 
to install, according to your type of cardreader. With a Reiner SCT Cyberjack you are lucky, 
because it is detected automatically. Plug it in, install libchipcard and be happy.
Stick to the following procedure.
You need the following libraries: 
If they do already come with a ready to go configure script, skip the "make -f Makefile.cvs" commands.
(We strongly recommend to use the links from our server, they point to the correct versions):

1. openssl (including the devel package) 	http://www.openssl.org
2. gwenhywfar 1.9.17     		 	http://gwenhywfar.sourceforge.net
3. openhbci2 or openhbci-tng		 	http://www.openhbci.de
4. aqmoney2 or aqmoney-tng		 	http://aqmoney.sourceforge.net

If you have a cardreader you need a driver from the manufacturer and:
6. libchipcard2, Version 1.9.12                 http://www.libchipcard.de

If you have a PCSC type (e.g. Kobil Kaan Advanced) cardreader, you need additionally:
7. ncurses including the developer package      from your distribution
8. ccid 0.9.3                                   https://alioth.debian.org/project/showfiles.php?group_id=30105

Load the packages 2, 3 ,4 and 6 from our server. The links point to the right versions.
Install the packages in this order. Do this as usual calling ./configure, make and make install. 
Libchipcard and opensc are needed, if you need a chipcard-reader.

 These versions of the Gwen- and OpenHBCI packages are cvs packages without the "missing" programs.
 Therefore, you hav to run the GNU autotools to make them compilable.

**********Installation of openssl***********************
This is easy. Most distributions contain an openssl and openssl-devel package.
Install both packages with the distribution's installation tool (e.g. apt, Yast)
 
************Installation of gwenhywfar******************* 
Warning: If you need ncurses (see above) install it first!
Warning: 2 (two) "make install" commands are needed! see below:
 cd into the gwenhywfar directory
   
 then run:
 make -f Makefile.cvs
 ./configure
 make
 
 sudo make install
 sudo make install-binSCRIPTS
 
 
**************Installation of openhbci-tng***************

 rename the following package directories:
 
 rename openhbci-tng/openhbci/debian/debian     to   openhbci-tng/openhbci/debian/DEBIAN
 rename openhbci-tng/openhbci/ext_plugins/cvs   to   openhbci-tng/openhbci/ext_plugins/CVS
 
 cd to openhbci-tng/openhbci
 
 then run:
 
 make -f Makefile.dist
 ./configure
 make 

 sudo make install

 Install the plugins later! They do not compile without libchipcard.
 
 ***************Installation of opensc********************
 
 Uninstall any opensc version older than 0.9.4
 Download version 0.9.6 
 
 cd into the opensc dir
 then run:
  
 ./configure --prefix=/usr
 make
 
 sudo make install 
 
 
 *******************Installation of chipcard2*********************
  
 !!libchipcard versions from Sourceforge do not work!!
 Download libchipcard (the correct version is called chipcard2) from our server or from the CVS.
 Chipcard driver MUST be available prior to installing libchipcard!!
 
 cd into chipcard2/chipcard2
 then run:
  
 make -f Makefile.cvs //this will run configure
 
 if you get a configure error about a wrong version of opensc,
 edit configure.ac and adjust the version of opensc to your version.
 e.g. replace 
 AC_OPENSC(0,9,4) with AC_OPENSC(0,9,6)
 
 make distclean
 ./configure //run configure again!!!
 make
 sudo make install

 cd into chipcard2/chpcard2-client
  then run:
  
 make -f Makefile.cvs 
 ./configure 
 make
 sudo make install

 Prior to configuring libchipcard, you should install the driver for your cardreader.

 ************Installation of the ddvcard2 plugin****************************
 cd into openhbci-tng/plugins/openhbci-plugin-ddvcard2 
  then run:
  
 make -f Makefile.cvs 
 ./configure 
 make
 sudo make install
 
 ************Install your chipcard driver (ctapi based readers)***************
 
 The driver file (.so file)is simply copied to /usr/lib/chipcard2-server/lowlevel.
 Example: Installing a Kobil Kaan Standard plus serial reader
 
 download the driver bundle from www.kobil.de
 copy libct.so to /usr/lib/chipcard2-server/lowlevel

 run
 chipcardd2 addreader --list 
 
  
 The Kobil driver needs a configuration file named .CT_devices in your home directory.
 If you start the chipcardd2 daemon as root, the home directory is /root. 
 If you let MoneyPenny start the daemon with a sudo command, the home directory is YOUR
 homedirectory. In the latter case, the logfile for the chipcardd2 daemon is /var/log/chipcardd2.log.
 If the daemon is complaining about wrong ports, something is wrong with .CT_devices.
 
 This is my .CT_devices file for the Kobil Kaan Standard Plus:
 
GetPortType=#0
SetPortType=#0
DefaultPortType=#0
DefaultProtocollType=#0
UseOnlyDefaultProtocoll=#0
B1DTRLow=#50
B1DSRRespActive=#2000
PnPChar=#150
B1WaitForPnPString=#1500
KaanWaitForPnPString=#600
Port1=COM;/dev/ttyS0;2;0;serial reader at /dev/ttyS0: Kaan/SecOVID/TWIN
Port2=PCSC;KOBIL KAAN Advanced 00 00;3;0;PCSC Leser
UseOldStyleManufacturerDataObje=#0
LogfileName=/home/walter/ct_api.log
LogLevel=#15
UseOldStyleManufacturerDataObject=#0

*******Installing a PCSC based Reader (like the Kobil Kaan Advanced)****************************
Sorry, this does not yet work correctly. 

If you have a PCSC type cardreader like the Kobil Advanced, 
you have to download and install the pcsc and ccid libs. 
Moreover, the firmware of the Kaan Advanced has to be updatet 
on a Windows machine to Version 4.0 or later. The update-installer itself
must be installed on the Windows machine, then reboot and run the
update from the program menu. You need a brandnew
libct.so driver from Kobil (size is some 168kB), which must be copied to /usr/lib 
and to /usr/lib/chipcard2-server/lowlevel. 
Unfortunately, there is no version information in this file. The older versions
do not work. Moreover you need libkobil_ifd.so from the Kobil ct-linux driver
bundle.
The configuration is quite tricky. You have to create the following
configuration files: 
/root/.CT_devices                            for a Kobil reader
~/.CT_devices                                for a Kobil reader, if you start from you home account
/usr/etc/chipcard2-client/chipcardc2.conf    for the libchipcard client
/usr/etc/chipcard2-server/chipcardd2.conf    for the libchipcard server

You need Version >= ccid 0.9.3 
Download from: 
 https://alioth.debian.org/project/showfiles.php?group_id=30105
When calling configure, be shure to use the right prefix!
On a SuSE system you have to call:
./configure --prefix=/usr
Otherwise you will end up in a library mix with the old versions installed by SuSE YAST.
then run:
make
sudo make install 



In .CT-devices the name string in the Port-line must
be identical to the iProduct string in the usb list, which depends on the firmware
of the reader. To find this value proceed as follows:

Unplug your reader.
su
lsusb
This will give you a short list like this:

amd2600-roth:/home/walter # lsusb
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000

Plug in your reader.
lsusb

amd2600-roth:/home/walter # lsusb
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 003: ID 0d46:3002   <--- this line has changed
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000

The reader is on Bus 3, Device 3 and has the identity 0d46:3002
Now you are ready to search the long list.
lsub -v          
This displays a lot of additional information for every line in the list above. 
First search for the caption:
Bus 003 Device 003: ID 0d46:3002
Then search for the iProduct line:
 iProduct                2 KAAN Advanced
The string KAAN Advanced is the name you are looking for. 
Put this name into the .CT_devices files.
e.g.
Port2=PCSC;KAAN Advanced 00 00;3;0;PCSC Leser

 *******************Setup libchipcard******************
 There is a setup manual available at www.libchipcard.de.
 Setup the configuration of libchipcard for your reader.
 Special instructions from the manufacturer may be required!
 
 
 make directory /etc/chipcard2-client
 copy the file
 chipcard2/chipcard2/doc/chipcardc2.conf.example to /etc/chipcard2-client/chipcardc2.conf
 
 make directory /etc/chipcard2-server
 copy the file
 chipcard2/chipcard2/doc/chipcardd2.conf.example to /etc/chipcard2-server/chipcardd2.conf
 
 make directory /var/log/chipcard2
 
 Plug in your reader. If you have an USB reader, libchipcard should find it automatically.

****************Install MoneyPenny***************************** 
  
MoneyPenny itself is a KDevelop 3.1 based qmake project. You may install it using KDevelop or simply use the script make_release in this directory. It will call qmake to create the makefiles and then compile and clean the project. The executable program is called moneypenny and resides in the bin directory. 
If you want the program to run from another directory, copy the MoneyPenny directory including all it's subdirectories to that location.
Presently the strings are available in English and German. However, the help is German only.
If you would like to join our team with a translation to your native language, please send a mail to 
moneypenny@www-in.fh-swf.de


Enjoy!
Your MoneyPenny Team


 