Set dependency for package from EPEL in spec file

703 Views Asked by At

I'm writing a spec file for software that depends on php-mcrypt. My target OS is CentOS 6.5 php-mcrypt isn't in the CentOS repositories, but it is in EPEL. Is there a better way to satisfy this dependency on the Requires: line rather than manually installing EPEL in %pre? I really don't like the idea of forcing the install of another repo in an RPM, but I also don't like it when RPMs fail to install over a dependency that doesn't seem to exist until someone gets clever enough to start searching through various foreign repos.

What's the best way to handle this?

1

There are 1 best solutions below

0
On

I don't know of a better way to indicate this specific detail on the Requires line.

The only thing you could do, other than your suggestions, would be to also depend on the epel-release package which would at least give them a more specific hint in the correct direction. The only problem/downside to this is that you then depend on their having installed that package/repo instead of just having installed the EPEL php-mcrypt package on their own/etc.