init package

This commit is contained in:
Neil Hanlon 2023-10-31 21:53:38 -04:00 committed by Neil Hanlon
parent 17a3bec086
commit 236090ebb3
Signed by: neil
GPG Key ID: 705BC21EC3C70F34
3 changed files with 91 additions and 8 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/cowsql-1.15.3.tar.gz

View File

@ -1,3 +1,9 @@
# adapted with love from sqlite
%bcond_without check
%bcond_with docs
%bcond_without static
%global gittagversion 1.15.3
%global gittag v%{?gittagversion}
@ -6,15 +12,37 @@ Version: %{gittagversion}
Release: %autorelease
Summary: Embeddable, replicated and fault tolerant SQL engine
License: GPL-3.0-only
License: LGPL-3.0-only
URL: https://github.com/cowsql/cowsql/
Source: %{url}/archive/%{gittag}/%{name}-%{version}.tar.gz
Provides: libcowsql
ExcludeArch: s390x
# tool requirements
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: gcc
BuildRequires: libtool
BuildRequires: make
# cowsql
BuildRequires: libuv-devel
BuildRequires: raft-devel
BuildRequires: sqlite-devel
# docs
%if %{with docs}
BuildRequires: python-sphinx
BuildRequires: python-mock
BuildRequires: python-alabaster
BuildRequires: python-commonmark
BuildRequires: python-sphinx-rtd-theme
BuildRequires: python-recommonmark
%endif
%description
cowsql (/ˈkaʊ,siːkwəl/ listen) is a C library that implements an embeddable and
cowsql is a C library that implements an embeddable and
replicated SQL database engine with high availability and automatic failover.
cowsql extends SQLite with a network protocol that can connect together various
@ -25,26 +53,79 @@ 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.
%package libs
Summary: Libraries for %{name}
%package devel
Summary: Development tools for the cowsql embeddable SQL database engine
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: pkgconfig
Provides: lib%{name}-devel
%description libs
Libraries for %{name}
%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.
%if %{with docs}
%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
%prep
%autosetup -p1 -n %{name}-%{version}
autoreconf -iv
%build
%configure
%make_build
%if %{with docs}
sphinx-build -a docs docs-build
%endif
%install
%make_install
%if ! %{with static}
rm -f $RPM_BUILD_ROOT/%{_libdir}/*.{la,a}
%endif
%if %{with docs}
pushd docs-build
for d in **/*; do
install -Dpm 644 -t %{buildroot}/usr/share/doc/cowsql/ $d
done
popd
%endif
%if %{with check}
%check
make check
%endif
%files
%doc README docs/
%license LICENSE
%{_bindir}/%{name}
%{_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
%if %{with docs}
%files doc
%doc /usr/share/doc/cowsql
%endif
%changelog
%autochangelog

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (cowsql-1.15.3.tar.gz) = c22b8b29f62c65a6e6289424e4a168fbfc772c1058b378ba5d3300f29cdf8192f4818291be23df26551b5cabc46948798df4816dab83ed6c786b88fc2c85d320