get the cif file from an crystallography repository; use the cif2cell program (https://sourceforge.net/projects/cif2cell/) which supports the direct generation of input files for a lot of first-principles codes and the generation of supercells as well.
I use xcrysden to view the resulting file (switch the displayed unit cell to "translational") to make sure the generation worked properly.