From e000f16b9dd1dc1b79a04bff6c6ece92b367d40b5cb7d3a65d1fee5a4a53efca Mon Sep 17 00:00:00 2001 From: Jeff Kowalczyk Date: Wed, 30 Oct 2024 14:18:23 +0000 Subject: [PATCH] - Generete and package go-md2man man page. OBS-URL: https://build.opensuse.org/package/show/devel:languages:go/golang-github-cpuguy83-go-md2man?expand=0&rev=18 --- .gitattributes | 23 ++++ .gitignore | 1 + _service | 17 +++ _servicedata | 4 + go-md2man-2.0.0+git20190314.f79a8a8.tar.xz | 3 + golang-github-cpuguy83-go-md2man.changes | 150 +++++++++++++++++++++ golang-github-cpuguy83-go-md2man.spec | 84 ++++++++++++ rpmlintrc | 8 ++ 8 files changed, 290 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _service create mode 100644 _servicedata create mode 100644 go-md2man-2.0.0+git20190314.f79a8a8.tar.xz create mode 100644 golang-github-cpuguy83-go-md2man.changes create mode 100644 golang-github-cpuguy83-go-md2man.spec create mode 100644 rpmlintrc diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_service b/_service new file mode 100644 index 0000000..c1f020f --- /dev/null +++ b/_service @@ -0,0 +1,17 @@ + + + https://github.com/cpuguy83/go-md2man + git + .git + 2.0.0+git%cd.%h + v2.0.0 + enable + + + go-md2man-*.tar + xz + + + go-md2man + + diff --git a/_servicedata b/_servicedata new file mode 100644 index 0000000..dbd7942 --- /dev/null +++ b/_servicedata @@ -0,0 +1,4 @@ + + + https://github.com/cpuguy83/go-md2man + f79a8a8ca69da163eee19ab442bedad7a35bba5a \ No newline at end of file diff --git a/go-md2man-2.0.0+git20190314.f79a8a8.tar.xz b/go-md2man-2.0.0+git20190314.f79a8a8.tar.xz new file mode 100644 index 0000000..7353a0b --- /dev/null +++ b/go-md2man-2.0.0+git20190314.f79a8a8.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5bf5de23abd56c68af56e2d7020af2726fd202a761f7af94a43355a02dfa04b0 +size 44300 diff --git a/golang-github-cpuguy83-go-md2man.changes b/golang-github-cpuguy83-go-md2man.changes new file mode 100644 index 0000000..ff8fe46 --- /dev/null +++ b/golang-github-cpuguy83-go-md2man.changes @@ -0,0 +1,150 @@ +------------------------------------------------------------------- +Wed Oct 30 07:44:45 UTC 2024 - Dominique Leuenberger + +- Generete and package go-md2man man page. + +------------------------------------------------------------------- +Wed Feb 5 11:53:22 UTC 2020 - John Paul Adrian Glaubitz + +- Update to version 2.0.0+git20190314.f79a8a8: + * Psych, we only support go.11 and higher + * Update readme + * Use go modules and set import paths to /v2 + * Improvements to makefile + * Use TRAVIS_GO_VERSION env var instead of matrix + * Use golangci-lint + * Update travis config for go versions + * Don't run vendor validation in CI + * Fix the example and typo + * Fix links processing for v2 + * RenderNode: fix error printing + * Fix table parsing/processing for v2 + * Fix list in list embedding + * Update md2man to use blackfriday v2 API + * Update vendoring to blackfriday v2 API + * remove older versions of go from travis config + * fix validate vendor script + * More linters + * Add errcheck to metalinter + * Fix linting issues + * set vendor check to executable + * Add travis config + * remove used processFooterText + * Fix falal -> fatalf + * Add TitleBlock test + * gofmt roff.go + * Update README details + * Improve rendering of nested lists + * dep ensure -upgrade to get v1.5 of blackfriday + * converts project to use dep + * Add some initial unit tests + * Fix some table rendering issues for empty cells + * Don't use CMD in Dockerfile + * Add dockerfile + * Fix tables displaying using tbl specification +- from version 1.0.10 + * Bumps blackfriday to 1.5.2 + * Some tidying up of CI, Makefile enhancements. +- from version 1.0.9 + * Use go modules instead of go dep + + Everything is still vendored so build scripts should not fail +- from version 1.0.8 + * Improve testing + * Improve rendering of nested lists - #30 @msimacek +- from version 1.0.7 + * Switch vendor tool to dep #29 + * Update blackfriday vendoring to v1.5 #29 +- Update _service file +- Move LICENSE to %license section +- Invoke %gobuild with -mod=vendor "" to disable network access +- Remove s390x from ExcludeArch + +------------------------------------------------------------------- +Wed Jun 13 15:17:54 UTC 2018 - jmassaguerpla@suse.com + +- since commit https://github.com/cpuguy83/go-md2man/commit/648eed146d3f3beacb64063cd0daae908015eebd#diff-a447edf0cfc23146457ff83dce52d372 there is a vendor directory and thus we don't need to + require any external golang package. + +------------------------------------------------------------------- +Thu Feb 1 16:57:17 CET 2018 - ro@suse.de + +- do not build on s390, only on s390x (no go on s390) + +------------------------------------------------------------------- +Fri Mar 3 10:44:26 UTC 2017 - jmassaguerpla@suse.com + +- add provides go-go-md2man + this provides was there in previous versions and we can not remove + it or otherwise it breaks dependent packages (i.e. docker, k8s) + +------------------------------------------------------------------- +Wed Dec 07 15:16:49 UTC 2016 - tboerger@suse.com + +- Update to version 1.0.6+git20160904.a65d4d2: + * Render raw html as is + * Add html entity output support + * fix escaping for curly braces + * fix wrong type for Entity func + * md2man usable as a library (again) + * Improve man page rendering + * use stdio for default input and output + * improve link + * add vendor + +------------------------------------------------------------------- +Fri Dec 2 09:13:23 UTC 2016 - tboerger@suse.com + +- Recursively test all packages + +------------------------------------------------------------------- +Fri Dec 2 09:13:23 UTC 2016 - tboerger@suse.com + +- Added rpmlintrc for common golang linting + +------------------------------------------------------------------- +Fri Dec 2 09:13:23 UTC 2016 - tboerger@suse.com + +- Requires and BuildRequires for dependencies + +------------------------------------------------------------------- +Fri Dec 2 09:13:23 UTC 2016 - tboerger@suse.com + +- Using the new golang-packaging now + +------------------------------------------------------------------- +Fri Dec 2 09:13:23 UTC 2016 - tboerger@suse.com + +- Refactoed spec with a new unified layout + +------------------------------------------------------------------- +Thu Dec 1 16:15:35 UTC 2016 - jmassaguerpla@suse.com + +- add golang-github-shurcool-sanitized_anchor_name-source dependency + +------------------------------------------------------------------- +Thu Dec 1 16:08:40 UTC 2016 - jmassaguerpla@suse.com + +- add the generation of the source package. With go1.7 we need + the source in order to build other golang-* which depend on this + one. + +------------------------------------------------------------------- +Sun Jan 17 09:56:53 UTC 2016 - i@marguerite.su + +- Update to version 1.0.5+git20160104.2724a9c: + + md2man usable as a library (again) + + Improve man page rendering + +------------------------------------------------------------------- +Tue Jul 28 12:30:43 UTC 2015 - i@marguerite.su + +- rename to golang-github-cpuguy83-md2man +- update version 1.0.2+git20150617.e69ac41 +- use golang-packaging for packaging + +------------------------------------------------------------------- +Wed May 27 09:06:10 UTC 2015 - dmacvicar@suse.de + +- initial package for version 1.0.2 + + diff --git a/golang-github-cpuguy83-go-md2man.spec b/golang-github-cpuguy83-go-md2man.spec new file mode 100644 index 0000000..7f978bf --- /dev/null +++ b/golang-github-cpuguy83-go-md2man.spec @@ -0,0 +1,84 @@ +# +# spec file for package golang-github-cpuguy83-go-md2man +# +# Copyright (c) 2024 SUSE LLC +# +# 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. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%global provider github +%global provider_tld com +%global project cpuguy83 +%global repo go-md2man +%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} +%global import_path %{provider_prefix} + +Name: golang-%{provider}-%{project}-%{repo} +Version: 2.0.0+git20190314.f79a8a8 +Release: 0 +Summary: Convert markdown into man pages +License: MIT +Group: Development/Languages/Golang +URL: https://%{provider_prefix} +Source0: %{repo}-%{version}.tar.xz +Source1: rpmlintrc +BuildRoot: %{_tmppath}/%{name}-%{version}-build + +BuildRequires: golang-packaging +BuildRequires: xz + +%{go_nostrip} +%{go_provides} + +%description +Tool to converts markdown into man pages. + +%package -n go-md2man +Summary: Tool to converts markdown into man pages +Group: Development/Languages/Golang +Provides: go-go-md2man = %{version} +AutoReqProv: Off + +%{go_exclusivearch} + +%description -n go-md2man +Tool to converts markdown into man pages. + +%prep +%setup -q -n %{repo}-%{version} + +%build +%goprep %{import_path} +%gobuild --mod=vendor "" ... + +%install +%goinstall +%gosrc +%gofilelist +mkdir -p %{buildroot}%{_mandir}/man1 +../go/bin/go-md2man -in go-md2man.1.md -out %{buildroot}%{_mandir}/man1/go-md2man.1 + +%check +%gotest --mod=vendor "" ... + +%files -f file.lst +%defattr(-,root,root,-) +%doc README.md +%license LICENSE.md + +%files -n go-md2man +%defattr(-,root,root) +%{_bindir}/go-md2man +%{_mandir}/man1/go-md2man.1%{?ext_man} + +%changelog diff --git a/rpmlintrc b/rpmlintrc new file mode 100644 index 0000000..d37fdc2 --- /dev/null +++ b/rpmlintrc @@ -0,0 +1,8 @@ +# We are preventing the stripping to keep backtraces intact +addFilter("unstripped-binary-or-object") + +# Golang doesn't support dynamic linking yet in a proper way +addFilter("statically-linked-binary") + +# We are aware of that but shorter names are not possible +addFilter("filename-too-long-for-joliet")