diff --git a/rubygem-sdoc-version-option-fix.patch b/rubygem-sdoc-version-option-fix.patch new file mode 100644 index 0000000000000000000000000000000000000000..4b112bdce42f699be9bc91b006c90d06581d2200 --- /dev/null +++ b/rubygem-sdoc-version-option-fix.patch @@ -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 + + + diff --git a/rubygem-sdoc.spec b/rubygem-sdoc.spec new file mode 100644 index 0000000000000000000000000000000000000000..1ac76de4affa27dc4bb553912418c3f3a479cf38 --- /dev/null +++ b/rubygem-sdoc.spec @@ -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 - 1.0.0-1 +- Package init diff --git a/rubygem-sdoc.yaml b/rubygem-sdoc.yaml new file mode 100644 index 0000000000000000000000000000000000000000..2cd4fb6df760c42f96f85b34adc4a392ce994980 --- /dev/null +++ b/rubygem-sdoc.yaml @@ -0,0 +1,5 @@ +git_url: https://github.com/zzak/sdoc.git +version_control: github +src_repo: zzak/sdoc +tag_prefix: "^v" +seperator: "." diff --git a/sdoc-1.0.0.gem b/sdoc-1.0.0.gem new file mode 100644 index 0000000000000000000000000000000000000000..5de44a271cf0eae1f89018f3b8c580452ae8ace4 Binary files /dev/null and b/sdoc-1.0.0.gem differ diff --git a/sdoc-merge.1 b/sdoc-merge.1 new file mode 100644 index 0000000000000000000000000000000000000000..b9f560531830090afad8f91074d2f464a94346d8 --- /dev/null +++ b/sdoc-merge.1 @@ -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 +.\" 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 diff --git a/sdoc.1 b/sdoc.1 new file mode 100644 index 0000000000000000000000000000000000000000..44a01d0ed8a6d132bdfc07983640c93f7ec543ba --- /dev/null +++ b/sdoc.1 @@ -0,0 +1,44 @@ +'\" t +.\" Title: sdoc +.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" 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\&.