Netatalk has been around for like 25 years: https://github.com/Netatalk/Netatalk
Relevant to the discussion is that the project comes with an AFP client as well. I have no experience with the client but I've used the Netatalk server for more than 15 years.
I've already built it: https://github.com/jamesyc/TimeCapsuleSMB
This runs Samba 4 on the Apple Time Capsule.