Dark-matter halo profiles of a general cusp/core with analytic velocity and potential