Vendor repo for Paranoid Android to build TWRP from source. Just include the .mk in your device makefile to compile it.
Needed dependencies on AOSP: