# yum install geda-examples ngspice geda-gnetlist
the TwoStageAmp example:
$ gschem /usr/share/gEDA/examples/TwoStageAmp/TwoStageAmp.sch
You will notice the 2N3904.mod (/usr/share/gEDA/models/bjt/2N3904.mod) on the schematic however this 2N3904.mod file you won’t find it on your fedora. There is a reason for that.
There is no “models” directory in the example, yet the “SPICE model” element refers to /usr/share/gEDA/models/ directory. This directory “/usr/share/gEDA/models/” is owned by the geda-spice package. geda-spice is not provided neither geda/gaf nor the fedoraproject due to license restrictions by various vendors.
Those are vendor SPICE models which have been downloaded and collected from a couple of different sources and there is a geda-spice rpm for convenience sake. Each model is copyrighted to its vendor (usually). Most vendors are very liberal with their part’s SPICE models, and are not unhappy to see them spread around since it means more people might order their parts. Also, at least at one time, lots of electronics geeks had vendor SPICE models on their websites for other’s convenience; nobody got into any trouble as far as I can tell.
Both the Fedora Project and the gEDA project can’t distribute any of those SPICE models. They are generally vendor proprietary, and the gEDA project will (and can) only distribute GPLed things. It’s up to you to find the model using Google. FWIW, the two stage amp example uses a 2N3904, which is pretty easy to find.
Also Stuart Brorson has a bunch of SPICE models in a tarball on his website.
Here is a rpm version:
$ wget http://tux.u-strasbg.fr/~chit/RPMS/geda-spice-20030321-1.noarch.rpm
# rpm -ivh geda-spice-20030321-1.noarch.rpm
you will see:
$ rpm -ql geda-spice | grep 2N3904
The TwoStageAmp example shows you how different spice components can be included into the gEDA/gaf suite and how ngspice uses subcircuit during simulations.
$ cd /usr/share/gEDA/examples/TwoStageAmp/
$ gnetlist -g spice-sdb -o ~/spice.netlist TwoStageAmp.sch
$ ngspice -b ~/spice.netlist