File xbsql.spec of Package xbsql

#
# spec file for package xbsql (Version 0.11)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           xbsql
BuildRequires:  bison flex gcc-c++ ncurses-devel readline-devel xbase-devel
License:        LGPL v2.1 or later
Group:          Development/Libraries/C and C++
Summary:        SQL Wrapper for the XBase Library
Url:            http://www.quaking.demon.co.uk/xbsql.html
Version:        0.11
Release:        189
Source0:        %name-%version.tar.bz2
Patch0:         %name.diff
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
XBase DBMS is a C++ library that supports access to XBase type data
files and indexes (.dbf and related files, for example). It provides
record level access to these files.



Authors:
--------
    Mike Richardson <mike@quaking.demon.co.uk>

%prep
%setup -q 
%patch
autoreconf -i -f

%build
export CXXFLAGS="$RPM_OPT_FLAGS"
export CFLAGS="$RPM_OPT_FLAGS"
./configure \
  --prefix=/usr \
  --libdir=%{_libdir} \
  --mandir=/usr/share/man/ \
  --sysconfdir=/etc/
rm xbsql/lex.yy.c
make -C xbsql lex.yy.c
make
cd test
make
./runtests

%install
rm -rf ${RPM_BUILD_ROOT}
make DESTDIR="$RPM_BUILD_ROOT" install
#
# solve file conflict with perl-XML-XQL
#
mv $RPM_BUILD_ROOT/usr/bin/xql $RPM_BUILD_ROOT/usr/bin/XQL

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%clean
rm -rf ${RPM_BUILD_ROOT}

%files
%defattr(-,root,root)
%doc AUTHORS TODO COPYING README NEWS doc
/usr/bin/*
/usr/include/*
%_libdir/libxbsql*

%changelog
* Fri Feb 29 2008 coolo@suse.de
- fix build
* Fri Nov 09 2007 lmichnovic@suse.cz
- added xbase-devel to BuildReq due to package split-off
* Thu Mar 29 2007 stbinner@suse.de
- add bison and ncurses-devel to buildrequires
* Sun Sep 10 2006 dmueller@suse.de
- use RPM_OPT_FLAGS
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Wed Oct 12 2005 dmueller@suse.de
- fix build
* Thu Nov 11 2004 coolo@suse.de
- fix file list for debug package
* Mon Nov 24 2003 ro@suse.de
- fix typo in specfile
* Sun Nov 23 2003 adrian@suse.de
- solve file conflict with perl-XML-XQL
  ( /usr/bin/xql -> /usr/bin/XQL )
* Wed Nov 19 2003 adrian@suse.de
- fix for lib64
* Tue Nov 18 2003 adrian@suse.de
- initial package of version 0.11
openSUSE Build Service is sponsored by