[Exim] [PATCH] spec file patch for Conectiva

Pàgina inicial
Delete this message
Reply to this message
Autor: Rik van Riel
Data:  
A: Exim-users
Assumpte: [Exim] [PATCH] spec file patch for Conectiva
Hi,

with the following patch to the spec file, it becomes possible to
compile the exim RPM (from ftp://ftp.exim.org/pub/rpms-for-exim/)
on Conectiva Linux.

It also changes the obsolete Copyright: header to License:

Note that I still needed to add an exim user to /etc/passwd in
order to compile the RPM... Strange.

Rik
--
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan


--- SPECS/exim.spec.422-orig    2003-08-24 12:45:20.000000000 -0400
+++ SPECS/exim.spec    2003-08-24 13:13:05.000000000 -0400
@@ -6,6 +6,7 @@


# Deduce the major release of Red Hat we are building on
%define redhatmajorver %(rpm -q --queryformat='%{VERSION}' redhat-release|cut -d. -f1)
+%define cncmajorver %(rpm -q --queryformat='%{VERSION}' conectiva-release|cut -d. -f1)

# what version of RH are we building for?
%define redhat9 %(if [ "%{redhatmajorver}" = "9" ];then echo 1;else echo 0;fi)
@@ -13,6 +14,8 @@
%define redhat7 %(if [ "%{redhatmajorver}" = "7" ];then echo 1;else echo 0;fi)
%define redhat6 %(if [ "%{redhatmajorver}" = "6" ];then echo 1;else echo 0;fi)

+%define conectiva9 %(if [ "%{cncmajorver}" = "9" ];then echo 1;else echo 0;fi)
+
# options for components
%define build_mysql 1
%define build_pgsql 1
@@ -71,8 +74,11 @@
%if %{redhat8}
%define release %{releasenum}_%{exiscanrev}.rh8x
%endif
+%if %{conectiva9}
+%define release %{releasenum}_%{exiscanrev}.cl9
+%endif
Release: %{release}
-Copyright: GPL
+License: GPL
Url: http://www.exim.org/
Group: System Environment/Daemons
Buildroot: %{_tmppath}/%{name}-build.root
@@ -81,7 +87,11 @@
PreReq: /sbin/service
PreReq: /sbin/chkconfig
PreReq: openssl >= 0.9.5a
+%if %{conectiva9}
+## multiple openssl<version> rpms, prereq doesn't work
+%else
PreReq: openssl = %{exact_openssl_version}
+%endif
Requires: openssl >= 0.9.5a
##Requires: bash >= 2.0
Requires: rpm >= 3.0.5
@@ -105,7 +115,7 @@
Source15: sa-exim-%{saversion}.tar.gz
Patch0: exim-%{eximversion}-buildconfig.patch
Patch1: http://duncanthrax.net/exiscan-acl/exiscan-acl-%{version}-%{exiscanrev}.patch
-%if %{redhat8} || %{redhat9}
+%if %{redhat8} || %{redhat9} || %{conectiva9}
BuildRequires: db4-devel
%else
BuildRequires: db3-devel
@@ -113,8 +123,12 @@
BuildRequires: openssl-devel
BuildRequires: XFree86-devel
%if %{build_mysql}
+%if %{conectiva9}
+BuildRequires: MySQL-devel
+%else
BuildRequires: mysql-devel
%endif
+%endif
%if %{build_pgsql}
BuildRequires: postgresql-devel
%endif