Compare commits

...

No commits in common. "c8-stream-1.0" and "stream-golang-ecosystem-1.0-rhel-8.9.0" have entirely different histories.

4 changed files with 44 additions and 43 deletions

5
.gitignore vendored
View File

@ -1 +1,4 @@
SOURCES/go-md2man-1d903dc.tar.gz
SOURCES/blackfriday-77efab5.tar.gz
SOURCES/go-md2man-71acacd.tar.gz
SOURCES/sanitized_anchor_name-8e87604.tar.gz
/v2.0.2.tar.gz

View File

@ -1 +0,0 @@
1703010625e145380033429a2b4d512426b5dcb3 SOURCES/go-md2man-1d903dc.tar.gz

View File

@ -1,4 +1,3 @@
%global with_bundled 1
%global with_debug 1
%if 0%{?with_debug}
@ -8,63 +7,42 @@
%global debug_package %{nil}
%endif
%if 0%{?rhel} > 7 && ! 0%{?fedora}
%define gobuild(o:) \
scl enable go-toolset-1.10 -- go build -buildmode pie -compiler gc -tags=rpm_crashtraceback -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags'" -a -v -x %{?**};
%else
%define gobuild(o:) go build -buildmode pie -compiler gc -tags=rpm_crashtraceback -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags'" -a -v -x %{?**};
%endif # distro
GO111MODULE=off go build -buildmode pie -compiler gc -tags="rpm_crashtraceback ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-} -linkmode=external -compressdwarf=false -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags'" -a -v %{?**};
%global provider github
%global provider_tld com
%global project cpuguy83
%global repo go-md2man
# https://github.com/cpuguy83/go-md2man
%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo}
%global import_path %{provider_prefix}
%global commit 1d903dcb749992f3741d744c0f8376b4bd7eb3e1
%global shortcommit %(c=%{commit}; echo ${c:0:7})
Name: golang-%{provider}-%{project}-%{repo}
Version: 1.0.7
Release: 11%{?dist}
Name: golang-github-cpuguy83-go-md2man
Version: 2.0.2
Release: 3%{?dist}
Summary: Process markdown into manpages
License: MIT
URL: https://%{import_path}
Source0: https://%{import_path}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz
# e.g. el6 has ppc64 arch without gcc-go, so EA tag is required
#ExclusiveArch: %%{?go_arches:%%{go_arches}}%%{!?go_arches:%%{ix86} x86_64 %%{arm}}
ExclusiveArch: aarch64 x86_64 ppc64le s390x
BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang}
%if 0%{?rhel} > 7
BuildRequires: go-toolset-1.10-golang
%endif # rhel8
URL: https://github.com/cpuguy83/go-md2man/
Source0: https://github.com/cpuguy83/go-md2man/archive/refs/tags/v%{version}.tar.gz
# https://fedoraproject.org/wiki/PackagingDrafts/Go#Go_Language_Architectures
ExclusiveArch: %{go_arches}
BuildRequires: golang
BuildRequires: git
Provides: %{repo} = %{version}-%{release}
Provides: go-md2man = %{version}-%{release}
Obsoletes: golang-github-cpuguy83-md2man < %{version}
Provides: golang-github-cpuguy83-md2man = %{version}
%description
%{repo} is a golang tool using blackfriday to process markdown into
%{name} is a golang tool using blackfriday to process markdown into
manpages.
# Go Toolset
%if 0%{?rhel} > 7
%{?enable_gotoolset110}
%endif
%prep
%autosetup -Sgit -n %{repo}-%{commit}
%autosetup -Sgit -n go-md2man-%{version}
%build
ln -s vendor src
mkdir -p src/%{provider}.%{provider_tld}/%{project}
ln -s $(pwd) src/%{import_path}
mkdir -p src/github.com/cpuguy83
ln -s $(pwd) src/github.com/cpuguy83/go-md2man
export GOPATH=$(pwd)
GOPATH=$GOPATH %gobuild -o bin/go-md2man %{import_path}
GOPATH=$GOPATH %gobuild -o bin/go-md2man github.com/cpuguy83/go-md2man
%install
# install go-md2man binary
install -d %{buildroot}%{_bindir}
install -p -m 755 bin/%{repo} %{buildroot}%{_bindir}
install -p -m 755 bin/go-md2man %{buildroot}%{_bindir}
# generate man page
install -d -p %{buildroot}%{_mandir}/man1
bin/go-md2man -in=go-md2man.1.md -out=go-md2man.1
@ -78,10 +56,30 @@ install -p -m 644 go-md2man.1 %{buildroot}%{_mandir}/man1
%files
%license LICENSE.md
%doc README.md
%{_bindir}/%{repo}
%{_bindir}/go-md2man
%{_mandir}/man1/*
%changelog
* Wed May 11 2022 Jindrich Novy <jnovy@redhat.com> - 2.0.2-3
- add missing provides
- Related: #2061390
* Mon May 09 2022 Jindrich Novy <jnovy@redhat.com> - 2.0.2-2
- fix name
- Related: #2061390
* Mon May 09 2022 Jindrich Novy <jnovy@redhat.com> - 2.0.2-1
- update to 2.0.2
- Related: #2061390
* Tue Jun 11 2019 Lokesh Mandvekar <lsm5@redhat.com> - 1.0.7-13
- Resolves: #1711418 - build for ix86 as well
* Mon Apr 29 2019 Lokesh Mandvekar <lsm5@redhat.com> - 1.0.7-12
- Resolves: #1703217
- use go-toolset instead of go-toolset-1.10
- update gobuild macro
* Mon Aug 06 2018 Lokesh Mandvekar <lsm5@redhat.com> - 1.0.7-11
- disable i686 temporarily

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (v2.0.2.tar.gz) = c81edfdc0b6647ef699cc908a1a7038d98da34df6d48b223b83a0699de91a7e322e70d67645acf1fc848918f4c1ea310160c7ccb75e6f97b53af7103c7aa18b3