2022-12-15 18:04:02 +03:00
|
|
|
%define debug %nil
|
|
|
|
%define debug_package %nil
|
|
|
|
|
|
|
|
Name: usql
|
2023-08-16 21:55:30 +00:00
|
|
|
Version: 0.15.0
|
2022-12-15 18:04:02 +03:00
|
|
|
Release: 1
|
|
|
|
Summary: Universal command-line interface for SQL databases
|
|
|
|
URL: https://github.com/xo/usql
|
|
|
|
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
|
|
|
|
License: MIT
|
|
|
|
Group: Development/Other
|
|
|
|
BuildRequires: go
|
|
|
|
BuildRequires: git-core
|
|
|
|
BuildRequires: upx
|
|
|
|
|
|
|
|
%description
|
|
|
|
usql is a universal command-line interface for PostgreSQL,
|
|
|
|
MySQL, Oracle Database, SQLite3, Microsoft SQL Server,
|
|
|
|
and many other databases including NoSQL and non-relational
|
|
|
|
databases!
|
|
|
|
|
|
|
|
usql provides a simple way to work with SQL and NoSQL
|
|
|
|
databases via a command-line inspired by PostgreSQL's psql.
|
|
|
|
usql supports most of the core psql features, such as
|
|
|
|
variables, backticks, backslash commands and has additional
|
|
|
|
features that psql does not, such as multiple database
|
|
|
|
support, copying between databases, syntax highlighting,
|
|
|
|
and context-based completion.
|
|
|
|
|
|
|
|
Database administrators and developers that would prefer
|
|
|
|
to work with a tool like psql with non-PostgreSQL databases,
|
|
|
|
will find usql intuitive, easy-to-use, and a great
|
|
|
|
replacement for the command-line clients/tools for other
|
|
|
|
databases.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
|
|
|
|
%build
|
|
|
|
#define LDFLAGS `"-s -w -X github.com/xo/usql/text.CommandName=%{name} -X github.com/xo/usql/text.CommandVersion=%{version}"`
|
|
|
|
|
|
|
|
|
|
|
|
go build -ldflags="-s -w -X github.com/xo/usql/text.CommandName=%{name} -X github.com/xo/usql/text.CommandVersion=%{version}" -trimpath -o bin/%{name}
|
|
|
|
|
|
|
|
upx bin/%{name}
|
|
|
|
|
|
|
|
%install
|
|
|
|
install -Dm0755 bin/%{name} %{buildroot}%{_bindir}/%{name}
|
|
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
%doc README.md LICENSE
|
|
|
|
%{_bindir}/%{name}
|
|
|
|
|
|
|
|
|