Assuming you have a valid installpath in installurl(5)
or PKG_PATH in your environment, simply install the package shipped with the OS:
$ doas pkg_add trac
Powered by Trac 1.4.3
By Edgewall Software
Visit the Trac open source project athttps://trac.edgewall.org/
Copyright © 2003-2021 Edgewall Software. All rights reserved.