2020-10-19 23:37:00 +02:00
|
|
|
#
|
2023-02-27 07:32:00 +01:00
|
|
|
# spec file for package glow
|
2020-10-19 23:37:00 +02:00
|
|
|
#
|
2023-02-27 07:32:00 +01:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2020-10-19 23:37:00 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2023-02-27 07:32:00 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2020-10-19 23:37:00 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2023-02-27 07:32:00 +01:00
|
|
|
%{go_nostrip}
|
|
|
|
# Disable LTO flags to stop builds failing on some architectures
|
|
|
|
%global _lto_cflags %nil
|
2020-10-19 23:37:00 +02:00
|
|
|
Name: glow
|
2023-06-14 11:57:34 +02:00
|
|
|
Version: 1.5.1
|
2020-10-19 23:37:00 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: Render markdown on the CLI
|
|
|
|
#
|
|
|
|
License: MIT
|
|
|
|
#
|
|
|
|
Group: System/Console
|
2023-02-27 07:32:00 +01:00
|
|
|
URL: https://github.com/charmbracelet/glow
|
2020-10-19 23:37:00 +02:00
|
|
|
#
|
|
|
|
Source0: https://github.com/charmbracelet/glow/archive/v%{version}/%{name}-%{version}.tar.gz
|
2021-07-09 09:11:16 +02:00
|
|
|
# `osc service disabledrun`
|
2023-02-27 07:32:00 +01:00
|
|
|
Source1: vendor.tar.zst
|
2020-10-19 23:37:00 +02:00
|
|
|
#
|
2023-03-13 15:55:48 +01:00
|
|
|
Source2: README.suse-maint.md
|
|
|
|
#
|
2023-06-14 11:57:34 +02:00
|
|
|
Patch1: fix-for-go-117.patch
|
|
|
|
Patch2: https://patch-diff.githubusercontent.com/raw/charmbracelet/glow/pull/504.patch#/fix-gitignore-bypass.patch
|
2023-06-04 14:02:20 +02:00
|
|
|
BuildRequires: golang-packaging
|
2023-06-14 11:57:34 +02:00
|
|
|
BuildRequires: zstd
|
|
|
|
BuildRequires: golang(API) >= 1.17
|
2020-10-19 23:37:00 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
Glow is a terminal based markdown reader designed from the ground up to bring
|
|
|
|
out the beauty—and power—of the CLI.
|
|
|
|
|
|
|
|
Use it to discover markdown files, read documentation directly on the command
|
|
|
|
line and stash markdown files to your own private collection so you can read
|
|
|
|
them anywhere. Glow will find local markdown files in subdirectories or a local
|
|
|
|
Git repository.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%autosetup -p1 -a1
|
|
|
|
|
|
|
|
%build
|
2023-02-27 07:32:00 +01:00
|
|
|
%ifarch ppc64
|
|
|
|
BUILDMOD=""
|
|
|
|
%else
|
|
|
|
BUILDMOD="-buildmode=pie"
|
|
|
|
%endif
|
|
|
|
export CGO_CFLAGS="%{optflags}"
|
|
|
|
export CGO_CXXFLAGS="%{optflags}"
|
|
|
|
export CGO_CPPFLAGS="%{optflags}"
|
2023-06-14 11:57:34 +02:00
|
|
|
go build -v -x -mod=vendor $BUILDMOD -a -ldflags "-s -X main.Version=%{version}"
|
2020-10-19 23:37:00 +02:00
|
|
|
|
|
|
|
%install
|
2023-02-27 07:32:00 +01:00
|
|
|
install -Dm755 %{name} %{buildroot}%{_bindir}/%{name}
|
2020-10-19 23:37:00 +02:00
|
|
|
|
|
|
|
%check
|
|
|
|
./glow --version
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%doc README.md
|
|
|
|
%license LICENSE
|
|
|
|
%{_bindir}/glow
|
2023-02-27 07:32:00 +01:00
|
|
|
|
|
|
|
%changelog
|