File mdbtools.spec of Package mdbtools
#
# spec file for package mdbtools (Version 0.6pre1)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: mdbtools
%define gnome_prefix %(pkg-config libgnomeui-2.0 --variable=prefix)
%define gnome_datadir %{gnome_prefix}/share
BuildRequires: bison flex libglade2-devel libgnomeui-devel readline-devel unixODBC-devel
BuildRequires: scrollkeeper update-desktop-files
Url: http://mdbtools.sourceforge.net
License: GPL v2 or later
Group: Productivity/Databases/Tools
AutoReqProv: on
Version: 0.6pre1
Release: 16
Provides: mdbtools = 20070410cvs
Summary: A Suite of Libraries and Programs to Access Microsoft Access Databases
Source: mdbtools-%{version}.tar.bz2
Source1: gmdb2.desktop
Patch: mdbtools-doublefree.patch
Patch1: mdbtools-off_by_one.patch
Patch2: mdbtools-0.5-gnome_prefix.diff
Patch3: mdbtools-aliasingandendianness.patch
Patch4: mdbtools-retvals.patch
Patch5: mdbtools-null.patch
Patch6: mdbtools-uninit.patch
Patch7: mdbtools-0.5-no_gmdb_h.diff
Patch8: mdbtools-declare_yyinput.patch
Patch9: mdbtools-codecleanup.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Mdbtools contains: mdb-dump -- simple hex dump utility for looking at
mdb files mdb-schema -- prints DDL for the specified table mdb-export
-- export table to CSV format mdb-tables -- a simple dump of table
names to be used with shell scripts mdb-header -- generates a C header
to be used in exporting mdb data to a C prog mdb-parsecvs -- generates
a C program given a CSV file made with mdb-export mdb-sql -- demo SQL
engine program mdb-ver -- print version of database
%package devel
License: GPL v2 or later
Requires: glib2-devel unixODBC-devel flex
Requires: %{name} = %{version}
Requires: %{name}-odbc = %{version}
Group: Development/Libraries/C and C++
Summary: All files necessary for development with the MDB Tools libraries
%description devel
Mdbtools contains: mdb-dump -- simple hex dump utility for looking at
mdb files mdb-schema -- prints DDL for the specified table mdb-export
-- export table to CSV format mdb-tables -- a simple dump of table
names to be used with shell scripts mdb-header -- generates a C header
to be used in exporting mdb data to a C prog mdb-parsecvs -- generates
a C program given a CSV file made with mdb-export mdb-sql -- demo SQL
engine program mdb-ver -- print version of database
%package gui
License: GPL v2 or later
Group: Productivity/Databases/Tools
Summary: A Suite of libraries and programs to access Microsoft Access databases
%description gui
Mdbtools contains: mdb-dump -- simple hex dump utility for looking at
mdb files mdb-schema -- prints DDL for the specified table mdb-export
-- export table to CSV format mdb-tables -- a simple dump of table
names to be used with shell scripts mdb-header -- generates a C header
to be used in exporting mdb data to a C prog mdb-parsecvs -- generates
a C program given a CSV file made with mdb-export mdb-sql -- demo SQL
engine program mdb-ver -- print version of database
%package odbc
License: GPL v2 or later
Group: Productivity/Databases/Tools
Summary: MDB Tools ODBC driver for unixODBC
%description odbc
Mdbtools contains: mdb-dump -- simple hex dump utility for looking at
mdb files mdb-schema -- prints DDL for the specified table mdb-export
-- export table to CSV format mdb-tables -- a simple dump of table
names to be used with shell scripts mdb-header -- generates a C header
to be used in exporting mdb data to a C prog mdb-parsecvs -- generates
a C program given a CSV file made with mdb-export mdb-sql -- demo SQL
engine program mdb-ver -- print version of database
%prep
%setup -q
%patch
%patch1
%patch2
%patch3
%patch4
%patch5
%patch6
%patch7
%patch8
%patch9
%build
autoreconf -f -i
%configure --disable-static --with-pic --with-unixodbc=%{_usr}
%{__make} %{?jobs:-j%jobs}
%check
make check
%install
%makeinstall
install -D -m 0644 %{S:1} %{buildroot}%{gnome_datadir}/applications/gmdb2.desktop
%suse_update_desktop_file gmdb2 Office Database
%{__rm} -f %{buildroot}%{_libdir}/*.la
%clean
rm -rf %{buildroot}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%post odbc -p /sbin/ldconfig
%postun odbc -p /sbin/ldconfig
%files
%defattr(-,root,root)
%doc README AUTHORS COPYING NEWS HACKING ChangeLog TODO
/usr/bin/mdb-*
%_libdir/libmdb.so.1
%_libdir/libmdb.so.1.0.0
%_libdir/libmdbsql.so.1
%_libdir/libmdbsql.so.1.0.0
%doc %_mandir/man1/mdb-*.1*
%files devel
%defattr(-,root,root)
/usr/include/mdb*.h
/usr/include/connectparams.h
%_libdir/libmdbsql.so
%_libdir/libmdb.so
%_libdir/libmdbodbc.so
%_libdir/pkgconfig/libmdb.pc
%_libdir/pkgconfig/libmdbsql.pc
%files gui
%defattr(-,root,root)
%gnome_prefix/bin/gmdb2
%gnome_datadir/gmdb
%doc %gnome_datadir/gnome/help/gmdb
%gnome_datadir/applications/gmdb2.desktop
%files odbc
%defattr(-,root,root)
%_libdir/libmdbodbc.so.0
%_libdir/libmdbodbc.so.0.0.0
%changelog
* Fri Jan 09 2009 crrodriguez@suse.de
- remove static libraries and "la" files
* Mon Oct 13 2008 pth@suse.de
- Add provides so that 0.6pre1 is newer than 20070410cvs.
* Thu Sep 25 2008 ro@suse.de
- call autoreconf -f -i for new libtool
* Mon Aug 18 2008 pth@suse.de
- Update to latest cvs version.
- Remove the use of run_ldconfig
- Mark help files as %%doc
- Remove duplicate requires
- Clean up the code.
* Fri Jun 22 2007 pth@suse.de
- Fix dependencies.
* Tue Apr 10 2007 uli@suse.de
- update -> 20071004cvs (can read GameBase databases)
* Fri Mar 30 2007 rguenther@suse.de
- Add bison and flex BuildRequires
* Thu Feb 16 2006 pth@suse.de
- Fix off by one bug (Bugzilla #151484)
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Thu Dec 08 2005 pth@suse.de
- Fix type-punning
* Sun Jan 11 2004 adrian@suse.de
- build as user
* Sat Aug 16 2003 adrian@suse.de
- added desktop file
* Mon Jul 14 2003 sbrabec@suse.cz
- GNOME prefix change to /opt/gnome.
* Fri Jun 27 2003 pthomas@suse.de
- Actually apply the included patches.
- Add directory to file list.
* Wed Jun 25 2003 pthomas@suse.de
- Initial package creation.