initial commit

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