dolt/dolt.spec

61 lines
1.2 KiB
RPMSpec
Raw Normal View History

2022-11-24 01:23:54 +03:00
%define debug %nil
%define debug_package %nil
2024-06-26 12:51:00 +00:00
%define secscan 1
2022-11-24 01:23:54 +03:00
Name: dolt
2024-07-18 00:16:03 +00:00
Version: 1.42.1
2022-11-24 01:23:54 +03:00
Release: 1
Summary: Git for Data
URL: https://github.com/dolthub/dolt
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
License: ASL 2.0
Group: Development/Other
2024-04-05 08:07:01 +00:00
BuildRequires: go >= 1.22
2022-11-24 01:23:54 +03:00
BuildRequires: git-core
BuildRequires: upx
2024-06-26 12:51:00 +00:00
%if %{secscan}
BuildRequires: clamav
BuildRequires: trivy
%endif
2022-11-24 01:23:54 +03:00
%description
Dolt is a SQL database that you can fork, clone, branch,
merge, push and pull just like a Git repository. Connect
to Dolt just like any MySQL database to run queries or
update the data using SQL commands. Use the command line
interface to import CSV files, commit your changes, push
them to a remote, or merge your teammate's changes
%prep
%setup -q
# fix permissions
find . -perm 0755 -type f -exec chmod 0644 {} \;
2024-06-26 12:51:00 +00:00
%if %{secscan}
clamscan -ir .
trivy fs --scanners vuln --format cosign-vuln .
%endif
2022-11-24 01:23:54 +03:00
%build
2023-11-29 09:15:33 +00:00
export GOPROXY=https://proxy.golang.org/cached-only
2022-11-24 01:23:54 +03:00
pushd go
go build -o ../bin/%{name} ./cmd/dolt
popd
upx bin/%{name}
%install
install -Dm0755 bin/%{name} %{buildroot}%{_bindir}/%{name}
%files
2023-03-10 12:41:38 +00:00
%doc README.md LICENSE
2022-11-24 01:23:54 +03:00
%{_bindir}/%{name}
2024-06-26 12:51:00 +00:00
%check
%if %{secscan}
clamscan -ir %{buildroot}
%endif