Search
j0ke.net Open Build Service
>
Projects
>
server:search
>
qdbm
> Changes
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
Changes of Revision 4
[-]
[+]
Added
qdbm.spec
@@ -0,0 +1,399 @@ +# norootforbuild + +%define _prefix /usr + +%if %suse_version >= 930 && %suse_version <= 1010 +%define has_java 1 +%endif +%if %suse_version >= 1000 +%define has_ruby_devel 1 +%endif + +Name: qdbm +Version: 1.8.75 +Release: 0 +Summary: Quick Database Manager +Source: http://qdbm.sourceforge.net/qdbm-%{version}.tar.gz +Patch1: qdbm-javahome.patch +Patch2: qdbm-makefile-remove-weird-libpath.patch +URL: http://qdbm.sourceforge.net/ +Group: System/Libraries +License: LGPL +BuildRoot: %{_tmppath}/build-%{name}-%{version} +BuildRequires: zlib zlib-devel bzip2 make gcc perl gcc-c++ +BuildRequires: libstdc++ libstdc++-devel ruby +%if %{?has_ruby_devel:1}0 +BuildRequires: ruby-devel +%endif +%if %{?has_java:1}0 +BuildRequires: java-1_5_0-sun java-1_5_0-sun-devel update-alternatives +%define javahome %{_libdir}/jvm/java-1.5.0-sun +%endif +BuildRequires: autoconf automake libtool +%if 0%suse_version > 930 +BuildRequires: lzo lzo-devel +%endif + +%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. + +%package devel +Summary: Development environment for %{name} +Group: Development/Libraries/C and C++ +Requires: %{name} = %{version}-%{release} + +%description devel +Development environment for %{name} + +%package test +Summary: Tests for %{name} +Group: Development/Libraries/C and C++ +Requires: %{name} = %{version}-%{release} + +%description test +Tests for %{name} + +%package c++ +Summary: C++ bindings for %{name} +Group: Development/Libraries/C and C++ +Requires: %{name} = %{version}-%{release} + +%description c++ +C++ bindings for %{name} + +%package c++-devel +Summary: Development environment for C++ bindings for %{name} +Group: Development/Libraries/C and C++ +Requires: %{name} = %{version}-%{release} +Requires: %{name}-devel = %{version}-%{release} + +%description c++-devel +Development environment for C++ bindings for %{name} + +%package c++-test +Summary: Tests for C++ bindings for %{name} +Group: Development/Libraries/C and C++ +Requires: %{name}-c++ = %{version}-%{release} + +%description c++-test +Tests for C++ bindings for %{name} + +%package -n perl-%{name} +Summary: Perl bindings for %{name} +Group: Development/Libraries/Perl +Requires: %{name} = %{version}-%{release} +Requires: perl +Provides: %{name}-perl = %{version}-%{release} + +%description -n perl-%{name} +Perl bindings for %{name} + +%package -n perl-%{name}-test +Summary: Tests for Perl bindings for %{name} +Group: Development/Libraries/Perl +Requires: %{name}-perl = %{version}-%{release} +Requires: perl +Provides: %{name}-perl-test = %{version}-%{release} + +%description -n perl-%{name}-test +Tests for Perl bindings for %{name} + +%package -n ruby-%{name} +Summary: Ruby bindings for %{name} +Group: Development/Libraries/Ruby +Requires: %{name} = %{version}-%{release} +Requires: ruby +Provides: %{name}-ruby = %{version}-%{release} + +%description -n ruby-%{name} +Ruby bindings for %{name} + +%package -n ruby-%{name}-test +Summary: Tests for Ruby bindings for %{name} +Group: Development/Libraries/Ruby +Requires: %{name}-ruby = %{version}-%{release} +Requires: ruby +Provides: %{name}-ruby-test + +%description -n ruby-%{name}-test +Tests for Ruby bindings for %{name} + +%if %{?has_java:1}0 +%package java +Summary: Java bindings for %{name} +Group: Development/Libraries/Java +Requires: %{name} = %{version}-%{release} +Requires: java + +%description java +Java bindings for %{name} +%endif # has_java + +%if %suse_version >= 930 +%debug_package +%endif +%prep +%setup -q +%patch1 +%patch2 + +%build +autoreconf -fiv + +%__grep -l -r /usr/local . | sort | uniq \ +| while read docfile; do + %__sed -i.orig -e 's|/usr/local|/usr|g' "$docfile" +done + +%__grep -l -r /usr/lib . | sort | uniq \ +| while read file; do + %__sed -i.orig -e 's|/usr/lib|%{_libdir}|g' "$file" +done + +%configure \ + --enable-zlib \ + --enable-bzip \ +%if 0%suse_version > 930 + --enable-lzo \ +%else + --disable-lzo \ +%endif + --enable-iconv + +pushd plus +%configure +popd +pushd perl +%configure +popd +pushd ruby +%configure +popd +%if %{?has_java:1}0 +pushd java +export JAVA_HOME="%{javahome}" +export MYJAVAHOME="%{javahome}" +%configure +popd +%endif + +%__make RELCFLAGS="%{optflags} -DNDEBUG" +%__make -C plus RELCFLAGS="%{optflags} -DNDEBUG" +%__make -C perl RELCFLAGS="%{optflags} -DNDEBUG" +%__make -C ruby RELCFLAGS="%{optflags} -DNDEBUG" +%if %{?has_java:1}0 +unset JAVA_HOME +export JAVA_HOME="%{javahome}" +%{__make} -C java \ + RELCFLAGS="%{optflags} -DNDEBUG" \ + MYJAVAHOME="%{javahome}" \ + JAVAC="%{javahome}/bin/javac" \ + JAR="%{javahome}/bin/jar" \ + JAVAH="%{javahome}/bin/javah" \ + JAVADOC="%{javahome}/bin/javadoc" \ + JAVARUN="%{javahome}/bin/java"