%define debug %nil %define debug_package %nil Name: usql Version: 0.19.17 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 >= 1.21 BuildRequires: git-core BuildRequires: upx BuildRequires: pkgconfig(openssl3.3) %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 export GOPROXY=direct %setup -q %build #define LDFLAGS `"-s -w -X github.com/xo/usql/text.CommandName=%{name} -X github.com/xo/usql/text.CommandVersion=%{version}"` export GOPROXY=direct 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}