Fri, 23 Aug 2013

CentOS 5 RPM SPEC File Nonsense

Because CentOS doesn't include buildsys-macros-rhel for some reason, a few useful macros in RPM SPEC files aren't included, like dist and el5. To fix that:

	
	    %define distribution        %(/usr/lib/rpm/redhat/dist.sh --distnum)
	    %if %{distribution} == 5
		%define dist .el5
		%define el5 1
	    %endif
	
    

Posted at: 15:54 | category: /computers/rhel | Link