rpms/soci/F-10 import.log, NONE, 1.1 soci-3.0.0-fix-gcc43-compatibility.patch, NONE, 1.1 soci-3.0.0-fix-gnu-autotools-compatibility.patch, NONE, 1.1 soci.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Denis Arnaud denisarnaud at fedoraproject.org
Mon May 4 22:02:37 UTC 2009


Author: denisarnaud

Update of /cvs/pkgs/rpms/soci/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv11867/F-10

Modified Files:
	.cvsignore sources 
Added Files:
	import.log soci-3.0.0-fix-gcc43-compatibility.patch 
	soci-3.0.0-fix-gnu-autotools-compatibility.patch soci.spec 
Log Message:
* Tue May 04 2009 Denis Arnaud <denis.arnaud_fedora at m4x.org> 3.0.0-6
- First import into Fedora




--- NEW FILE import.log ---
soci-3_0_0-6_fc10:F-10:soci-3.0.0-6.fc10.src.rpm:1241474307

soci-3.0.0-fix-gcc43-compatibility.patch:

--- NEW FILE soci-3.0.0-fix-gcc43-compatibility.patch ---
diff -u -r soci-3.0.0_ref/src/backends/mysql/common.h soci-3.0.0_working/src/backends/mysql/common.h
--- soci-3.0.0_ref/src/backends/mysql/common.h  2008-07-03 09:22:57.000000000 +0200
+++ soci-3.0.0_working/src/backends/mysql/common.h      2009-03-26 15:33:33.000000000 +0100
@@ -10,6 +10,7 @@

 #include <sstream>
 #include "soci-mysql.h"
+#include <ctime>

 namespace soci
 {
diff -u -r soci-3.0.0_ref/src/backends/mysql/session.cpp soci-3.0.0_working/src/backends/mysql/session.cpp
--- soci-3.0.0_ref/src/backends/mysql/session.cpp       2008-05-15 15:58:38.000000000 +0200
+++ soci-3.0.0_working/src/backends/mysql/session.cpp   2009-03-26 15:34:50.000000000 +0100
@@ -11,7 +11,8 @@
 #include <cctype>
 #include <cerrno>
 #include <ciso646>
-
+#include <cstdlib>
+#include <climits>

 #ifdef _MSC_VER
 #pragma warning(disable:4355)
diff -u -r soci-3.0.0_ref/src/backends/mysql/standard-into-type.cpp soci-3.0.0_working/src/backends/mysql/standard-into-type.cpp
--- soci-3.0.0_ref/src/backends/mysql/standard-into-type.cpp    2008-05-30 13:33:45.000000000 +0200
+++ soci-3.0.0_working/src/backends/mysql/standard-into-type.cpp        2009-03-26 15:34:09.000000000 +0100
@@ -12,6 +12,8 @@
 #include "common.h"
 #include <ciso646>
 #include <cassert>
+#include <ctime>
+#include <cstring>

 #ifdef _MSC_VER
 #pragma warning(disable:4355)
diff -u -r soci-3.0.0_ref/src/backends/mysql/vector-use-type.cpp soci-3.0.0_working/src/backends/mysql/vector-use-type.cpp
--- soci-3.0.0_ref/src/backends/mysql/vector-use-type.cpp       2008-05-15 15:58:38.000000000 +0200
+++ soci-3.0.0_working/src/backends/mysql/vector-use-type.cpp   2009-03-26 15:33:14.000000000 +0100
@@ -13,6 +13,7 @@
 #include <ciso646>
 #include <limits>
 #include <cstring>
+#include <ctime>

 #ifdef _MSC_VER
 #pragma warning(disable:4355)

soci-3.0.0-fix-gnu-autotools-compatibility.patch:

--- NEW FILE soci-3.0.0-fix-gnu-autotools-compatibility.patch ---
diff -Nur soci-3.0.0_4-pack/aclocal.m4 soci-3.0.0_trep300/aclocal.m4
--- soci-3.0.0_4-pack/aclocal.m4	1970-01-01 01:00:00.000000000 +0100
+++ soci-3.0.0_trep300/aclocal.m4	2009-05-03 00:20:33.000000000 +0200
@@ -0,0 +1,7512 @@
+# generated automatically by aclocal 1.10.1 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(AC_AUTOCONF_VERSION, [2.63],,
+[m4_warning([this file was generated for autoconf 2.63.
+You have another version of autoconf.  It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically `autoreconf'.])])
+
+# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
+
+# serial 52 AC_PROG_LIBTOOL
+
+
+# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
+# -----------------------------------------------------------
+# If this macro is not defined by Autoconf, define it here.
+m4_ifdef([AC_PROVIDE_IFELSE],
+         [],
+         [m4_define([AC_PROVIDE_IFELSE],
+	         [m4_ifdef([AC_PROVIDE_$1],
+		           [$2], [$3])])])
+
+
+# AC_PROG_LIBTOOL
+# ---------------
+AC_DEFUN([AC_PROG_LIBTOOL],
+[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
+dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
+dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
+  AC_PROVIDE_IFELSE([AC_PROG_CXX],
+    [AC_LIBTOOL_CXX],
+    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
+  ])])
+dnl And a similar setup for Fortran 77 support
+  AC_PROVIDE_IFELSE([AC_PROG_F77],
+    [AC_LIBTOOL_F77],
+    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
+])])
+
+dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
+dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
+dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
+  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
+    [AC_LIBTOOL_GCJ],
+    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
+      [AC_LIBTOOL_GCJ],
+      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
+	[AC_LIBTOOL_GCJ],
+      [ifdef([AC_PROG_GCJ],
+	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
+       ifdef([A][M_PROG_GCJ],
+	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
+       ifdef([LT_AC_PROG_GCJ],
+	     [define([LT_AC_PROG_GCJ],
+		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
+])])# AC_PROG_LIBTOOL
+
+
+# _AC_PROG_LIBTOOL
+# ----------------
+AC_DEFUN([_AC_PROG_LIBTOOL],
+[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+AC_SUBST(LIBTOOL)dnl
+
+# Prevent multiple expansion
+define([AC_PROG_LIBTOOL], [])
+])# _AC_PROG_LIBTOOL
+
+
+# AC_LIBTOOL_SETUP
+# ----------------
+AC_DEFUN([AC_LIBTOOL_SETUP],
+[AC_PREREQ(2.50)dnl
+AC_REQUIRE([AC_ENABLE_SHARED])dnl
+AC_REQUIRE([AC_ENABLE_STATIC])dnl
+AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_PROG_LD])dnl
+AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
+AC_REQUIRE([AC_PROG_NM])dnl
+
+AC_REQUIRE([AC_PROG_LN_S])dnl
+AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
+# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
+AC_REQUIRE([AC_OBJEXT])dnl
+AC_REQUIRE([AC_EXEEXT])dnl
+dnl
+AC_LIBTOOL_SYS_MAX_CMD_LEN
+AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+AC_LIBTOOL_OBJDIR
+
+AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+_LT_AC_PROG_ECHO_BACKSLASH
+
+case $host_os in
+aix3*)
+  # AIX sometimes has problems with the GCC collect2 program.  For some
+  # reason, if we set the COLLECT_NAMES environment variable, the problems
+  # vanish in a puff of smoke.
+  if test "X${COLLECT_NAMES+set}" != Xset; then
+    COLLECT_NAMES=
+    export COLLECT_NAMES
+  fi
+  ;;
+esac
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='sed -e 1s/^X//'
+[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
+
+# Same as above, but do not quote variable references.
+[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+# Constants:
+rm="rm -f"
+
+# Global variables:
+default_ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+ltmain="$ac_aux_dir/ltmain.sh"
+ofile="$default_ofile"
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+AC_CHECK_TOOL(AR, ar, false)
+AC_CHECK_TOOL(RANLIB, ranlib, :)
+AC_CHECK_TOOL(STRIP, strip, :)
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+test -z "$AS" && AS=as
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+test -z "$LD" && LD=ld
+test -z "$LN_S" && LN_S="ln -s"
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+test -z "$NM" && NM=nm
+test -z "$SED" && SED=sed
+test -z "$OBJDUMP" && OBJDUMP=objdump
+test -z "$RANLIB" && RANLIB=:
+test -z "$STRIP" && STRIP=:
+test -z "$ac_objext" && ac_objext=o
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+  case $host_os in
+  openbsd*)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+    ;;
+  *)
[...59819 lines suppressed...]
+Group:          Development/Libraries
+Requires:       %{name}-devel = %{version}-%{release}
+Requires:       %{name}-mysql = %{version}-%{release}
+Requires:       mysql-devel >= 5.0
+
+%description    mysql-devel
+This package contains the MySQL backend for %{name}, i.e., header
+files and dynamic libraries specific to the MySQL database. If you
+would like to develop programs using %{name} and MySQL, you will need
+to install %{name}-mysql.}
+
+%{?with_postgresql:%package        postgresql-devel
+Summary:        PostGreSQL backend for %{name}
+Group:          Development/Libraries
+Requires:       %{name}-devel = %{version}-%{release}
+Requires:       %{name}-postgresql = %{version}-%{release}
+Requires:       postgresql-devel >= 7.1
+
+%description    postgresql-devel
+This package contains the PostGreSQL backend for %{name}, i.e., header
+files and dynamic libraries specific to the PostGreSQL database. If
+you would like to develop programs using %{name} and PostGreSQL, you
+will need to install %{name}-postgresql.}
+
+%{?with_oracle:%package        oracle-devel
+Summary:        Oracle backend for %{name}
+Group:          Development/Libraries
+Requires:       %{name}-devel = %{version}-%{release}
+Requires:       %{name}-oracle = %{version}-%{release}
+
+%description    oracle-devel
+This package contains the Oracle backend for %{name}, i.e., header
+files and dynamic libraries specific to the Oracle database. If you
+would like to develop programs using %{name} and Oracle, you will need
+to install %{name}-oracle.}
+
+
+%package doc
+Summary:        HTML documentation for the @PACKAGE_NAME@ library
+Group:          Documentation
+BuildArch:      noarch
+BuildRequires:  doxygen, texlive-latex, texlive-dvips, ghostscript
+
+%description doc
+This package contains the documentation in the HTML format of the @PACKAGE_NAME@
+library. The documentation is the same as at the @PACKAGE_NAME@ web page.
+
+
+%prep
+%setup -q
+# Rename change-log and license file, so that they comply with
+# packaging standard
+mv CHANGES ChangeLog
+mv LICENSE_1_0.txt COPYING
+rm -f INSTALL
+# Apply the g++ 4.3 compatibility patch
+%patch0 -p1
+# Remove MacOSX compatibility building files
+rm -f build/unix/._*.tcl
+rm -f ._Makefile ._configure
+rm -f soci/core/._*.h soci/core/._*.cpp
+rm -f soci/backends/postgresql/._*.h
+rm -f doc/._*.html
+# Rename the source code directory, so that the files (e.g, header
+# files) can be exported correctly into {_standard_dir}/%{name}
+mv src %{name}
+# Apply the GNU Autotools compatibility patch
+%patch1 -p1
+# Fix some permissions and formats
+find ./doc -type f -perm 755 -exec chmod 644 {} \;
+chmod -x AUTHORS ChangeLog COPYING NEWS README
+# find . -type f -name '*.[hc]pp' -exec chmod 644 {} \;
+
+
+%build
+%configure --disable-static \
+%{?with_mysql:--enable-backend-mysql} \
+%{?with_postgresql:--enable-backend-postgresql} \
+%{?with_oracle:--enable-backend-oracle %{?_with_oracle_incdir} %{?_with_oracle_libdir}}
+make %{?_smp_mflags}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+make install DESTDIR=$RPM_BUILD_ROOT
+##
+#  Remove unpackaged files from the buildroot
+rm -f $RPM_BUILD_ROOT%{_includedir}/%{name}/config.h
+rm -f $RPM_BUILD_ROOT%{_libdir}/lib%{name}_*.la
+##
+##
+#  Duplicate the header files, so as to keep the compatibility, for
+#  developers using the SOCI library, with the non-packaged version of
+#  that library.
+for header_file in $RPM_BUILD_ROOT%{_includedir}/%{name}/core/*.h; do
+  cp ${header_file} $RPM_BUILD_ROOT%{_includedir}/%{name}
+done
+%{?with_mysql:cp $RPM_BUILD_ROOT%{_includedir}/%{name}/backends/mysql/soci-mysql.h $RPM_BUILD_ROOT%{_includedir}/%{name}}
+%{?with_postgresql:cp $RPM_BUILD_ROOT%{_includedir}/%{name}/backends/postgresql/soci-postgresql.h $RPM_BUILD_ROOT%{_includedir}/%{name}}
+%{?with_oracle:cp $RPM_BUILD_ROOT%{_includedir}/%{name}/backends/oracle/soci-oracle.h $RPM_BUILD_ROOT%{_includedir}/%{name}}
+
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%{?with_mysql:%post mysql -p /sbin/ldconfig
+
+%postun mysql -p /sbin/ldconfig}
+
+%{?with_postgresql:%post postgresql -p /sbin/ldconfig
+
+%postun postgresql -p /sbin/ldconfig}
+
+%{?with_oracle:%post oracle -p /sbin/ldconfig
+
+%postun oracle -p /sbin/ldconfig}
+
+
+
+%files
+%defattr(-,root,root,-)
+%doc AUTHORS ChangeLog COPYING NEWS README
+%{_libdir}/lib%{name}_core.so.*
+
+%{?with_mysql:%files mysql
+%defattr(-,root,root,-)
+%doc AUTHORS ChangeLog COPYING NEWS README
+%{_libdir}/lib%{name}_mysql.so.*}
+
+%{?with_postgresql:%files postgresql
+%defattr(-,root,root,-)
+%doc AUTHORS ChangeLog COPYING NEWS README
+%{_libdir}/lib%{name}_postgresql.so.*}
+
+%{?with_oracle:%files oracle
+%defattr(-,root,root,-)
+%doc AUTHORS ChangeLog COPYING NEWS README
+%{_libdir}/lib%{name}_oracle.so.*}
+
+
+%files devel
+%defattr(-,root,root,-)
+%doc AUTHORS ChangeLog COPYING NEWS README
+%dir %{_includedir}/%{name}
+%{_includedir}/%{name}/*.h
+%{_includedir}/%{name}/core
+%{_bindir}/%{name}-config
+%{_libdir}/lib%{name}_core.so
+%{_libdir}/pkgconfig/%{name}.pc
+%{_datadir}/aclocal/%{name}.m4
+%{_mandir}/man1/%{name}-config.1.*
+
+%{?with_mysql:%files mysql-devel
+%defattr(-,root,root,-)
+%doc AUTHORS ChangeLog COPYING NEWS README
+%dir %{_includedir}/%{name}
+%{_includedir}/%{name}/backends/mysql
+%{_libdir}/lib%{name}_mysql.so}
+
+%{?with_postgresql:%files postgresql-devel
+%defattr(-,root,root,-)
+%doc AUTHORS ChangeLog COPYING NEWS README
+%dir %{_includedir}/%{name}
+%{_includedir}/%{name}/backends/postgresql
+%{_libdir}/lib%{name}_postgresql.so}
+
+%{?with_oracle:%files oracle-devel
+%defattr(-,root,root,-)
+%doc AUTHORS ChangeLog COPYING NEWS README
+%dir %{_includedir}/%{name}
+%{_includedir}/%{name}/backends/oracle
+%{_libdir}/lib%{name}_oracle.so}
+
+
+%files doc
+%defattr(-,root,root,-)
+%doc AUTHORS ChangeLog COPYING NEWS README doc
+
+
+%changelog
+* Sat May 02 2009 Denis Arnaud <denis.arnaud_fedora at m4x.org> 3.0.0-6
+- Removed the unused build conditionals
+
+* Tue Apr 28 2009 Denis Arnaud <denis.arnaud_fedora at m4x.org> 3.0.0-5
+- Simplified the conditional build rules within the RPM specification file
+
+* Sat Apr 18 2009 Denis Arnaud <denis.arnaud_fedora at m4x.org> 3.0.0-4
+- Fixed an issue about OPTFLAGS compilation
+
+* Tue Apr 14 2009 Denis Arnaud <denis.arnaud_fedora at m4x.org> 3.0.0-3
+- Restarted from pristine version 3.0.0 of upstream (SOCI) project
+
+* Sat Apr  4 2009 Denis Arnaud <denis.arnaud_fedora at m4x.org> 3.0.0-2
+- Specific RPM for each backend
+
+* Fri Mar 27 2009 Denis Arnaud <denis.arnaud_fedora at m4x.org> 3.0.0-1
+- First RPM release


--- NEW FILE soci.spec ---
#
##
# Default values are --with mysql --with postgresql --without oracle 
# Note that, for Oracle, when enabled, the following options should
# also be given:
# --with-oracle-include=/opt/oracle/app/oracle/product/11.1.0/db_1/rdbms/public
# --with-oracle-lib=/opt/oracle/app/oracle/product/11.1.0/db_1/lib
# If the macros are defined, redefine them with the correct compilation flags.
%bcond_without mysql
%bcond_without postgresql
%bcond_with oracle

%define _default_oracle_dir /opt/oracle/app/oracle/product/11.1.0/db_1
%{!?_with_oracle_incdir: %define _with_oracle_incdir --with-oracle-include=%{_default_oracle_dir}/rdbms/public}
%{!?_with_oracle_libdir: %define _with_oracle_libdir --with-oracle-lib=%{_default_oracle_dir}/lib}
#
##
#
Name:           soci
Version:        3.0.0
Release:        6%{?dist}

Summary:        The database access library for C++ programmers

Group:          System Environment/Libraries
License:        Boost
URL:            http://%{name}.sourceforge.net
Source0:        http://downloads.sourceforge.net/soci/%{name}-%{version}.tar.gz
# That patch will be submitted upstream
Patch0:         %{name}-%{version}-fix-gcc43-compatibility.patch
# That patch will be submitted upstream
Patch1:         %{name}-%{version}-fix-gnu-autotools-compatibility.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  boost-devel >= 1.34
BuildRequires:  cppunit-devel >= 1.10
BuildRequires:  libtool
#Requires:       

%description
SOCI is a C++ database access library that provides the
illusion of embedding SQL in regular C++ code, staying entirely within
the C++ standard.


%{?with_mysql:%package        mysql
Summary:        MySQL backend for %{name}
Group:          System Environment/Libraries
Requires:       %{name} = %{version}-%{release}
BuildRequires:  mysql-devel >= 5.0

%description    mysql
This package contains the MySQL backend for SOCI, i.e.,
dynamic library specific to the MySQL database. If you would like to
use SOCI in your programs with MySQL, you will need to
install %{name}-mysql.}

%{?with_postgresql:%package        postgresql
Summary:        PostGreSQL backend for %{name}
Group:          System Environment/Libraries
Requires:       %{name} = %{version}-%{release}
BuildRequires:  postgresql-devel >= 7.1

%description    postgresql
This package contains the PostGreSQL backend for SOCI, i.e.,
dynamic library specific to the PostGreSQL database. If you would like
to use SOCI in your programs with PostGreSQL, you will need to
install %{name}-postgresql.}

%{?with_oracle:%package        oracle
Summary:        Oracle backend for %{name}
Group:          System Environment/Libraries
Requires:       %{name} = %{version}-%{release}

%description    oracle
This package contains the Oracle backend for SOCI, i.e.,
dynamic library specific to the Oracle database. If you would like to
use SOCI in your programs with Oracle, you will need to install
%{name}-oracle.}


%package        devel
Summary:        Header files, libraries and development documentation for %{name}
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}
Requires:       pkgconfig

%description    devel
This package contains the header files, dynamic libraries and
development documentation for %{name}. If you would like to develop
programs using %{name}, you will need to install %{name}-devel.

%{?with_mysql:%package        mysql-devel
Summary:        MySQL backend for %{name}
Group:          Development/Libraries
Requires:       %{name}-devel = %{version}-%{release}
Requires:       %{name}-mysql = %{version}-%{release}
Requires:       mysql-devel >= 5.0

%description    mysql-devel
This package contains the MySQL backend for %{name}, i.e., header
files and dynamic libraries specific to the MySQL database. If you
would like to develop programs using %{name} and MySQL, you will need
to install %{name}-mysql.}

%{?with_postgresql:%package        postgresql-devel
Summary:        PostGreSQL backend for %{name}
Group:          Development/Libraries
Requires:       %{name}-devel = %{version}-%{release}
Requires:       %{name}-postgresql = %{version}-%{release}
Requires:       postgresql-devel >= 7.1

%description    postgresql-devel
This package contains the PostGreSQL backend for %{name}, i.e., header
files and dynamic libraries specific to the PostGreSQL database. If
you would like to develop programs using %{name} and PostGreSQL, you
will need to install %{name}-postgresql.}

%{?with_oracle:%package        oracle-devel
Summary:        Oracle backend for %{name}
Group:          Development/Libraries
Requires:       %{name}-devel = %{version}-%{release}
Requires:       %{name}-oracle = %{version}-%{release}

%description    oracle-devel
This package contains the Oracle backend for %{name}, i.e., header
files and dynamic libraries specific to the Oracle database. If you
would like to develop programs using %{name} and Oracle, you will need
to install %{name}-oracle.}


%package doc
Summary:        HTML documentation for the SOCI library
Group:          Documentation
BuildArch:      noarch
BuildRequires:  doxygen, texlive-latex, texlive-dvips, ghostscript

%description doc
This package contains the documentation in the HTML format of the SOCI
library. The documentation is the same as at the SOCI web page.


%prep
%setup -q
# Rename change-log and license file, so that they comply with
# packaging standard
mv CHANGES ChangeLog
mv LICENSE_1_0.txt COPYING
rm -f INSTALL
# Apply the g++ 4.3 compatibility patch
%patch0 -p1
# Remove MacOSX compatibility building files
rm -f build/unix/._*.tcl
rm -f ._Makefile ._configure
rm -f soci/core/._*.h soci/core/._*.cpp
rm -f soci/backends/postgresql/._*.h
rm -f doc/._*.html
# Rename the source code directory, so that the files (e.g, header
# files) can be exported correctly into {_standard_dir}/%{name}
mv src %{name}
# Apply the GNU Autotools compatibility patch
%patch1 -p1
# Fix some permissions and formats
find ./doc -type f -perm 755 -exec chmod 644 {} \;
chmod -x AUTHORS ChangeLog COPYING NEWS README
# find . -type f -name '*.[hc]pp' -exec chmod 644 {} \;


%build
%configure --disable-static \
%{?with_mysql:--enable-backend-mysql} \
%{?with_postgresql:--enable-backend-postgresql} \
%{?with_oracle:--enable-backend-oracle %{?_with_oracle_incdir} %{?_with_oracle_libdir}}
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
##
#  Remove unpackaged files from the buildroot
rm -f $RPM_BUILD_ROOT%{_includedir}/%{name}/config.h
rm -f $RPM_BUILD_ROOT%{_libdir}/lib%{name}_*.la
##
##
#  Duplicate the header files, so as to keep the compatibility, for
#  developers using the SOCI library, with the non-packaged version of
#  that library.
for header_file in $RPM_BUILD_ROOT%{_includedir}/%{name}/core/*.h; do
  cp ${header_file} $RPM_BUILD_ROOT%{_includedir}/%{name}
done
%{?with_mysql:cp $RPM_BUILD_ROOT%{_includedir}/%{name}/backends/mysql/soci-mysql.h $RPM_BUILD_ROOT%{_includedir}/%{name}}
%{?with_postgresql:cp $RPM_BUILD_ROOT%{_includedir}/%{name}/backends/postgresql/soci-postgresql.h $RPM_BUILD_ROOT%{_includedir}/%{name}}
%{?with_oracle:cp $RPM_BUILD_ROOT%{_includedir}/%{name}/backends/oracle/soci-oracle.h $RPM_BUILD_ROOT%{_includedir}/%{name}}


%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%{?with_mysql:%post mysql -p /sbin/ldconfig

%postun mysql -p /sbin/ldconfig}

%{?with_postgresql:%post postgresql -p /sbin/ldconfig

%postun postgresql -p /sbin/ldconfig}

%{?with_oracle:%post oracle -p /sbin/ldconfig

%postun oracle -p /sbin/ldconfig}



%files
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING NEWS README
%{_libdir}/lib%{name}_core.so.*

%{?with_mysql:%files mysql
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING NEWS README
%{_libdir}/lib%{name}_mysql.so.*}

%{?with_postgresql:%files postgresql
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING NEWS README
%{_libdir}/lib%{name}_postgresql.so.*}

%{?with_oracle:%files oracle
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING NEWS README
%{_libdir}/lib%{name}_oracle.so.*}


%files devel
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING NEWS README
%dir %{_includedir}/%{name}
%{_includedir}/%{name}/*.h
%{_includedir}/%{name}/core
%{_bindir}/%{name}-config
%{_libdir}/lib%{name}_core.so
%{_libdir}/pkgconfig/%{name}.pc
%{_datadir}/aclocal/%{name}.m4
%{_mandir}/man1/%{name}-config.1.*

%{?with_mysql:%files mysql-devel
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING NEWS README
%dir %{_includedir}/%{name}
%{_includedir}/%{name}/backends/mysql
%{_libdir}/lib%{name}_mysql.so}

%{?with_postgresql:%files postgresql-devel
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING NEWS README
%dir %{_includedir}/%{name}
%{_includedir}/%{name}/backends/postgresql
%{_libdir}/lib%{name}_postgresql.so}

%{?with_oracle:%files oracle-devel
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING NEWS README
%dir %{_includedir}/%{name}
%{_includedir}/%{name}/backends/oracle
%{_libdir}/lib%{name}_oracle.so}


%files doc
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING NEWS README doc


%changelog
* Sat May 02 2009 Denis Arnaud <denis.arnaud_fedora at m4x.org> 3.0.0-6
- Removed the unused build conditionals

* Tue Apr 28 2009 Denis Arnaud <denis.arnaud_fedora at m4x.org> 3.0.0-5
- Simplified the conditional build rules within the RPM specification file

* Sat Apr 18 2009 Denis Arnaud <denis.arnaud_fedora at m4x.org> 3.0.0-4
- Fixed an issue about OPTFLAGS compilation

* Tue Apr 14 2009 Denis Arnaud <denis.arnaud_fedora at m4x.org> 3.0.0-3
- Restarted from pristine version 3.0.0 of upstream (SOCI) project

* Sat Apr  4 2009 Denis Arnaud <denis.arnaud_fedora at m4x.org> 3.0.0-2
- Specific RPM for each backend

* Fri Mar 27 2009 Denis Arnaud <denis.arnaud_fedora at m4x.org> 3.0.0-1
- First RPM release


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/soci/F-10/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- .cvsignore	4 May 2009 03:41:53 -0000	1.1
+++ .cvsignore	4 May 2009 22:02:36 -0000	1.2
@@ -0,0 +1 @@
+soci-3.0.0.tar.gz


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/soci/F-10/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- sources	4 May 2009 03:41:53 -0000	1.1
+++ sources	4 May 2009 22:02:37 -0000	1.2
@@ -0,0 +1 @@
+1bf7dd244764e53557c1ecc01fdfac96  soci-3.0.0.tar.gz




More information about the fedora-extras-commits mailing list