diff -up packaging/RHEL/samba.spec.tmpl.original packaging/RHEL/samba.spec.tmpl --- packaging/RHEL/samba.spec.tmpl.original 2009-08-12 07:33:25.000000000 -0500 +++ packaging/RHEL/samba.spec.tmpl 2009-08-14 13:00:49.000000000 -0500 @@ -1,12 +1,21 @@ %define initdir %{_sysconfdir}/rc.d/init.d %define auth %(test -f /etc/pam.d/system-auth && echo /etc/pam.d/system-auth || echo) +# Set up our distribution-specific tags & defines... +%{!?dist:%define dist %{?_with_rhel3:el3}%{?_with_rhel4:el4}%{?_with_rhel5:el5}%{?_with_rhel6:el6}} +%define RHEL3 %{?_with_rhel3:1}%{!?_with_rhel3:%(echo "%{?dist:%dist}" | grep -ic el3)} +%define RHEL4 %{?_with_rhel4:1}%{!?_with_rhel4:%(echo "%{?dist:%dist}" | grep -ic el4)} +%define RHEL5 %{?_with_rhel5:1}%{!?_with_rhel5:%(echo "%{?dist:%dist}" | grep -ic el5)} +%define RHEL6 %{?_with_rhel6:1}%{!?_with_rhel6:%(echo "%{?dist:%dist}" | grep -ic el6)} +%define disttag %{?dist:.%{dist}} + + Summary: Samba SMB client and server Vendor: Samba Team Packager: Samba Team Name: samba Version: PVERSION -Release: PRELEASEPRPMREV +Release: PRELEASEPRPMREV%{disttag} Epoch: 0 License: GNU GPL version 3 Group: System Environment/Daemons @@ -28,7 +37,11 @@ Provides: samba = %{version} Prefix: /usr BuildRoot: %{_tmppath}/%{name}-%{version}-root +%if %{RHEL5} || %{RHEL6} +BuildRequires: pam-devel, readline-devel, fileutils, libacl-devel, openldap-devel, krb5-devel, cups-devel, keyutils-libs-devel +%else BuildRequires: pam-devel, readline-devel, fileutils, libacl-devel, openldap-devel, krb5-devel, cups-devel, keyutils-devel +%endif # Working around perl dependency problem from docs %define __perl_requires %{SOURCE998}