commit
4aee332a1a
20
rubygem-sdoc-version-option-fix.patch
Normal file
20
rubygem-sdoc-version-option-fix.patch
Normal file
@ -0,0 +1,20 @@
|
||||
diff --git a/bin/sdoc b/bin/sdoc
|
||||
index 78640fe..0ba391d 100755
|
||||
--- a/bin/sdoc
|
||||
+++ b/bin/sdoc
|
||||
@@ -1,6 +1,12 @@
|
||||
#!/usr/bin/env ruby -KU
|
||||
require 'sdoc'
|
||||
|
||||
+if ARGV.include?('--version') || ARGV.include?('-v')
|
||||
+ require 'sdoc/version'
|
||||
+ puts "sdoc #{SDoc::VERSION}"
|
||||
+ exit 0
|
||||
+end
|
||||
+
|
||||
begin
|
||||
ARGV.unshift('--format=sdoc') if ARGV.grep(/\A(-f|--fmt|--format|-r|-R|--ri|--ri-site)\b/).empty?
|
||||
r = RDoc::RDoc.new
|
||||
|
||||
|
||||
|
||||
76
rubygem-sdoc.spec
Normal file
76
rubygem-sdoc.spec
Normal file
@ -0,0 +1,76 @@
|
||||
%global gem_name sdoc
|
||||
Name: rubygem-%{gem_name}
|
||||
Version: 1.0.0
|
||||
Release: 1
|
||||
Summary: RDoc generator to build searchable HTML documentation for Ruby code
|
||||
License: MIT and (GPLv2 or Ruby) and BSD
|
||||
URL: https://github.com/zzak/sdoc
|
||||
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
||||
Source1: sdoc.1
|
||||
Source2: sdoc-merge.1
|
||||
Patch0: rubygem-sdoc-version-option-fix.patch
|
||||
Requires: rubygem(json)
|
||||
BuildRequires: ruby(release) rubygems-devel ruby rubygem(minitest)
|
||||
BuildArch: noarch
|
||||
%description
|
||||
SDoc is simply a wrapper for the rdoc command line tool.
|
||||
|
||||
%package doc
|
||||
Summary: Documentation for %{name}
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
BuildArch: noarch
|
||||
%description doc
|
||||
Documentation for %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{gem_name}-%{version}
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
gem build ../%{gem_name}-%{version}.gemspec
|
||||
%gem_install
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}%{gem_dir}
|
||||
cp -a .%{gem_dir}/* \
|
||||
%{buildroot}%{gem_dir}/
|
||||
mkdir -p %{buildroot}%{_bindir}
|
||||
cp -a .%{_bindir}/* \
|
||||
%{buildroot}%{_bindir}/
|
||||
mkdir -p %{buildroot}%{_mandir}/man1
|
||||
cp %{SOURCE1} %{buildroot}%{_mandir}/man1
|
||||
cp %{SOURCE2} %{buildroot}%{_mandir}/man1
|
||||
find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
|
||||
|
||||
%check
|
||||
pushd .%{gem_instdir}
|
||||
sed -i "/require 'bundler\/setup'/ s/^/#/" ./spec/spec_helper.rb
|
||||
ruby -Ilib:spec -e 'Dir.glob "./spec/*.rb", &method(:require)'
|
||||
popd
|
||||
|
||||
%files
|
||||
%dir %{gem_instdir}
|
||||
%{_bindir}/sdoc
|
||||
%{_bindir}/sdoc-merge
|
||||
%exclude %{gem_instdir}/.gitignore
|
||||
%exclude %{gem_instdir}/.travis.yml
|
||||
%license %{gem_instdir}/LICENSE
|
||||
%{gem_instdir}/bin
|
||||
%{gem_libdir}
|
||||
%exclude %{gem_cache}
|
||||
%{gem_spec}
|
||||
%doc %{_mandir}/man1/sdoc-merge.1*
|
||||
%doc %{_mandir}/man1/sdoc.1*
|
||||
|
||||
%files doc
|
||||
%doc %{gem_docdir}
|
||||
%doc %{gem_instdir}/CHANGELOG.md
|
||||
%{gem_instdir}/Gemfile
|
||||
%doc %{gem_instdir}/README.md
|
||||
%{gem_instdir}/Rakefile
|
||||
%{gem_instdir}/sdoc.gemspec
|
||||
%{gem_instdir}/spec
|
||||
|
||||
%changelog
|
||||
* Wed Jul 29 2020 yanan li <liyanan032@huawei.com> - 1.0.0-1
|
||||
- Package init
|
||||
5
rubygem-sdoc.yaml
Normal file
5
rubygem-sdoc.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
git_url: https://github.com/zzak/sdoc.git
|
||||
version_control: github
|
||||
src_repo: zzak/sdoc
|
||||
tag_prefix: "^v"
|
||||
seperator: "."
|
||||
BIN
sdoc-1.0.0.gem
Normal file
BIN
sdoc-1.0.0.gem
Normal file
Binary file not shown.
57
sdoc-merge.1
Normal file
57
sdoc-merge.1
Normal file
@ -0,0 +1,57 @@
|
||||
'\" t
|
||||
.\" Title: sdoc-merge
|
||||
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
|
||||
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
|
||||
.\" Date: 08/06/2013
|
||||
.\" Manual: \ \&
|
||||
.\" Source: \ \&
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "SDOC\-MERGE" "1" "08/06/2013" "\ \&" "\ \&"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
.SH "NAME"
|
||||
sdoc-merge \- a command line tool to merge multiple sdoc folders into a single documentation site
|
||||
.SH "SYNOPSIS"
|
||||
.sp
|
||||
\fBsdoc\-merge\fR [\fIOPTIONS\fR] \fIDIRECTORIES\fR
|
||||
.SH "DESCRIPTION"
|
||||
.sp
|
||||
sdoc\-merge is a command line tool to merge multiple sdoc folders into a single documentation site\&. It\(cqs part of SDoc, see "man sdoc" for more details\&.
|
||||
.sp
|
||||
Example:
|
||||
.sp
|
||||
sdoc\-merge \-\-title "Ruby v1\&.9, Rails v2\&.3\&.2\&.1" \-\-op merged \-\-names "Ruby,Rails" ruby\-v1\&.9 rails\-v2\&.3\&.2\&.1
|
||||
.SH "OPTIONS"
|
||||
.PP
|
||||
\fB\-n, \-\-names\fR \fI[NAMES]\fR
|
||||
.RS 4
|
||||
Set the output directory
|
||||
.RE
|
||||
.PP
|
||||
\fB\-o, \-\-op\fR \fI[DIRECTORY]\fR
|
||||
.RS 4
|
||||
Set the output directory
|
||||
.RE
|
||||
.PP
|
||||
\fB\-t, \-\-title\fR \fI[TITLE]\fR
|
||||
.RS 4
|
||||
Set the title of merged file
|
||||
.RE
|
||||
44
sdoc.1
Normal file
44
sdoc.1
Normal file
@ -0,0 +1,44 @@
|
||||
'\" t
|
||||
.\" Title: sdoc
|
||||
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
|
||||
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
|
||||
.\" Date: 08/06/2013
|
||||
.\" Manual: \ \&
|
||||
.\" Source: \ \&
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "SDOC" "1" "08/06/2013" "\ \&" "\ \&"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.\" http://bugs.debian.org/507673
|
||||
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" disable hyphenation
|
||||
.nh
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
.SH "NAME"
|
||||
sdoc \- RDoc generator to build searchable HTML documentation for Ruby code
|
||||
.SH "SYNOPSIS"
|
||||
.sp
|
||||
\fBsdoc\fR [\fIOPTIONS\fR] \fIPROJECTDIR\fR
|
||||
.SH "DESCRIPTION"
|
||||
.sp
|
||||
SDoc is simply a wrapper for the rdoc command line tool\&. See "sdoc \-\-help" for more details\&. \fI\-\-fmt\fR is set to shtml by default\&. The default template \fI\-T\fR is shtml, but you can also use the direct template\&.
|
||||
.sp
|
||||
Example:
|
||||
.sp
|
||||
sdoc \-o doc/rails \-T direct rails
|
||||
.SH "OPTIONS"
|
||||
.sp
|
||||
See "sdoc \-\-help" to see all the available options\&.
|
||||
Loading…
x
Reference in New Issue
Block a user