You wrote a piece of software and want to distribute it on an easy way through a yum repository? That can be done, by making in the first place an rpm package of your code.

In the first place you need to set up a directory structure. This can be done using the tool rpmdevtools on a rhel based machine:

# yum install rpmdevtools

Once you installed the software you need to setup the directory tree:

$ rpmdev-setuptree

This will install the necessary rmpbuild directory tree.

You will see there is create a SOURCES directory, you need to get your software source …