Building an Empty RPM

When searching for information on creating an empty, or null rpm file, I was unable to locate the spec file details needed. In another post, I will describe my need for this empty rpm, but for now here is the minimal spec file needed to build an empty rpm:

Place the following in a file called, php.spec

Summary: Empty PHP
Name: php
Version: 0
Release: 0
License: Public
Group: Applications/System

Now, build your new php rpm using the following command:

# rpmbuild -bb php.spec
Processing files: php-0-0
Checking for unpackaged file(s): /usr/lib/rpm/check-files %{buildroot}
Wrote: /usr/src/redhat/RPMS/i386/php-0-0.i386.rpm

And that’s it, you now have an empty rpm!