File VectorChord.spec of Package VectorChord
#
# spec file
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define pg_name @BUILD_FLAVOR@%{nil}
%define ext_name VectorChord
%{pg_version_from_name}
Version: 1.0.0
Release: 0
%if "%{pg_name}" == ""
ExclusiveArch: do_not_build
Name: %{ext_name}
%else
Name: %{pg_name}-%{ext_name}
BuildRequires: %{pg_name}-pgrx
%pg_server_requires
%endif
Summary: Scalable, fast, and disk-friendly vector search in Postgres
License: PostgreSQL
Group: Productivity/Databases/Tools
URL: https://github.com/tensorchord/VectorChord
Source: https://github.com/tensorchord/VectorChord/archive/refs/tags/v%{version}.tar.gz#/%{ext_name}-%{version}.tar.gz
Source1: vendor.tar.zst
Source99: _service
BuildRequires: zstd
ExcludeArch: %ix86 %arm
# BuildSystem: pgrx
# BuildOption(install): --features=pg%{pg_version}
# BuildOption(prep): -a1
# BuildOption(prep): -n %{ext_name}-%{version}
%description
VectorChord (vchord) is a PostgreSQL extension designed for scalable,
high-performance, and disk-efficient vector similarity search.
With VectorChord, you can store 400,000 vectors for just $1, enabling
significant savings: 6x more vectors compared to Pinecone's optimized storage
and 26x more than pgvector/pgvecto.rs for the same price1.
%prep
%autosetup -p1 -a1 -n %{ext_name}-%{version}
%build
%pgrx_init
%install
%pgrx_package --features=pg%{pg_version}
%files
%license LICENSE licenses/*
%doc *.md
%{pg_config_pkglibdir}/vchord.so
%{pg_config_sharedir}/extension/vchord*
%changelog