Sophie

Sophie

distrib > Altlinux > 4.1 > i586 > media > core-src > by-pkgid > d55153a0ea735b90db377b7d20b5cf1d > files > 3

tinycdb-0.76-alt1.src.rpm

Name: tinycdb
Version: 0.76
Release: alt1

Summary: A package for maintenance of constant databases
License: GPL
Group: Databases
Url: http://www.corpit.ru/mjt/tinycdb.html
Packager: Dmitry V. Levin <ldv@altlinux.org>

Source: ftp://ftp.corpit.ru/pub/tinycdb/tinycdb_%version.tar

Patch1: tinycdb-0.76-alt-makefile.patch
Patch2: tinycdb-0.76-alt-warnings.patch

Requires: libcdb = %version-%release

%def_disable static

%description
tinycdb is a small, fast and reliable utility set and subroutine library
for creating and reading constant databases.  The database structure is
tuned for fast reading:
+ Successful lookups take normally just two disk accesses.
+ Unsuccessful lookups take only one disk access.
+ Small disk space and memory size requirements; a database uses 2048
  bytes for the header and 24 bytes per record.
+ Maximum database size is 4GB; individual record size is not
  otherwise limited.
+ Portable file format.
+ Fast creation of new databases.
+ No locking, updates are atomical.

This package contains the cdb utility.

%package -n libcdb
Summary: The %name shared library 
License: LGPL
Group: System/Libraries

%package -n libcdb-devel
Summary: Development libraries and header files for tinycdb
License: LGPL
Group: Development/C
Requires: libcdb = %version-%release
Provides: %name-devel = %version-%release
Obsoletes: %name-devel

%package -n libcdb-devel-static
Summary: Development static library for tinycdb
License: LGPL
Group: Development/C
Requires: libcdb-devel = %version-%release

%description -n libcdb
tinycdb is a small, fast and reliable utility set and subroutine
library for creating and reading constant databases.

This package contains tinycdb shared library.

%description -n libcdb-devel
tinycdb is a small, fast and reliable utility set and subroutine
library for creating and reading constant databases.

This package contains tinycdb development library and header files.
Required if you plan to do development using the tinycdb database.

%description -n libcdb-devel-static
tinycdb is a small, fast and reliable utility set and subroutine
library for creating and reading constant databases.

This package contains development static library.

%prep
%setup -q
%patch1 -p1
%patch2 -p1

%build
%def_enable Werror
%make_build CFLAGS="%optflags -W -D_GNU_SOURCE" %{?_enable_static:static} shared
%{?!__buildreqs:%{?!_without_check:%{?!_disable_check:make %{?_enable_static:test} test-shared}}}

%install
%make_install \
	%{?_enable_static:install-staticlib} \
	install-sharedlib \
	install-bin \
	install-data \
	bindir=%_bindir \
	libdir=%_libdir \
	syslibdir=/%_lib \
	sysconfdir=%_sysconfdir \
	includedir=%_includedir \
	mandir=%_mandir \
	DESTDIR=%buildroot \
	INSTALLPROG=cdb-shared \
	CP='cp -p'

%define docdir %_docdir/%name-%version
mkdir -p %buildroot/%docdir
install -pm644 NEWS %buildroot/%docdir/

%post -n libcdb -p %post_ldconfig
%postun -n libcdb -p %postun_ldconfig

%files
%_bindir/*
%_mandir/man1/*

%files -n libcdb
%_libdir/libcdb.so.*
%docdir

%files -n libcdb-devel
%_libdir/libcdb.so
%_mandir/man[35]/*
%_includedir/*

%if_enabled static
%files -n libcdb-devel-static
%_libdir/libcdb.a
%endif

%changelog
* Mon Oct 16 2006 Dmitry V. Levin <ldv@altlinux.org> 0.76-alt1
- Updated to 0.76.
- Reviewed and updated patches.
- Fixed build with -D_FORTIFY_SOURCE=2 -Werror.

* Mon May 22 2006 Dmitry V. Levin <ldv@altlinux.org> 0.75-alt2
- Deal with compilation warnings generated by new gcc compiler.

* Fri Nov 04 2005 Dmitry V. Levin <ldv@altlinux.org> 0.75-alt1
- Updated to 0.75.
- Updated patches.
- Disabled build of static library by default.

* Sat Aug 20 2005 Dmitry V. Levin <ldv@altlinux.org> 0.74-alt2
- Restricted list of global symbols exported by the library.

* Sat Apr 17 2004 Dmitry V. Levin <ldv@altlinux.org> 0.74-alt1
- Updated to 0.74.
- Raised soname to reflect API and ABI changes.
- Fixed typo in cdb(3) manpage.
- Fixed potential null dereference in cdb(1) utility.

* Thu Dec 11 2003 Dmitry V. Levin <ldv@altlinux.org> 0.73-alt3
- Relocated cdb(5) to devel subpackage.
- Build static library without %%optflags_shared.

* Mon Oct 20 2003 Dmitry V. Levin <ldv@altlinux.org> 0.73-alt2
- Build shared library.
- Run tests after build.
- Resplit subpackages: %name, libcdb, libcdb-devel, libcdb-devel-static.

* Mon Sep 08 2003 Victor Forsyuk <force@altlinux.ru> 0.73-alt1
- Initial build for Sisyphus.