]> git.pld-linux.org Git - packages/usql.git/commitdiff
new
authorJan Palus <atler@pld-linux.org>
Thu, 4 Mar 2021 16:32:30 +0000 (17:32 +0100)
committerJan Palus <atler@pld-linux.org>
Thu, 4 Mar 2021 16:33:04 +0000 (17:33 +0100)
usql.spec [new file with mode: 0644]

diff --git a/usql.spec b/usql.spec
new file mode 100644 (file)
index 0000000..55da81b
--- /dev/null
+++ b/usql.spec
@@ -0,0 +1,51 @@
+Summary:       Universal command-line interface for SQL databases
+Name:          usql
+Version:       0.8.1
+Release:       1
+License:       MIT
+Group:         Applications/Databases
+#Source0Download: https://github.com/xo/usql/releases
+Source0:       https://github.com/xo/usql/archive/v%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: 74b9b417310d4ef66d8097a36e18204f
+# cd usql-%{version}
+# go mod vendor
+# cd ..
+# tar cJf usql-vendor-%{version}.tar.xz usql-%{version}/vendor
+Source1:       %{name}-vendor-%{version}.tar.xz
+# Source1-md5: 6b0529e711cd2095e2fecea9f6d214d0
+URL:           https://github.com/xo/usql
+BuildRequires: golang >= 1.14
+BuildRequires: tar >= 1:1.22
+BuildRequires: xz
+ExclusiveArch: %{ix86} %{x8664} %{arm} aarch64 mips64 mips64le ppc64 ppc64le s390x
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define                tags    most oracle sqlite_app_armor sqlite_fts5 sqlite_introspect sqlite_json1 sqlite_stat4 sqlite_userauth sqlite_vtable sqlite_icu no_adodb no_h2
+
+%description
+A universal command-line interface for PostgreSQL, MySQL, Oracle
+Database, SQLite3, Microsoft SQL Server, and many other databases
+including NoSQL and non-relational databases!
+
+%prep
+%setup -q -b1
+
+%{__mkdir_p} .go-cache
+
+%build
+GOCACHE="$(pwd)/.go-cache" go build -v -mod=vendor -tags="%{tags}" -ldflags="-s -w -X github.com/xo/usql/text.CommandName=%{name} -X github.com/xo/usql/text.CommandVersion=%{version}" -o bin/%{name}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+install -d $RPM_BUILD_ROOT%{_bindir}
+
+cp -p bin/%{name} $RPM_BUILD_ROOT%{_bindir}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc README.md
+%attr(755,root,root) %{_bindir}/%{name}
This page took 0.106519 seconds and 4 git commands to generate.