File pgstream.spec of Package pgstream

#
# spec file for package pgstream
#
# Copyright (c) 2025 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/
#


Name:           pgstream
Version:        0.8.9
Release:        0
Summary:        PostgreSQL replication with DDL changes
License:        Apache-2.0
URL:            https://xata.io/ 
Source0:        https://github.com/xataio/pgstream/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1:        vendor.tar.zst
BuildRequires:  zstd 
BuildRequires:  golang-packaging
ExcludeArch: %{ix86} %{arm}

%description
pgstream is an open source CDC command-line tool and library that offers
Postgres replication support with DDL changes to any provided output.

%prep
%autosetup -p1 -a1

%build
perl -p -i -e 's|Version = "development"|Version = "%{version}"|g' cmd/root_cmd.go
go build -mod=vendor -buildmode=pie

%install
install -D -m 0755 -t %{buildroot}%{_bindir} pgstream

%files
%license LICENSE
%doc README.md
%{_bindir}/pgstream

%changelog
openSUSE Build Service is sponsored by