pcb-rnd - user manual
8.2. Installation of the footprint CGIs
8.2.1. system requirements, 3rd party software
The following software needs to be installed on the system
that will host the scripts:
- /bin/bash (did not test with POSIX shell)
- awk (tested with gawk, may work with other modern implementation)
- common binutils, e.g. ls, find
- animator, the svn HEAD version; NOTE: it is possible to manually compile animator into a static executable (useful on dedicated web servers)
- a web server that can execute plain old CGI scripts
- a full checkout of pcb-rnd/trunk from svn://repo.hu/pcb-rnd/trunk
8.2.2. Installation
Since the CGIs are just demo scripts for repo.hu and are not really installed
anywhere else normally, there is no install script but a manual installation
process. For both the parametric and the static footprint CGI:
- check out pcb-rnd/trunk in a directory readable (but not writable) by www-data (or whatever user the CGI will run with)
- copy the config file pcblib.cgi.conf from pcb-rnd/trunk/util to /etc
- edit the config file; ignore setting sdir for now
- hardlink, copy, or wrap the cgi files from under pcb-rnd/trunk/util into the web server's CGI directory
For the static footprint CGI (set up the map cache):
- cd to trunk/util/pcblib-map in the checkout and run make - NOTE: some awk scripts have hardwired CGI paths yet (TODO)
- copy this directory to a web-accessible directory
- set sdir to the absolute path of the web-accessible copy in /etc/pcblib.cgi.conf
8.2.3. Tips and tricks
8.2.3.1. cgi wrapping
Making the checkout directly into the cgi-bin dir is not a good idea. Using
a hard link on each CGI between the checkout and the cgi-bin dir is better,
but an svn up will silently break the link leaving the old version live.
The most stable solution is placing a wrapper script in the cgi-bin dir:
#!/bin/bash
. /full/path/to/the/checkout/util/pcblib-param.cgi