Well, there were a few unexpected bumps when I tried things out on various machines, but I think I've caught the major issues now. I wrote installation and operation instructions here:
github.com/karlrees/indi-3rdparty/blob/m...ndi-pentax/README.md. Please let me know if you have any feedback.
I'm not sure if anything else is needed before I submit a pull request. Perhaps @knro could chime in. Perhaps something for debian packaging? I have no idea how that works.
Also, I had a few technical issues, and perhaps some enlightened mind out there with more experience than myself can advise me on them:
1) The Ricoh Camera SDK depends upon a custom version of libmtp with a version number of 9.3.0. Not surprisingly, this can and does cause problems if the standard version of libmtp is installed. To avoid these problems, I configured the requisite libraries to be installed in the "indipentax" subdirectory of CMAKE_INSTALL_LIBDIR. That subdirectory is then listed in the RPATH of the indi_pentax binary (not the RUNPATH, since libmtp is an indirect dependency). I'm sure this negatively affects the modularity of indi-pentax. I'm happy to take suggestions if there's a better way to deal with this issue. I also wonder if it would be better to install the libraries in /usr/local/lib/indipentax?
2) When compiled on Ubuntu Mate 18.0.4 (Raspberry Pi 3B), PTP mode does not work. I can't pinpoint exactly why, but based on my observations thus far, I suspect it's because the indi_pentax binary generated by the compiler on Ubuntu Mate is targeting armv7, whereas the library files provided by Ricoh are for armv6. Yet, I cannot figure out how to get indi-pentax to compile if I force the compiler on Ubuntu Mate to target armv6 (errors--something about thumb1--can't remember off the top of my head). A workaround is to use a binary generated on Raspbian, since those are for armv6 by default. However, not being familiar with how packages are generated, I am slightly worried about what binary StellarMate users will get (they're Ubuntu Mate, right?).