usql/usql.spec

56 lines
1.6 KiB
RPMSpec
Raw Normal View History

2022-12-15 18:04:02 +03:00
%define debug %nil
%define debug_package %nil
Name: usql
2023-12-21 19:19:14 +00:00
Version: 0.17.2
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
2023-08-19 17:39:17 +00:00
BuildRequires: go >= 1.21
2022-12-15 18:04:02 +03:00
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}"`
2023-10-01 10:27:55 +00:00
export GOPROXY=direct
2022-12-15 18:04:02 +03:00
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}