There is going to be a tad more information than you asked for. I assume that the original question poster knows how rpmbuild works, but maybe someone else doesn't.
Simple procedure to create an RPM installing two files.
Create directory hierarchy for rpmbuild: mkdir -p ~/rpmbuild/
.
Copy some example content to your your dummy RPM files (these are needed when using the SPEC file later on in this example): cp /etc/profile ~/rpmbuild/SOURCES/dummy.file && cp /etc/shells ~/rpmbuild/dummy.another.file
.
Paste following into ~/rpmbuild/SPEC/dummyrpmfile.spec
:
Summary: A dummy RPM. Creates file /etc/dummy/file. Name: dummyrpmfile Version: 0.1 Release: 1 Vendor: Super User Packager: Super User License: GPL Group: System Environment/Base BuildArch: noarch Source0: dummy.file Source1: dummy.another.file Prefix: /etc/dummy %description A dummy RPM. Creates file /etc/dummy/file. And also directory /etc/dummy. Very cool package. You should install this. Oh, yes, and it also makes /etc/dummy/another.file too. %install # create directory /etc/dummy % -d -m0755 %/etc/dummy # and copy the file from SOURCES/file to <buildroot>/etc/dummy % -m 0644 % %/etc/dummy/file % -m 0644 % %/etc/dummy/another.file %files /etc/dummy/file /etc/dummy/another.file
Then run cd ~/rpmbuild && rpmbuild -ba SPEC/dummyrpmfile.spec
.
This should produce a "noarch" RPM in case it's just data and such which doesn't have differ between 32-bit and 64-bit architectures for example. Results should be in ~/rpmbuild/RPMS/noarch/dummyrpmfile.rpm
.
Help links: How Prefix works.