I would like to build a RPM Package for a website.
in the %post
section of my spec file I would like to check if the apache webserver is installed. If so, the config should be copied to /etc/httpd/conf.d/
If no Apache is installed, the config should just be stored in the projectfolder and the admin has to configure the webserver on his own.
So I need a construct like
if [Apache installed]
cp [configfile] /etc/httpd/conf.d/
EDIT
I found out, I maybe could use rpm -q httpd
for it. But how can I use it in the %post
section?