changeset 946:26f85f626840

rpm: update spec file to build on various distributions Based on the spec file used to build on various distributions on the SuSE build service.
author Simon Horman <horms@verge.net.au>
date Tue, 01 Nov 2016 10:48:49 +0100
parents de67c5c7c866
children 3f0c23016119
files perdition.spec.in
diffstat 1 files changed, 27 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/perdition.spec.in	Mon Oct 31 15:26:46 2016 +0100
+++ b/perdition.spec.in	Tue Nov 01 10:48:49 2016 +0100
@@ -1,6 +1,8 @@
 %define ver      @VERSION@
 %define rel      1
 
+%global debug_package %{nil}
+
 ## Our optional build-time flags.  Since the configuration script
 #  defaults to --enable-FEATURE we only set the --disable-FEATURE
 #  versions here.  NOTE: We default to ENABLE
@@ -21,7 +23,7 @@
 Release: %rel
 License: GPL
 Group: Applications/Internet
-Source: http://horms.net/projects/perdition/download/%{ver}/perdition-%{ver}.tar.bz2
+Source: http://horms.net/projects/perdition/download/%{ver}/perdition-%{ver}.tar.xz
 BuildRoot: %{_tmppath}/perdition-%{PACKAGE_VERSION}-root
 URL: http://horms.net/projects/perdition/
 Provides: perdition-%{ver}-%{rel}
@@ -39,25 +41,37 @@
 %{!?_without_ssl:BuildRequires: openssl-devel}
 %{!?_without_odbc:BuildRequires: unixODBC-devel}
 
-%if 0%{?suse_version} || 0%{?fedora_version} || 0%{?centos_version} >= 600 || 0%{?rhel_version} >= 600
-BuildRequires: popt-devel
+%if 0%{?centos_version} && 0%{?centos_version} < 600 || 0%{?rhel_version} && 0%{?rhel_version} < 600
+BuildRequires: popt
 %else
 %if 0%{?mandriva_version}
 BuildRequires: libpopt-devel
 %else
-BuildRequires: popt
+BuildRequires: popt-devel
 %endif
 %endif
 
 %if %{?_without_bdb:0}%{!?_without_bdb:1}
+%if 0%{?centos_version} && 0%{?centos_version} < 700
+BuildRequires: db-devel
+%else
+%if 0%{?rhel_version} && 0%{?rhel_version} < 700
+BuildRequires: db-devel
+%else
 %if 0%{?suse_version}
 BuildRequires: db-devel
 %else
 %if 0%{?mandriva_version}
 BuildRequires: libdb4.6-devel
 %else
+%if 0%{?scientificlinux_version} == 600
+BuildRequires: db4-devel
+%else
+BuildRequires: libdb-devel
 %endif
-BuildRequires: db4-devel
+%endif
+%endif
+%endif
 %endif
 %endif
 
@@ -69,6 +83,12 @@
 %endif
 %endif
 
+%if %{?_without_odbc:0}%{!?_without_odbc:1}
+%if 0%{?suse_version} >= 1200 && 0%{?suse_version} <= 1320
+BuildRequires: libtool-ltdl-devel
+%endif
+%endif
+
 %if 0%{?suse_version}
 PreReq: %insserv_prereq %fillup_prereq
 %else
@@ -80,6 +100,8 @@
 %endif
 %endif
 
+Requires: libvanessa_socket2 >= 0.0.12
+
 %description
 Perdition is a fully featured POP3 and IMAP4 proxy server. It is able to
 handle both SSL and non-SSL connections and redirect users to a