From dc6af1223e3832ad9eb9e8c2a2ba58b298b5965b Mon Sep 17 00:00:00 2001 From: Paul Nasrat Date: Sat, 29 Sep 2007 15:06:41 +0000 Subject: [PATCH] Use f7 base as no bcond --- sqlite.spec | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/sqlite.spec b/sqlite.spec index f08e5c2..bd63b3a 100644 --- a/sqlite.spec +++ b/sqlite.spec @@ -1,12 +1,12 @@ -# bcond default logic is nicely backwards... -%bcond_without tcl -%bcond_with static -%bcond_with check +# --with-tcl enables sqlite-tcl subpackage, and also makes %%check possible. +%define tcl 0%{?_with_tcl:1} +# --with static enables static library in -devel subpackage +%define static 0%{?_with_static:1} Summary: Library that implements an embeddable SQL database engine Name: sqlite Version: 3.4.2 -Release: 3%{?dist} +Release: 1%{?dist} License: Public Domain Group: Applications/Databases URL: http://www.sqlite.org/ @@ -14,7 +14,7 @@ Source: http://www.sqlite.org/sqlite-%{version}.tar.gz Obsoletes: sqlite3 sqlite3-devel BuildRequires: ncurses-devel readline-devel glibc-devel BuildRequires: /usr/bin/tclsh -%if %{with tcl} +%if %{tcl} BuildRequires: tcl-devel %endif BuildRoot: %{_tmppath}/%{name}-root @@ -38,7 +38,7 @@ This package contains the header files, static libraries and development documentation for %{name}. If you like to develop programs using %{name}, you will need to install %{name}-devel. -%if %{with tcl} +%if %{tcl} %package tcl Summary: Tcl module for the sqlite3 embeddable SQL database engine. Group: Development/Languages @@ -53,7 +53,7 @@ This package contains the tcl modules for %{name}. %build export CFLAGS="$RPM_OPT_FLAGS -DSQLITE_DISABLE_DIRSYNC=1 -Wall" -%configure %{!?with_tcl:--disable-tcl} \ +%configure %{!?_with_tcl:--disable-tcl} \ --enable-threadsafe \ --enable-threads-override-locks make %{?_smp_mflags} @@ -66,11 +66,11 @@ make DESTDIR=${RPM_BUILD_ROOT} install %{__install} -D -m0644 sqlite3.1 %{buildroot}%{_mandir}/man1/sqlite3.1 -%if ! %{with static} +%if ! %{static} rm -f $RPM_BUILD_ROOT/%{_libdir}/*.{la,a} %endif -%if %{with check} +%if %{tcl} %check make test %endif @@ -95,24 +95,17 @@ rm -rf $RPM_BUILD_ROOT %{_includedir}/*.h %{_libdir}/*.so %{_libdir}/pkgconfig/*.pc -%if %{with static} +%if %{static} %{_libdir}/*.a %exclude %{_libdir}/*.la %endif -%if %{with tcl} +%if %{tcl} %files tcl %defattr(-, root, root) %{_datadir}/tcl*/sqlite3 %endif %changelog -* Fri Sep 28 2007 Panu Matilainen - 3.4.2-3 -- Add another build conditional for enabling %%check - -* Fri Sep 28 2007 Panu Matilainen - 3.4.2-2 -- Use bconds for the spec build conditionals -- Enable -tcl subpackage again (#309041) - * Wed Aug 15 2007 Paul Nasrat - 3.4.2-1 - Update to 3.4.2