Plug it
If fixing to brickwork where there are no pads, then you could use timber plugs. Timber plugs are lengths of timber, about the same width as the brickwork, which are specially shaped (by hand/axe) to do the job. They are driven into the 'raked out' joints to a depth that exceeds the length of the nails and ensure a firm hold in the brickwork. Different to 'pads', timber plugs are inserted after the brickwork has been formed so that the grain runs the opposite way; the end grain of the plug is visible when it's in place.
In practice, six plugs would be used for fixing a standard door casing, and driven to a minimum depth of about 60mm. Because the timber plug is trimmed by hand using a carpenter's axe, for safety, the length of the timber used to produce the plug should be at least 150mm. As the thickness of timber used to produce a plug would need to be about 15mm-18mm, and with the space of a brickwork joint only about 10mm the timber will need to be reduced to fit. However, if the whole plug was only 10mm thick it would be too thin and not substantial enough to support the casing, receive and hold nails, and would not tighten up when driven into the joint. Therefore, for the plug to be effective it needs to be trimmed in a special way rather than just be reduced, or reduced in a tapered wedge shape fashion. Using an axe, the timber is reduced and shaped by chopping a diminishing area to one side of the timber face as shown in the drawing above. When the same shape is chopped out on the opposite edge on the side of the timber (the flip side) this produces a flat tapered shape that will fit into the opening gap that will tighten up when driven in, and at the same time still remain the full thickness where visible outside of the gap. In addition to this, the shape produced in forming the plug forces the timber into a twisting action that will further tighten the plug in place when driven home. 
Give it space
A door casing that is narrower than the brickwork opening would normally require the difference making up by means of fiddly timber make-up pieces or packing's. However, given that timber plugs can be inserted at any length does away with this process. For example, if you needed to make up 60mm, (the difference between the casing width and the brickwork opening width), timber plugs that you have inserted could be cut down, so that they protrude 30mm at each side, there by creating a new opening equal to the width of the casing, even though the actual opening is wider.
To do this, put a pencil mark onto the top plug, 30mm from the face of the brickwork.
Place the straight-edge onto this mark, ensuring that it also spans the two plugs below. Now 'plumb up' the straight-edge by placing the spirit level on to it and mark the two lower plugs off its edge.
Next, measure from the mark on each plug, across on to the plugs opposite and place a mark to the exact width of the casing on to each one.
To double-check its accuracy, place the rigid door casing up to the marks to ensure that they all correspond. When you are satisfied that it is correct, proceed to cut each plug to length.
The other advantage of using timber plugs is that they can also be used to correct brickwork errors, that is, brickwork that has been built out of plumb.
The plugs, (as illustrated on the left), have been cut to correspond to the straightedge which is plumb. Notice that each plug is different in length, in this case, longest at the top and shorter at the bottom, compensating the brickwork error.
Continued on page 3