Re: SPEC files: Include RHEL distribution in the release

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Joel Heenan wrote:
I'm building an RPM on a number of different RHEL versions. Is there
something I can include in the RPM spec file which will auto-set the
distribution name and version?

I tried:

Release: 1%{distribution}

In the spec file but this did not seem to do the trick. I'm feeling what
I'm trying to achieve is simple but I haven't found any examples yet.

Hi,

create a .rpmmacros file in your home:

all in one line:
#############################
%distribution ) %(echo `cat /etc/redhat-release | grep -q '^CentOS release 4' && echo 'el4'`)%(echo `cat /etc/redhat-release | grep -q '^CentOS release 5' && echo 'el5'`)
#############################

you may add other systems as well

--
Mit freundlichen Grüssen,
Mag. Jürgen Zahrer

Leiter System Services
Universität Salzburg / ITServices

Hellbrunner Strasse 34
5020 Salzburg
Austria

Phone: ++43-(0)662-8044-6745
Cell: ++43-(0)664-2823790
Fax: ++43-(0)662-6389-6745
key ID 7B34AB4C


--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux