Summary: Quick Database Manager
Name: qdbm
Version: 1.8.77
Release: 3%{?_dist_release}
License: LGPL 2.1
URL: http://qdbm.sourceforge.net/
Group: Development/Libraries
Source0: http://qdbm.sourceforge.net/%{name}-%{version}.tar.gz

Buildroot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: zlib-devel

%description
QDBM is a library of routines for managing a database. The database is a
simple data file containing records, each is a pair of a key and a value.
Every key and value is serial bytes with variable length. Both binary
data and character string can be used as a key and a value. There is
neither concept of data tables nor data types. Records are organized in
hash table or B+ tree.

%description -l ja
QDBMはデータベースを扱うルーチン群のライブラリです。データベースといっても
単純なもので、キーと値のペアからなるレコード群を格納したデータファイルです。
キーと値は任意の長さを持つ一連のバイト列であり、文字列でもバイナリでも扱う
ことができます。テーブルやデータ型の概念はありません。レコードはハッシュ表
またはB+木で編成されます。

%package devel
Summary: Header files and libraries for developing apps which will using QDBM.
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: zlib-devel

%description devel
Header files and libraries for developing apps which will using QDBM.

%prep
%setup -q

%build
%configure \
    --enable-stable \
    --enable-pthread \
    --enable-zlib \
    --enable-iconv 
make

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

rm -f $RPM_BUILD_ROOT%{_datadir}/qdbm/{COPYING,ChangeLog,NEWS,THANKS,spex-ja.html,spex.html}

%clean
rm -rf $RPM_BUILD_ROOT

%check
make check

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc COPYING ChangeLog NEWS README THANKS spex-ja.html spex.html
%{_bindir}/*
%{_mandir}/man1/*
%{_libdir}/*.so.*

%files devel
%defattr(-,root,root)
%{_mandir}/man3/*
%{_libdir}/*.so
%{_libdir}/*.a
%{_libdir}/pkgconfig/qdbm.pc
%{_includedir}/*.h

%changelog
* Thu Sep 30 2010 Shu KONNO <owa@bg.wakwak.com> 1.8.77-3
- rebuilt with rpm-4.8.1 for pkg-config

* Mon Mar 29 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.8.77-2
- rebuilt with new toolchain
- added Requires: zlib-devel to devel package
- added %%post and %%postun section

* Fri Oct 10 2008 Shu KONNO <owa@bg.wakwak.com> 1.8.77-1vl5
- applied new versioning policy, spec in utf-8

* Sat Jan 19 2008 IWAI, Masaharu <iwai@alib.jp> 1.8.77-0vl1
- initial release

