Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I build an RPM on my MacOS system?

Tags:

macos

rpm

fink

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?

like image 813
John Trammell Avatar asked Mar 09 '11 14:03

John Trammell


People also ask

Can RPM be installed on Mac?

You can install rpmbuild on MacOS using Homebrew package manager.

How do I write an RPM spec?

Working with SPEC files To package new software, you need to create a new SPEC file. Instead of writing it manually from scratch, use the rpmdev-newspec utility. It creates an unpopulated SPEC file, and you fill in the necessary directives and fields. Place them in ~/rpmbuild/SOURCES .

What is RPM installer?

RPM Package Manager (also known as RPM), originally called the Red-hat Package Manager, is an open source program for installing, uninstalling, and managing software packages in Linux. RPM was developed on the basis of the Linux Standard Base (LSB).


1 Answers

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> 
like image 109
Ravi Naik Avatar answered Sep 21 '22 19:09

Ravi Naik