- Use bconds for the spec build conditionals

- Enable -tcl subpackage again (#309041)
This commit is contained in:
Panu Matilainen 2007-09-28 12:18:24 +00:00
parent eb16c7dfe7
commit 01143dc5c6
1 changed files with 15 additions and 12 deletions

View File

@ -1,12 +1,11 @@
# --with-tcl enables sqlite-tcl subpackage, and also makes %%check possible. # bcond default logic is nicely backwards...
%define tcl 0%{?_with_tcl:1} %bcond_without tcl
# --with static enables static library in -devel subpackage %bcond_with static
%define static 0%{?_with_static:1}
Summary: Library that implements an embeddable SQL database engine Summary: Library that implements an embeddable SQL database engine
Name: sqlite Name: sqlite
Version: 3.4.2 Version: 3.4.2
Release: 1%{?dist} Release: 2%{?dist}
License: Public Domain License: Public Domain
Group: Applications/Databases Group: Applications/Databases
URL: http://www.sqlite.org/ URL: http://www.sqlite.org/
@ -14,7 +13,7 @@ Source: http://www.sqlite.org/sqlite-%{version}.tar.gz
Obsoletes: sqlite3 sqlite3-devel Obsoletes: sqlite3 sqlite3-devel
BuildRequires: ncurses-devel readline-devel glibc-devel BuildRequires: ncurses-devel readline-devel glibc-devel
BuildRequires: /usr/bin/tclsh BuildRequires: /usr/bin/tclsh
%if %{tcl} %if %{with tcl}
BuildRequires: tcl-devel BuildRequires: tcl-devel
%endif %endif
BuildRoot: %{_tmppath}/%{name}-root BuildRoot: %{_tmppath}/%{name}-root
@ -38,7 +37,7 @@ This package contains the header files, static libraries and development
documentation for %{name}. If you like to develop programs using %{name}, documentation for %{name}. If you like to develop programs using %{name},
you will need to install %{name}-devel. you will need to install %{name}-devel.
%if %{tcl} %if %{with tcl}
%package tcl %package tcl
Summary: Tcl module for the sqlite3 embeddable SQL database engine. Summary: Tcl module for the sqlite3 embeddable SQL database engine.
Group: Development/Languages Group: Development/Languages
@ -53,7 +52,7 @@ This package contains the tcl modules for %{name}.
%build %build
export CFLAGS="$RPM_OPT_FLAGS -DSQLITE_DISABLE_DIRSYNC=1 -Wall" export CFLAGS="$RPM_OPT_FLAGS -DSQLITE_DISABLE_DIRSYNC=1 -Wall"
%configure %{!?_with_tcl:--disable-tcl} \ %configure %{!?with_tcl:--disable-tcl} \
--enable-threadsafe \ --enable-threadsafe \
--enable-threads-override-locks --enable-threads-override-locks
make %{?_smp_mflags} make %{?_smp_mflags}
@ -66,11 +65,11 @@ make DESTDIR=${RPM_BUILD_ROOT} install
%{__install} -D -m0644 sqlite3.1 %{buildroot}%{_mandir}/man1/sqlite3.1 %{__install} -D -m0644 sqlite3.1 %{buildroot}%{_mandir}/man1/sqlite3.1
%if ! %{static} %if ! %{with static}
rm -f $RPM_BUILD_ROOT/%{_libdir}/*.{la,a} rm -f $RPM_BUILD_ROOT/%{_libdir}/*.{la,a}
%endif %endif
%if %{tcl} %if %{with tcl}
%check %check
make test make test
%endif %endif
@ -95,17 +94,21 @@ rm -rf $RPM_BUILD_ROOT
%{_includedir}/*.h %{_includedir}/*.h
%{_libdir}/*.so %{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc %{_libdir}/pkgconfig/*.pc
%if %{static} %if %{with static}
%{_libdir}/*.a %{_libdir}/*.a
%exclude %{_libdir}/*.la %exclude %{_libdir}/*.la
%endif %endif
%if %{tcl} %if %{with tcl}
%files tcl %files tcl
%defattr(-, root, root) %defattr(-, root, root)
%{_datadir}/tcl*/sqlite3 %{_datadir}/tcl*/sqlite3
%endif %endif
%changelog %changelog
* Fri Sep 28 2007 Panu Matilainen <pmatilai@redhat.com> - 3.5.2-2
- Use bconds for the spec build conditionals
- Enable -tcl subpackage again (#309041)
* Wed Aug 15 2007 Paul Nasrat <pnasrat@redhat.com> - 3.4.2-1 * Wed Aug 15 2007 Paul Nasrat <pnasrat@redhat.com> - 3.4.2-1
- Update to 3.4.2 - Update to 3.4.2