5 spice powder can be obtained by picking and choosing from up to 8 spices. Each variation may depend on which region or nation uses it. So, it's not at all confusing. The good news is there really are no rules except that which tastes good to you.
Toast the whole spices and seeds in a sauté pan on low heat with no oil. Shake the pan frequently to prevent burning and allow all spices access to the heat. When you can smell the spices, remove them from the heat to cool.
When cool, grind all whole spices together in spice grinder. Add powders, if you are using them, and store mix in a dark bottle in a dark cabinet.