Search code examples
macosrpmfink

How can I build an RPM on my MacOS system?


I'm running Mac OS X 10.6.6. I have some data-only RPMs that I'd like to build.

Until recently I've done most of my development on a VM running CentOS, but one by one I've been able to transition these tasks to the Mac proper. I've been using Fink to access the Open/Free tools I need, but I'm not ready to go to Fink unstable, where the RPM5 package has been for a while.

I've also tried to build the RPM utilities from source, with little luck so far.

Is anyone else building RPMs natively on a Mac? If so, how?


Solution

  • You can install rpmbuild on MacOS using Homebrew package manager.

    brew install rpm
    

    This installs a bunch of packages including rpmbuild which is used to build an rpm. You can then run the following command to create an rpm

    rpmbuild <specfile>