File octosql.spec of Package octosql
#
# spec file for package octosql
#
# Copyright (c) 2022 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/
#
# nodebuginfo
%define __arch_install_post export NO_BRP_STRIP_DEBUG=true
Name: octosql
Version: 0.12.1
Release: 0
Summary: CLI tool to join, analyse and transform data from multiple databases and file formats using SQL
License: MPL-2.0
Group: Productivity/Databases/Clients
URL: https://github.com/cube2222/octosql
Source: %{name}-%{version}.tar.gz
Source1: vendor.tar.gz
BuildRequires: golang(API) >= 1.18
%description
OctoSQL is a CLI tool which lets you query a plethora of databases and file
formats using SQL through a unified interface, even do JOINs between them. Ever
needed to join a JSON file with a PostgreSQL table? OctoSQL can help you with
that. At the same time it's an easily extensible full-blown dataflow engine, and
you can use it to add a SQL interface to your own applications.
%prep
%autosetup -a 1
%build
# There is a directory octosql/ in source that
# conflicts with the typical pattern -o "%{name}"
# use binary name "main" and rename at install time
go build \
-mod=vendor \
-buildmode=pie \
./main.go
%install
install -D -m 0755 main "%{buildroot}/%{_bindir}/%{name}"
%files
%doc README.md
%license LICENSE
%{_bindir}/%{name}
%changelog