initial commit

Based on trunk/sm.hg, tip 3a0cc7b053e3. Only the files required to
build the sm RPM package are imported.