From d0fd16c22e655c57878187cd373874e28d91a974 Mon Sep 17 00:00:00 2001 From: "Ralf S. Engelschall" Date: Tue, 11 Feb 2003 15:47:32 +0000 Subject: [PATCH] add optional NDBM support --- gdbm/gdbm.spec | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/gdbm/gdbm.spec b/gdbm/gdbm.spec index bbd2e01a86..9d1e32f0e6 100644 --- a/gdbm/gdbm.spec +++ b/gdbm/gdbm.spec @@ -33,7 +33,10 @@ Distribution: OpenPKG [PLUS] Group: Database License: LGPL Version: 1.8.3 -Release: 20030114 +Release: 20030211 + +# package options +%option with_ndbm no # list of sources Source0: ftp://ftp.gnu.org/gnu/gdbm/gdbm-%{version}.tar.gz @@ -54,6 +57,9 @@ AutoReqProv: no %setup -q %build +%if "%{with_ndbm}" == "yes" + %{l_shtool} subst -e 's;libgdbm_compat;libndbm;g' Makefile.in +%endif CC="%{l_cc}" \ CFLAGS="%{l_cflags -O}" \ ./configure \ @@ -68,6 +74,13 @@ AutoReqProv: no exec_prefix=$RPM_BUILD_ROOT%{l_prefix} \ BINOWN=`%{l_shtool} echo -e %u` \ BINGRP=`%{l_shtool} echo -e %g` +%if "%{with_ndbm}" == "yes" + %{l_make} %{l_mflags} install-compat \ + prefix=$RPM_BUILD_ROOT%{l_prefix} \ + exec_prefix=$RPM_BUILD_ROOT%{l_prefix} \ + BINOWN=`%{l_shtool} echo -e %u` \ + BINGRP=`%{l_shtool} echo -e %g` +%endif strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}