From: Denice <dea...@tr...> - 2006-09-07 00:26:04
|
Hi, I built this RPM (smartmontools-5.36-1.src.rpm) on a Scientific Linux 3.05 system today. Since it is a red hat clone, it has /etc/redhat-release. However in the test below: %define redhat %(test ! -f /etc/redhat-release ; echo $?) %define redhat %(test ! -f /etc/fedora-release ; echo $?) the 'redhat' variable is first set to true, and then set to false when testing for fedora. This doesn't matter very much in this spec file, until you modify it to make use of this variable - in my case I was changing the names of the binaries to avoid conflicts when having both this rpm and the smartd provided with kernel-utils installed. Thus I wanted to test for redhat-ness when renaming binaries during the %install phase. So something like the following might be better to cover both redhat and fedora in the spec file: %define redhat %(test ! -f /etc/redhat-release ; echo $?) %define fedora %(test ! -f /etc/fedora-release ; echo $?) %if %{fedora} %define redhat 1 %endif cheers, Denice -- deatrich @ triumf.ca, Science/Atlas PH: +1 604-222-7665 <*> This moment's fortune cookie: Birthdays are like busses, never the number you want. |