2023-11-01 01:53:38 +00:00
|
|
|
# adapted with love from sqlite
|
|
|
|
|
|
|
|
%bcond_without check
|
2023-11-01 03:40:14 +00:00
|
|
|
%bcond_without doc
|
2023-11-01 01:53:38 +00:00
|
|
|
%bcond_without static
|
|
|
|
|
2023-10-31 22:00:03 +00:00
|
|
|
%global gittagversion 1.15.3
|
|
|
|
%global gittag v%{?gittagversion}
|
|
|
|
|
|
|
|
Name: cowsql
|
|
|
|
Version: %{gittagversion}
|
|
|
|
Release: %autorelease
|
|
|
|
Summary: Embeddable, replicated and fault tolerant SQL engine
|
|
|
|
|
2023-11-01 01:53:38 +00:00
|
|
|
License: LGPL-3.0-only
|
2023-10-31 22:00:03 +00:00
|
|
|
URL: https://github.com/cowsql/cowsql/
|
|
|
|
Source: %{url}/archive/%{gittag}/%{name}-%{version}.tar.gz
|
|
|
|
|
2023-11-01 01:53:38 +00:00
|
|
|
Provides: libcowsql
|
|
|
|
|
|
|
|
ExcludeArch: s390x
|
|
|
|
|
|
|
|
# tool requirements
|
|
|
|
BuildRequires: autoconf
|
|
|
|
BuildRequires: automake
|
2023-10-31 22:00:03 +00:00
|
|
|
BuildRequires: gcc
|
2023-11-01 01:53:38 +00:00
|
|
|
BuildRequires: libtool
|
2023-10-31 22:00:03 +00:00
|
|
|
BuildRequires: make
|
2023-11-01 01:53:38 +00:00
|
|
|
# cowsql
|
|
|
|
BuildRequires: libuv-devel
|
|
|
|
BuildRequires: raft-devel
|
|
|
|
BuildRequires: sqlite-devel
|
|
|
|
|
|
|
|
# docs
|
2023-11-01 03:40:14 +00:00
|
|
|
%if %{with doc}
|
2023-11-01 01:53:38 +00:00
|
|
|
BuildRequires: python-sphinx
|
2023-11-01 03:40:14 +00:00
|
|
|
#BuildRequires: python-mock
|
|
|
|
#BuildRequires: python-alabaster
|
|
|
|
#BuildRequires: python-commonmark
|
|
|
|
#BuildRequires: python-sphinx-rtd-theme
|
2023-11-01 01:53:38 +00:00
|
|
|
BuildRequires: python-recommonmark
|
|
|
|
%endif
|
2023-10-31 22:00:03 +00:00
|
|
|
|
|
|
|
%description
|
2023-11-01 01:53:38 +00:00
|
|
|
cowsql is a C library that implements an embeddable and
|
2023-10-31 22:00:03 +00:00
|
|
|
replicated SQL database engine with high availability and automatic failover.
|
|
|
|
|
|
|
|
cowsql extends SQLite with a network protocol that can connect together various
|
|
|
|
instances of your application and have them act as a highly-available cluster,
|
|
|
|
with no dependency on external databases.
|
|
|
|
|
|
|
|
The name "cowsql" loosely refers to the "pets vs. cattle" concept, since it's
|
|
|
|
generaly fine to delete or rebuild a particular node of an application that
|
|
|
|
uses cowsql for data storage.
|
|
|
|
|
2023-11-01 01:53:38 +00:00
|
|
|
%package devel
|
|
|
|
Summary: Development tools for the cowsql embeddable SQL database engine
|
|
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
|
Requires: pkgconfig
|
|
|
|
Provides: lib%{name}-devel
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
This package contains the header files and development documentation
|
|
|
|
for %{name}. If you like to develop programs using %{name}, you will need
|
|
|
|
to install %{name}-devel.
|
2023-10-31 22:00:03 +00:00
|
|
|
|
2023-11-01 03:40:14 +00:00
|
|
|
%if %{with doc}
|
2023-11-01 01:53:38 +00:00
|
|
|
%package doc
|
|
|
|
Summary: Documentation for libcowsql
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description doc
|
|
|
|
This package contains most of the static HTML files that comprise the
|
|
|
|
cowsql.dev website
|
|
|
|
%endif
|
2023-10-31 22:00:03 +00:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%autosetup -p1 -n %{name}-%{version}
|
2023-11-01 01:53:38 +00:00
|
|
|
autoreconf -iv
|
2023-10-31 22:00:03 +00:00
|
|
|
|
|
|
|
%build
|
|
|
|
%configure
|
|
|
|
%make_build
|
|
|
|
|
2023-11-01 03:40:14 +00:00
|
|
|
%if %{with doc}
|
|
|
|
sphinx-build -b html docs html
|
|
|
|
rm -rf html/.{doctrees,buildinfo}
|
2023-11-01 01:53:38 +00:00
|
|
|
%endif
|
|
|
|
|
2023-10-31 22:00:03 +00:00
|
|
|
%install
|
|
|
|
%make_install
|
|
|
|
|
2023-11-01 01:53:38 +00:00
|
|
|
%if ! %{with static}
|
|
|
|
rm -f $RPM_BUILD_ROOT/%{_libdir}/*.{la,a}
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if %{with check}
|
|
|
|
%check
|
|
|
|
make check
|
|
|
|
%endif
|
|
|
|
|
2023-10-31 22:00:03 +00:00
|
|
|
%files
|
|
|
|
%license LICENSE
|
2023-11-01 01:53:38 +00:00
|
|
|
|
|
|
|
%{_libdir}/lib%{name}.so.0
|
|
|
|
%{_libdir}/lib%{name}.so.0.*
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
%{_includedir}/%{name}.h
|
|
|
|
%{_libdir}/lib%{name}.so
|
|
|
|
%{_libdir}/pkgconfig/cowsql.pc
|
|
|
|
|
|
|
|
%if %{with static}
|
|
|
|
%{_libdir}/lib%{name}.a
|
|
|
|
%exclude %{_libdir}/*.la
|
|
|
|
%endif
|
|
|
|
|
2023-11-01 03:40:14 +00:00
|
|
|
%if %{with doc}
|
2023-11-01 01:53:38 +00:00
|
|
|
%files doc
|
2023-11-01 03:40:14 +00:00
|
|
|
%doc html
|
2023-11-01 01:53:38 +00:00
|
|
|
%endif
|
2023-10-31 22:00:03 +00:00
|
|
|
|
|
|
|
%changelog
|
|
|
|
%autochangelog
|