From 3af8c7577fbfa9844c774c3968833027d1f10f21 Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Wed, 22 Jun 2016 14:21:08 +0200 Subject: [PATCH] multilib: delegate decisions to multilib-rpm-config Related: rhbz#1286193 Version: 2.3.4-3 --- conffile.h | 31 ------------------------------- unixODBC.spec | 21 ++++++--------------- 2 files changed, 6 insertions(+), 46 deletions(-) delete mode 100644 conffile.h diff --git a/conffile.h b/conffile.h deleted file mode 100644 index 0996b35..0000000 --- a/conffile.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Kluge to support multilib installation of both 32- and 64-bit RPMS: - * we need to arrange that header files that appear in both RPMs are - * identical. Hence, this file is architecture-independent and calls - * in an arch-dependent file that will appear in just one RPM. - * - * To avoid breaking arches not explicitly supported by Red Hat, we - * use this indirection file *only* on known multilib arches. - * - * Note: this may well fail if user tries to use gcc's -I- option. - * But that option is deprecated anyway. - */ -#if defined(__x86_64__) -#include "CONFFILE_x86_64.h" -#elif defined(__ia64__) -#include "CONFFILE_ia64.h" -#elif defined(__i386__) -#include "CONFFILE_i386.h" -#elif defined(__ppc64__) || defined(__powerpc64__) -#include "CONFFILE_ppc64.h" -#elif defined(__ppc__) || defined(__powerpc__) -#include "CONFFILE_ppc.h" -#elif defined(__s390x__) -#include "CONFFILE_s390x.h" -#elif defined(__s390__) -#include "CONFFILE_s390.h" -#elif defined(__sparc__) && defined(__arch64__) -#include "CONFFILE_sparc64.h" -#elif defined(__sparc__) -#include "CONFFILE_sparc.h" -#endif diff --git a/unixODBC.spec b/unixODBC.spec index 484707c..dbc77a3 100644 --- a/unixODBC.spec +++ b/unixODBC.spec @@ -1,7 +1,7 @@ Summary: A complete ODBC driver manager for Linux Name: unixODBC Version: 2.3.4 -Release: 2%{?dist} +Release: 3%{?dist} Group: System Environment/Libraries URL: http://www.unixODBC.org/ # Programs are GPL, libraries are LGPL, except News Server library is GPL. @@ -9,7 +9,6 @@ License: GPLv2+ and LGPLv2+ Source: http://www.unixODBC.org/%{name}-%{version}.tar.gz Source1: odbcinst.ini -Source4: conffile.h Source5: README.dist Patch6: export-symbols.patch @@ -20,6 +19,7 @@ Conflicts: iodbc BuildRequires: automake autoconf libtool libtool-ltdl-devel bison flex BuildRequires: readline-devel +BuildRequires: multilib-rpm-config %description Install unixODBC if you want to access databases through ODBC. @@ -79,19 +79,7 @@ make all %install make DESTDIR=$RPM_BUILD_ROOT install install -m644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir} - -# multilib header hacks -# we only apply this to known Red Hat multilib arches, per bug #181335 -case `uname -i` in - i386 | x86_64 | ia64 | ppc | ppc64 | s390 | s390x | sparc | sparc64 ) - mv $RPM_BUILD_ROOT%{_includedir}/unixodbc_conf.h $RPM_BUILD_ROOT%{_includedir}/unixodbc_conf_`uname -i`.h - rm -f unixodbc_conf.h - sed s/CONFFILE/unixodbc_conf/ %{SOURCE4} >unixodbc_conf.h - install -m 644 unixodbc_conf.h $RPM_BUILD_ROOT%{_includedir} - ;; - *) - ;; -esac +%multilib_fix_c_header --file %{_includedir}/unixodbc_conf.h # add some explanatory documentation cp %{SOURCE5} README.dist @@ -146,6 +134,9 @@ done %postun -p /sbin/ldconfig %changelog +* Wed Jun 22 2016 Pavel Raiskup - 2.3.4-3 +- delegate multilib hacks to multilib-rpm-config package + * Fri Feb 05 2016 Fedora Release Engineering - 2.3.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild