For cooks at home, there's no doubt that, for the most part, buying spices whole is best. First, and most importantly, spices, once ground, quickly lose much of their original pungency, whilst whole spices keep their exotic flavour and fragrance locked in for far longer. Then, when the spices are dry roasted and subjected to heat, all those sublime flavours and aromas can be drawn out in a matter of moments.
First of all you need to roast the whole spices, and to do this place them in a small frying pan or saucepan over a medium heat and stir and toss them around for 1-2 minutes, or until they begin to look toasted and start to jump in the pan.
Now transfer them to a pestle and mortar, crush them to a powder or coarsely grind them according to the recipe instructions. This will be easier to do now that they have been roasted.