The package rpms/docco.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/docco.git/commit/?id=85866899b758....
Change:
+ExclusiveArch: %{nodejs_arches} noarch
Thanks.
Full change:
============
commit 85866899b75843b6184d4ead040256538efe5040
Author: Tom Hughes <tom(a)compton.nu>
Date: Thu Oct 24 08:41:51 2019 +0100
Modernise spec file
diff --git a/.gitignore b/.gitignore
index d0ede97..55e2db1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
/docco-0.6.1.tgz
/docco-0.6.2.tgz
/docco-0.6.3.tgz
+/docco-0.6.3.tar.gz
diff --git a/docco-0.6.3-Cakefile b/docco-0.6.3-Cakefile
deleted file mode 100644
index 6bffe0d..0000000
--- a/docco-0.6.3-Cakefile
+++ /dev/null
@@ -1,38 +0,0 @@
-{spawn, exec} = require 'child_process'
-fs = require 'fs'
-path = require 'path'
-
-option '-p', '--prefix [DIR]', 'set the installation prefix for `cake
install`'
-option '-w', '--watch', 'continually build the docco library'
-option '-l', '--layout [LAYOUT]', 'specify the layout for
Docco\'s docs'
-
-task 'build', 'build the docco library', (options) ->
- coffee = spawn 'coffee', ['-c' + (if options.watch then 'w'
else ''), '.']
- coffee.stdout.on 'data', (data) -> console.log data.toString().trim()
- coffee.stderr.on 'data', (data) -> console.log data.toString().trim()
-
-task 'install', 'install the `docco` command into /usr/local (or
--prefix)', (options) ->
- base = options.prefix or '/usr/local'
- lib = base + '/lib/docco'
- exec([
- 'mkdir -p ' + lib
- 'cp -rf bin README resources lib ' + lib
- 'ln -sf ' + lib + '/bin/docco ' + base + '/bin/docco'
- ].join(' && '), (err, stdout, stderr) ->
- if err then console.error stderr
- )
-
-task 'doc', 'rebuild the Docco documentation', (options) ->
- layout = options.layout or 'linear'
- exec([
- "bin/docco --layout #{layout} docco.litcoffee"
- "sed \"s/docco.css/resources\\/#{layout}\\/docco.css/\" <
docs/docco.html > index.html"
- 'rm -r docs'
- ].join(' && '), (err) ->
- throw err if err
- )
-
-task 'loc', 'count the lines of code in Docco', ->
- code = fs.readFileSync('docco.litcoffee').toString()
- lines = code.split('\n').filter (line) -> /^ /.test line
- console.log "Docco LOC: #{lines.length}"
diff --git a/docco-0.6.3-docco.litcoffee b/docco-0.6.3-docco.litcoffee
deleted file mode 100644
index 5bbcb5f..0000000
--- a/docco-0.6.3-docco.litcoffee
+++ /dev/null
@@ -1,325 +0,0 @@
-Docco
-=====
-
-**Docco** is a quick-and-dirty documentation generator, written in
-[Literate
CoffeeScript](http://coffeescript.org/#literate).
-It produces an HTML document that displays your comments intermingled with your
-code. All prose is passed through
-[Markdown](http://daringfireball.net/projects/markdown/syntax), and code is
-passed through [
Highlight.js](http://highlightjs.org/) syntax highlighting.
-This page is the result of running Docco against its own
-[source
file](https://github.com/jashkenas/docco/blob/master/docco.litcoffee).
-
-1. Install Docco with **npm**: `sudo npm install -g docco`
-
-2. Run it against your code: `docco src/*.coffee`
-
-There is no "Step 3". This will generate an HTML page for each of the named
-source files, with a menu linking to the other pages, saving the whole mess
-into a `docs` folder (configurable).
-
-The [Docco
source](http://github.com/jashkenas/docco) is available on GitHub,
-and is released under the [MIT
license](http://opensource.org/licenses/MIT).
-
-Docco can be used to process code written in any programming language. If it
-doesn't handle your favorite yet, feel free to
-[add it to the
list](https://github.com/jashkenas/docco/blob/master/resources/languages.....
-Finally, the ["literate"
style](http://coffeescript.org/#literate) of *any*
-language is also supported just tack an `.md` extension on the end:
-`.coffee.md`, `.py.md`, and so on.
-
-
-Partners in Crime:
-------------------
-
-* If Node.js doesn't run on your platform, or you'd prefer a more
-convenient package, get [Ryan
Tomayko](http://github.com/rtomayko)'s
-[Rocco](http://rtomayko.github.io/rocco/rocco.html), the **Ruby** port that's
-available as a gem.
-
-* If you're writing shell scripts, try
-[Shocco](http://rtomayko.github.io/shocco/), a port for the **POSIX shell**,
-also by Mr. Tomayko.
-
-* If **Python** is more your speed, take a look at
-[Nick
Fitzgerald](http://github.com/fitzgen)'s
[Pycco](http://fitzgen.github.io/pycco/).
-
-* For **Clojure** fans, [Fogus](http://blog.fogus.me/)'s
-[Marginalia](http://fogus.me/fun/marginalia/) is a bit of a departure from
-"quick-and-dirty", but it'll get the job done.
-
-* There's a **Go** port called [Gocco](http://nikhilm.github.io/gocco/),
-written by [Nikhil
Marathe](https://github.com/nikhilm).
-
-* For all you **PHP** buffs out there, Fredi Bach's
-[sourceMakeup](http://jquery-jkit.com/sourcemakeup/) (we'll let the faux pas
-with respect to our naming scheme slide), should do the trick nicely.
-
-* **Lua** enthusiasts can get their fix with
-[Robert
Gieseke](https://github.com/rgieseke)'s
[Locco](http://rgieseke.github.io/locco/).
-
-* And if you happen to be a **.NET**
-aficionado, check out [Don
Wilson](https://github.com/dontangg)'s
-[Nocco](http://dontangg.github.io/nocco/).
-
-* Going further afield from the quick-and-dirty, [Groc](http://nevir.github.io/groc/)
-is a **CoffeeScript** fork of Docco that adds a searchable table of contents,
-and aims to gracefully handle large projects with complex hierarchies of code.
-
-Note that not all ports will support all Docco features ... yet.
-
-
-Main Documentation Generation Functions
----------------------------------------
-
-Generate the documentation for our configured source file by copying over static
-assets, reading all the source files in, splitting them up into prose+code
-sections, highlighting each file in the appropriate language, and printing them
-out in an HTML template.
-
- document = (options = {}, callback) ->
- config = configure options
-
- fs.mkdirs config.output, ->
-
- callback or= (error) -> throw error if error
- copyAsset = (file, callback) ->
- fs.copy file, path.join(config.output, path.basename(file)), callback
- complete = ->
- copyAsset config.css, (error) ->
- if error then callback error
- else if fs.existsSync config.public then copyAsset config.public, callback
- else callback()
-
- files = config.sources.slice()
-
- nextFile = ->
- source = files.shift()
- fs.readFile source, (error, buffer) ->
- return callback error if error
-
- code = buffer.toString()
- sections = parse source, code, config
- format source, sections, config
- write source, sections, config
- if files.length then nextFile() else complete()
-
- nextFile()
-
-Given a string of source code, **parse** out each block of prose and the code that
-follows it by detecting which is which, line by line and then create an
-individual **section** for it. Each section is an object with `docsText` and
-`codeText` properties, and eventually `docsHtml` and `codeHtml` as well.
-
- parse = (source, code, config = {}) ->
- lines = code.split '\n'
- sections = []
- lang = getLanguage source, config
- hasCode = docsText = codeText = ''
-
- save = ->
- sections.push {docsText, codeText}
- hasCode = docsText = codeText = ''
-
-Our quick-and-dirty implementation of the literate programming style. Simply
-invert the prose and code relationship on a per-line basis, and then continue as
-normal below.
-
- if lang.literate
- isText = maybeCode = yes
- for line, i in lines
- lines[i] = if maybeCode and match = /^([ ]{4}|[ ]{0,3}\t)/.exec line
- isText = no
- line[match[0].length..]
- else if maybeCode = /^\s*$/.test line
- if isText then lang.symbol else ''
- else
- isText = yes
- lang.symbol + ' ' + line
-
- for line in lines
- if line.match(lang.commentMatcher) and not line.match(lang.commentFilter)
- save() if hasCode
- docsText += (line = line.replace(lang.commentMatcher, '')) +
'\n'
- save() if /^(---+|===+)$/.test line
- else
- hasCode = yes
- codeText += line + '\n'
- save()
-
- sections
-
-To **format** and highlight the now-parsed sections of code, we use **Highlight.js**
-over stdio, and run the text of their corresponding comments through
-**Markdown**, using [
Marked](https://github.com/chjj/marked).
-
- format = (source, sections, config) ->
- language = getLanguage source, config
-
-Tell Marked how to highlight code blocks within comments, treating that code
-as either the language specified in the code block or the language of the file
-if not specified.
-
- marked.setOptions {
- highlight: (code, lang) ->
- lang or= language.name
-
- if highlightjs.getLanguage(lang)
- highlightjs.highlight(lang, code).value
- else
- console.warn "docco: couldn't highlight code block with unknown
language '#{lang}' in #{source}"
- code
- }
-
- for section, i in sections
- code = highlightjs.highlight(language.name, section.codeText).value
- code = code.replace(/\s+$/, '')
- section.codeHtml = "<div
class='highlight'><pre>#{code}</pre></div>"
- section.docsHtml = marked(section.docsText)
-
-Once all of the code has finished highlighting, we can **write** the resulting
-documentation file by passing the completed HTML sections into the template,
-and rendering it to the specified output path.
-
- write = (source, sections, config) ->
-
- destination = (file) ->
- path.join(config.output, path.basename(file, path.extname(file)) +
'.html')
-
-The **title** of the file is either the first heading in the prose, or the
-name of the source file.
-
- first = marked.lexer(sections[0].docsText)[0]
- hasTitle = first and first.type is 'heading' and first.depth is 1
- title = if hasTitle then first.text else path.basename source
-
- html = config.template {sources: config.sources, css: path.basename(config.css),
- title, hasTitle, sections, path, destination,}
-
- console.log "docco: #{source} -> #{destination source}"
- fs.writeFileSync destination(source), html
-
-
-Configuration
--------------
-
-Default configuration **options**. All of these may be extended by
-user-specified options.
-
- defaults =
- layout: 'parallel'
- output: 'docs'
- template: null
- css: null
- extension: null
- languages: {}
-
-**Configure** this particular run of Docco. We might use a passed-in external
-template, or one of the built-in **layouts**. We only attempt to process
-source files for languages for which we have definitions.
-
- configure = (options) ->
- config = _.extend {}, defaults, _.pick(options, _.keys(defaults)...)
-
- config.languages = buildMatchers config.languages
- if options.template
- config.layout = null
- else
- dir = config.layout = path.join __dirname, 'resources', config.layout
- config.public = path.join dir, 'public' if fs.existsSync path.join
dir, 'public'
- config.template = path.join dir, 'docco.jst'
- config.css = options.css or path.join dir, 'docco.css'
- config.template = _.template fs.readFileSync(config.template).toString()
-
- config.sources = options.args.filter((source) ->
- lang = getLanguage source, config
- console.warn "docco: skipped unknown type (#{path.basename source})"
unless lang
- lang
- ).sort()
-
- config
-
-
-Helpers & Initial Setup
------------------------
-
-Require our external dependencies.
-
- _ = require 'underscore'
- fs = require 'fs-extra'
- path = require 'path'
- marked = require 'marked'
- commander = require 'commander'
- highlightjs = require 'highlight.js'
-
-Enable nicer typography with marked.
-
- marked.setOptions smartypants: yes
-
-Languages are stored in JSON in the file `resources/languages.json`.
-Each item maps the file extension to the name of the language and the
-`symbol` that indicates a line comment. To add support for a new programming
-language to Docco, just add it to the file.
-
- languages = JSON.parse fs.readFileSync(path.join(__dirname, 'resources',
'languages.json'))
-
-Build out the appropriate matchers and delimiters for each language.
-
- buildMatchers = (languages) ->
- for ext, l of languages
-
-Does the line begin with a comment?
-
- l.commentMatcher = ///^\s*#{l.symbol}\s?///
-
-Ignore [
hashbangs](http://en.wikipedia.org/wiki/Shebang_%28Unix%29) and
interpolations...
-
- l.commentFilter = /(^#![/]|^\s*#\{)/
- languages
- languages = buildMatchers languages
-
-A function to get the current language we're documenting, based on the
-file extension. Detect and tag "literate" `.ext.md` variants.
-
- getLanguage = (source, config) ->
- ext = config.extension or path.extname(source) or path.basename(source)
- lang = config.languages[ext] or languages[ext]
- if lang and lang.name is 'markdown'
- codeExt = path.extname(path.basename(source, ext))
- if codeExt and codeLang = languages[codeExt]
- lang = _.extend {}, codeLang, {literate: yes}
- lang
-
-Keep it DRY. Extract the docco **version** from `package.json`
-
- version = JSON.parse(fs.readFileSync(path.join(__dirname,
'package.json'))).version
-
-
-Command Line Interface
-----------------------
-
-Finally, let's define the interface to run Docco from the command line.
-Parse options using [
Commander](https://github.com/visionmedia/commander.js).
-
- run = (args = process.argv) ->
- c = defaults
- commander.version(version)
- .usage('[options] files')
- .option('-L, --languages [file]', 'use a custom languages.json',
_.compose JSON.parse, fs.readFileSync)
- .option('-l, --layout [name]', 'choose a layout (parallel, linear
or classic)', c.layout)
- .option('-o, --output [path]', 'output to a given folder',
c.output)
- .option('-c, --css [file]', 'use a custom css file',
c.css)
- .option('-t, --template [file]', 'use a custom .jst template',
c.template)
- .option('-e, --extension [ext]', 'assume a file extension for all
inputs', c.extension)
- .parse(args)
- .name = "docco"
- if commander.args.length
- document commander
- else
- console.log commander.helpInformation()
-
-
-Public API
-----------
-
- Docco = module.exports = {run, document, parse, format, version}
diff --git a/docco.spec b/docco.spec
index 20da6ee..4e7e322 100644
--- a/docco.spec
+++ b/docco.spec
@@ -1,33 +1,15 @@
%{?nodejs_find_provides_and_requires}
-# NOTE TO SELF: do not update beyond 0.6.2 on fedora < 21 || rhel < 7
-
-%global docs %{_docdir}/%{name}-%{version}
-
-%if 0%{?fedora} >= 20
-%global docs %{_docdir}/%{name}
-%endif
-
-Name: docco
-Version: 0.6.3
-Release: 12%{?dist}
-Summary: The Quick and Dirty Literate Programming Documentation Generator
-License: MIT
-URL:
http://jashkenas.github.com/docco/
-Source0:
http://registry.npmjs.org/docco/-/docco-%{version}.tgz
-
-# These files are not included in the npm tarball but are needed for %%build.
-#
https://raw.githubusercontent.com/jashkenas/docco/b71e9924fb0ff27bf523774...
-Source1: %{name}-%{version}-Cakefile
-#
https://raw.githubusercontent.com/jashkenas/docco/b71e9924fb0ff27bf523774...
-Source2: %{name}-%{version}-docco.litcoffee
-
-BuildArch: noarch
-%if 0%{?fedora} >= 19
-ExclusiveArch: %{nodejs_arches} noarch
-%else
-ExclusiveArch: %{ix86} x86_64 %{arm} noarch
-%endif
+Name: docco
+Version: 0.6.3
+Release: 13%{?dist}
+Summary: The Quick and Dirty Literate Programming Documentation Generator
+
+License: MIT
+URL:
https://www.npmjs.com/package/docco
+Source0:
https://github.com/jashkenas/docco/archive/%{version}/%{name}-%{version}....
+BuildArch: noarch
+ExclusiveArch: %{nodejs_arches} noarch
BuildRequires: nodejs-packaging
BuildRequires: coffee-script
@@ -43,6 +25,7 @@ BuildRequires: python2-pygments
Requires: python2-pygments
+
%description
Docco is a quick-and-dirty documentation generator, written in Literate
CoffeeScript. It produces an HTML document that displays your comments
@@ -51,57 +34,44 @@ code is passed through Pygments syntax highlighting.
%prep
-%setup -q -n package
-cp -p %{SOURCE1} ./Cakefile
-cp -p %{SOURCE2} ./docco.litcoffee
+%autosetup -n docco-%{version}
+find . -type f -iname '*.eot' -delete
+find . -type f -iname '*.ttf' -delete
+find . -type f -iname '*.woff' -delete
%build
%nodejs_symlink_deps --check
-# Build docco.js
/usr/bin/cake build
-# Build the documentation.
./bin/docco --layout linear docco.litcoffee
-# Remove bundled web fonts.
-find . -type f -iname '*.eot' -delete
-find . -type f -iname '*.ttf' -delete
-find . -type f -iname '*.woff' -delete
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/docco
-cp -pr package.json docco.js \
- %{buildroot}%{nodejs_sitelib}/docco
+cp -pr package.json docco.js %{buildroot}%{nodejs_sitelib}/docco
mkdir -p %{buildroot}%{nodejs_sitelib}/docco/bin
-install -p -D -m0755 bin/docco \
- %{buildroot}%{nodejs_sitelib}/docco/bin/docco
+install -p -D -m0755 bin/docco %{buildroot}%{nodejs_sitelib}/docco/bin/docco
mkdir -p %{buildroot}%{_bindir}
-ln -sf %{nodejs_sitelib}/docco/bin/docco \
- %{buildroot}%{_bindir}/docco
-
+ln -sf %{nodejs_sitelib}/docco/bin/docco %{buildroot}%{_bindir}/docco
mkdir -p %{buildroot}%{_datadir}/docco
cp -pr resources/ %{buildroot}%{_datadir}/docco
-ln -sf %{_datadir}/docco/resources \
- %{buildroot}%{nodejs_sitelib}/docco/resources
-
-# The docs expect the resources/ directory to be present.
-mkdir -p %{buildroot}%{docs}
-ln -sf %{_datadir}/docco/resources \
- %{buildroot}%{docs}/resources
-
+ln -sf %{_datadir}/docco/resources %{buildroot}%{nodejs_sitelib}/docco/resources
+ln -sf %{_datadir}/docco/resources docs
%nodejs_symlink_deps
%files
-%doc LICENSE README docs/*
-%{?el6:%doc resources}
+%doc README docs/*
+%license LICENSE
%{nodejs_sitelib}/docco
%{_bindir}/docco
%{_datadir}/docco
-%{_docdir}/docco/resources
%changelog
+* Thu Oct 24 2019 Tom Hughes <tom(a)compton.nu> - 0.6.3-13
+- Modernise spec file
+
* Wed Jul 24 2019 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.6.3-12
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
diff --git a/sources b/sources
index 63fb354..a638073 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-e388786b8e64f100b6331dab45c7b60d docco-0.6.3.tgz
+SHA512 (docco-0.6.3.tar.gz) =
c3d74d2159499923a9071cf20818c314ab8d1e527204285e996eb9936227d43157ae37cda26309473cea6bcbf321eb169ce8e4b764f69807344269d54482465a