Hello, and welcome to the forum- First thing, make sure you have installed:
Code:
yum install rpm-build rpmdevtools redhat-rpm-config rpmlint
In Fedora, you build rpm packages as a regular user, not as root. After installing the above, in your regular user home directory, give the command:
rpmdev-setuptree
That will create the directory
rpmbuild with the appropriate sub-directories:
Code:
BASH:~/-> ls rpmbuild/
BUILD BUILDROOT RPMS SOURCES SPECS SRPMS
You can 'cd rpmbuild/SPECS' then:
rpmdev-newspec [appname.spec] If you omit the appname.spec option, it will create a basic spec file template using the name "newpackage.spec", which you can rename to suit your needs. You can find a lot of very useful information by reading the files located under these varios directories:
Code:
BASH:~/-> ls /usr/share/doc/rpm <hit TAB key twice>
rpm-4.7.2/ rpmdevtools-7.8/ rpmlint-0.95/ rpmrebuild-2.4/
For guidance on the official Fedora way of building rpm packages, go to:
Packaging Guidelines
RPM Guide
How To Create an RPM Package
There are many other helpful guides on the Fedora Project wiki site for guidance on building rpm packages. But this should be enough to get you started.