I wonder why you would do it. Hortonworks already distributes official RPMs you can leverage. Source code is, of course, available to everyone, but when you try and build custom packages, support won't be able to assist you with those clusters.
@kiwi han are you still having issues? Can you accept the best answer or provide your own solution?