diff options
author | Remi Collet <remi@remirepo.net> | 2025-07-25 14:55:05 +0200 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2025-07-25 14:55:05 +0200 |
commit | b4b5563e373ce1b76104a8c1bccb0080b7780cad (patch) | |
tree | 2eacf52c68b5b77b2cfa953ffa6656b2755ce50f |
-rw-r--r-- | .gitignore | 9 | ||||
-rw-r--r-- | Makefile | 4 | ||||
-rwxr-xr-x | makesrc.sh | 20 | ||||
-rw-r--r-- | redis-bloom.spec | 99 |
4 files changed, 132 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..01f0400 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +clog +package-*.xml +*.tgz +*.tar.bz2 +*.tar.gz +*.tar.xz +*.tar.xz.asc +*.src.rpm +*/*rpm diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..1e65467 --- /dev/null +++ b/Makefile @@ -0,0 +1,4 @@ +SRCDIR := $(shell pwd) +NAME := $(shell basename $(SRCDIR)) +include ../common/Makefile + diff --git a/makesrc.sh b/makesrc.sh new file mode 100755 index 0000000..3054ed1 --- /dev/null +++ b/makesrc.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +NAME=$(basename $PWD) +OWNER=$(sed -n '/^%global gh_vend/{s/.* //;p}' $NAME.spec) +PROJECT=$(sed -n '/^%global gh_proj/{s/.* //;p}' $NAME.spec) +VERSION=$(sed -n '/^Version:/{s/.* //;p}' $NAME.spec) + +echo -e "\nCreate git snapshot\nName=$NAME, Owner=$OWNER, Project=$PROJECT, Version=$VERSION\n" + +echo "Cloning..." +rm -rf $PROJECT-$VERSION +git clone --branch v$VERSION --recursive https://github.com/$OWNER/$PROJECT.git $PROJECT-$VERSION + +echo "Archiving..." +tar czf $NAME-$VERSION.tgz --exclude-vcs $PROJECT-$VERSION + +echo "Cleaning..." +rm -rf $PROJECT-$VERSION + +echo "Done." diff --git a/redis-bloom.spec b/redis-bloom.spec new file mode 100644 index 0000000..d95364e --- /dev/null +++ b/redis-bloom.spec @@ -0,0 +1,99 @@ +# remirepo/fedora spec file for redis-bloom +# +# SPDX-FileCopyrightText: Copyright 2025 Remi Collet +# SPDX-License-Identifier: CECILL-2.1 +# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +# +# Please, preserve the changelog entries +# + +%global cfgname bloom.conf +%global libname redisbloom.so +# Github forge +%global gh_vend RedisBloom +%global gh_proj RedisBloom +%global forgeurl https://github.com/%{gh_vend}/%{gh_proj} +#global commit afe5de4ce52bb2b80af565a6f297bf330a65d0d8 +%global tag v%{version} +# for EL-8 to avoid TAG usage +%global archivename %{gh_proj}-%{version} + +Name: redis-bloom +Version: 8.0.1 +Release: 1%{?dist} +Summary: Probabilistic data structures +# Starting with Redis 8, RedisTimeSeries is licensed under your choice of: +# (i) Redis Source Available License 2.0 (RSALv2); +# (ii) the Server Side Public License v1 (SSPLv1); or +# (iii) the GNU Affero General Public License version 3 (AGPLv3). +License: AGPL-3.0-only +URL: %{forgeurl} +Source0: %{name}-%{version}.tgz +# get full git snapshot with submodules +Source1: makesrc.sh + +BuildRequires: redis-devel +BuildRequires: make +BuildRequires: cmake +BuildRequires: automake +BuildRequires: autoconf +BuildRequires: libtool +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: python3 +BuildRequires: python3-pip +BuildRequires: openssl-devel +BuildRequires: jq + +Provides: bundled(LibMR) +Provides: bundled(hiredis) +Provides: bundled(libevent) +Provides: bundled(RedisModulesSDK) +Provides: bundled(cpu_features) +Provides: bundled(fast_double_parser) +Provides: bundled(readies) + +Requires: redis(modules_abi)%{?_isa} = %{redis_modules_abi} +Requires: (redis >= 8.0 with redis < 8.1) +Supplements: redis + + +%description +RedisBloom adds a set of probabilistic data structures to Redis, including +Bloom filter, Cuckoo filter, Count-min sketch, Top-K, and t-digest. +Using this capability, you can query streaming data without needing to +store all the elements of the stream. + + +%prep +%setup -q -n %{gh_proj}-%{version} + +: Configuration file +cat << EOF | tee %{cfgname} +# %{gh_proj} +loadmodule %{redis_modules_dir}/%{libname} +EOF + + + +%build +%global make_flags DEBUG="" VERBOSE=1 LDFLAGS="%{?__global_ldflags}" CFLAGS+="%{optflags} -fPIC" +make %{?_smp_mflags} %{make_flags} build + + +%install +install -Dpm755 bin/linux-*-release/%{libname} %{buildroot}%{redis_modules_dir}/%{libname} +install -Dpm640 %{cfgname} %{buildroot}%{redis_modules_cfg}/%{cfgname} + + +%files +%license LICENSE.txt +%license licenses/AGPLv3.txt +%doc *.md +%attr(0640, redis, root) %config(noreplace) %{redis_modules_cfg}/%{cfgname} +%{redis_modules_dir}/%{libname} + + +%changelog +* Fri Jul 25 2025 Remi Collet <remi@remirepo.net> - 8.0.1-1 +- initial package |