SpatiaLite (gaia-gis.it) is an open source library intended to extend the SQLite core to support fully fledged Spatial SQL capabilities. It is smoothly integrated into SQLite to provide a complete and powerful Spatial DBMS (mostly OGC-SFS compliant). Using SQLite + SpatiaLite you can effectively deploy an alternative open source Spatial DBMS roughly equivalent to PostgreSQL + PostGIS. Most linux distributions package SpatiaLite into their own repositories. SpatiaLite is licensed under the MPL tri-license terms.
The routing function is among those supported.
- Using-Routing.pdf contains information on using it with the OpenStreetMap data, and this tutorial
- blog post 'Local map rendering and route finding with libchamplain, Spatialite and Open Street Map' has instructions on how to perform both routing and rendering using OpenStreetMap data.