I think that the IP address would be obtained from and/or set by the operating system. Your friend could use DHCP or assign a static address.
This phrase is a little confusing.
Are you going to compile TVHeadEnd from scratch or are you going to install it from a repository?
With regards to moving the unit to your friend's house. You can stop TVH via systemctl, delete the TVH config files and the Setup Wizard will automatically run the next time that you browse to TVH WebUI.
You could also just use the WebUI to delete the channels (you can multi-select), channel tags and network and then go into the 'Base' configuration on the WebUI and select 'Start wizard'. This will re-run the setup at your friend's house and tune for the channels available there.