libtabula

Artifact Content
Login

Artifact 5a061d5108851e6f8f963dc67d1597f500b8549d:


Summary:    DBMS-independent C++ database access library
Name:       @PACKAGE_NAME@
Version:    @PACKAGE_VERSION@
Release:    1%{?dist}
License:    LGPL
Group:      Development/Libraries
URL:        http://libtabula.org/
Source0:    http://libtabula.org/releases/libtabula-%{version}.tar.gz
BuildRoot:  %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRequires: mysql-devel

%description
libtabula makes working with database server SQL queries as easy as
working with STL containers.  This package contains only the libraries
needed to run libtabula-based programs.  If you are building your own
libtabula-based programs, you also need to install the -devel package.

%package devel
Summary:   libtabula developer files (headers, examples, etc.)
Group:     Development/Libraries
Requires:  libtabula = %{version}-%{release}, mysql-devel

%description devel
These are the files needed to compile libtabula based programs, plus
some sample code to get you started.  If you aren't building your own
programs, you probably don't need to install this package.

%package manuals
Summary:   libtabula user and reference manuals
Group:     Development/Libraries

%description manuals
This is the libtabula documentation.  It's a separate RPM because
it's large enough that not everyone will want to install it, and
it's optional. The same content is online at http://libtabula.org

%prep
%setup -q

# Fakery for nodoc case
if [ ! -e doc/README-devel-RPM.txt ]
then
	touch doc/README-devel-RPM.txt
	touch doc/README-doc-RPM.txt
	touch doc/README-manuals-RPM.txt
	%{__mkdir_p} doc/html doc/pdf
fi

%build
%configure --disable-dependency-tracking
%{__make} %{?_smp_mflags}

%install
rm -rf %{buildroot} doc/examples

%{__mkdir_p} %{buildroot}{%{_libdir},%{_includedir}}

%{__make} DESTDIR=%{buildroot} install

# Copy example programs to doc directory
%{__mkdir_p} doc/examples
%{__install} -m644 examples/*.{cpp,h} doc/examples/
%{__install} -m644 config.h doc/examples/
sed -i -e s@../config.h@config.h@ doc/examples/threads.h

# Fix up simple example Makefile to allow it to build on the install
# system, as opposed to the system where the Makefile was created.
%{__sed} -e 's@./examples/@@' \
  -e 's@^CPPFLAGS.*$@CPPFLAGS := $(shell mysql_config --cflags)@' \
  -e 's@^LDFLAGS.*$@LDFLAGS := $(shell mysql_config --libs)@' \
  -e 's@ -Ilib@@' \
  -e '/^all:/s/test_[a-z,_]* //g' \
  Makefile.simple > doc/examples/Makefile

%clean
rm -rf %{buildroot} doc/examples

%post -p /sbin/ldconfig 

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root,-)
%doc ChangeLog.md COPYING.md CREDITS.md LICENSE.md README.md
%{_libdir}/libtabula.so.*

%files devel
%defattr(-,root,root,-)
%doc doc/examples doc/README-devel-RPM.txt README-examples.md Wishlist.md
%{_includedir}/libtabula
%{_libdir}/libtabula.so

%files manuals
%defattr(-,root,root,-)
%doc doc/html doc/pdf doc/README-manuals-RPM.txt

%changelog
* Fri May 23 2014 Warren Young <wyoung@libtabula.org> 4.0.0-1
- Forked from MySQL++ r2767 (3.2.1 plus a handful of checkins)