We are using rpam extensively for our YaST web service project.
Klaus Kaempf (in CC) did some improvements in order to make it work for our project, plus some added tests and build facilities.
Originally, we were keeping a fork in-tree, however we would like to keep as close with your upstream version, therefore I attach the patch we use to build our package.
If you apply it (or part of it) please tell us so we can adapt our package :-)
Thanks for this useful piece of software!