Almost from scratch!
I built myself a late 15th/early 16th C Arquebus when I was a re-enactor. It was mainly for public demos but I have tried it with ball at 50m on occasion.
I wasn't able to do the machining myself. I started with a very heavy barrel turned from solid round bar. I drew up the complete gun in Autocad and then had the barrel machined to a tapered octagon with a flared muzzle.
The stock blank was bandsawed from wood picked out at the timber merchants and was then shaped and the barrel inlet using the old candle black method. The lock, which is a snap matchlock, was sawed, filed, drilled etc from MS stock from a model engineering supplier.
Steve.