I lay out and do the box on the stock first. I want the lid slightly tapered, say about 1 1/2" at the rear, and around 1 1/4" at the front (depending upon what it is...these sizes I just pulled out of the air). I draw the desired lid position on the flattened side of the stock, then draw parallel lines about 1/8" inside of these lines. So now I have an opening outline that is about 1 1/4" wide at the rear, and about 1" at the front, more or less. I cut out the box opening first and get it all squared up. Then, I cut down the little shelf of wood behind the opening, in front of the buttplate to depth...usually by eye, and it ends up around 3/16" maybe. Now, I have an opening ready for dovetails. I usually take calipers or whatever is handy to use as a marking gauge and mark the depth of the dovetails along the side walls of the opening, level with the "shelf" at the rear. I usually just kind of press the depth gauge stick of the calipers against the wall of the opening, and that marks well enough.
Then, I take a chisel and stab along that line, then back cut and repeat as necessary to make the dovetails. Done almost entirely by eye. I generally don't make them as sharp as a three-corner file. They should be a bit shallower angle.
I make the lid virtually the same way. Draw out the lid and cut a lid blank to proper size and with proper taper, then with a marking gauge (I have one with a little blade in it, and it cuts the mark in), set to the same depth as the dovetails in the stock, score it off on the lid, then cut down a square shoulder there a little way, since the dovetails aren't going to be quite as wide as the lid itself (make a rabbet on each side of the lid). Now, obviously, the lid blank needs to be a bit long for fitting. Then, score it again, and back cut and make the dovetails just like in the stock. Again, I do the angle and depth entirely by eye. Then just fit the two together.