Documentation for creating a Board Manager profile for the Arduino IDE
Documentation is kind of scarce.

Basically there are two aspects to what you want - the board definition and the board manager JSON file.

The first describes the board to both the IDE (entry in boards.txt) and to the API software (definition of what pins are what and what peripherals are where, etc).  The latter is in the file pins_arduino.h.

Then there is the JSON file that describes the whole package to the board manager and is what allows people to download the boards.txt and pins_arduino.h files (and anything else you may require) from your website.

As there is not much documentation you are best off taking an existing set of files that are close to what you want and modifying them.  Most of the time it will be a slight tweak such as re-ordering a few pins in some arrays, or changing the name of the board and maybe an upload command or baud rate setting.