You want to rotate from an angle, say theta, to a different angle, say phi, in a direction d (1 for CCW, -1 for CW) in a given time, say t, along the axis of your choice about a point (x, y, z). Your angular velocity then has to be
about that axis, which gives you the angle you must rotate per frame to reach your goal in your goal time. However, FPS can change so you must recalculate omega accordingly.
So you now know how fast you're rotating the object, but you're not quite sure how to get to rotate about a certain point. What you do know is that OpenGL provides support for rotating about the origin
, so you can subtract (x, y, z) from your point P to center your rotation around the origin, rotate, and then add back (x, y, z). As such, we our transform becomes P = Rotate(P - (x, y, z), omega) + (x, y, z), and you're done.
So this is going to be pretty general, but I'm sure you can find out a way to do it in code.