aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--debian/NEWS20
-rw-r--r--debian/README.source71
-rw-r--r--debian/changelog144
-rw-r--r--debian/compat1
-rw-r--r--debian/control86
-rw-r--r--debian/copyright216
-rw-r--r--debian/gbp.conf2
-rw-r--r--debian/missing-sources/html5.js301
-rw-r--r--debian/nikola.bash-completion1
-rw-r--r--debian/nikola.dirs2
-rw-r--r--debian/nikola.doc-base9
-rw-r--r--debian/nikola.docs1
-rw-r--r--debian/nikola.links65
-rw-r--r--debian/nikola.manpages1
-rwxr-xr-xdebian/nikola.sh4
-rw-r--r--debian/patches/0001-Add-install_bs3-command.patch209
-rw-r--r--debian/patches/series1
-rw-r--r--debian/pydist-overrides1
-rwxr-xr-xdebian/rules64
-rw-r--r--debian/source/format1
-rw-r--r--debian/watch3
21 files changed, 1203 insertions, 0 deletions
diff --git a/debian/NEWS b/debian/NEWS
new file mode 100644
index 0000000..4261c20
--- /dev/null
+++ b/debian/NEWS
@@ -0,0 +1,20 @@
+nikola (5.2-1) unstable; urgency=low
+
+ The license has changed from GPL-3 to MIT. From 5.1 version, nikola is
+ released under MIT license.
+
+ -- Agustin Henze <tin@sluc.org.ar> Wed, 13 Feb 2013 18:58:12 -0300
+
+nikola (5-1) unstable; urgency=low
+
+ This version is not completely backwards compatible, thus the new major
+ version number, but switching to it should be easy-ish. If you are using
+ version 4.0.3:
+ - Remove your dodo.py
+ - Use nikola build instead of doit from now on
+ - Use nikola serve instead of doit serve, nikola new_post instead of doit
+ new_post, and so on. Some other doit task are also converted into nikola
+ command you can get the list using nikola help.
+
+
+ -- Agustin Henze <tin@sluc.org.ar> Wed, 12 Dec 2012 20:39:20 -0300
diff --git a/debian/README.source b/debian/README.source
new file mode 100644
index 0000000..4953fab
--- /dev/null
+++ b/debian/README.source
@@ -0,0 +1,71 @@
+Repackaging upstream source
+===========================
+
+nikola's original upstream source has been repackage to exclude DFSG-compliant
+components (minified JavaScript and Stylesheets) from it:
+
+$ diff -ruN nikola-5.4.4.upstream/ nikola-5.4.4~dfsg | diffstat
+ default/assets/css/bootstrap-responsive.min.css | 9
+ default/assets/css/bootstrap.min.css | 9
+ default/assets/js/bootstrap.min.js | 6
+ default/assets/js/jquery-1.7.2.min.js | 4
+ default/assets/js/jquery.colorbox-min.js | 4
+ site-reveal/README | 32
+ site-reveal/assets/css/custom_reveal.css | 40
+ site-reveal/assets/css/theme.css | 74
+ site-reveal/assets/reveal/LICENSE | 19
+ site-reveal/assets/reveal/README.md | 405 --
+ site-reveal/assets/reveal/css/print/paper.css | 176
+ site-reveal/assets/reveal/css/print/pdf.css | 159
+ site-reveal/assets/reveal/css/reveal.css | 1260 ------
+ site-reveal/assets/reveal/css/reveal.min.css | 7
+ site-reveal/assets/reveal/css/theme/README.md | 25
+ site-reveal/assets/reveal/css/theme/beige.css | 163
+ site-reveal/assets/reveal/css/theme/default.css | 163
+ site-reveal/assets/reveal/css/theme/night.css | 150
+ site-reveal/assets/reveal/css/theme/serif.css | 150
+ site-reveal/assets/reveal/css/theme/simple.css | 152
+ site-reveal/assets/reveal/css/theme/sky.css | 156
+ site-reveal/assets/reveal/css/theme/source/beige.scss | 50
+ site-reveal/assets/reveal/css/theme/source/default.scss | 42
+ site-reveal/assets/reveal/css/theme/source/night.scss | 35
+ site-reveal/assets/reveal/css/theme/source/serif.scss | 33
+ site-reveal/assets/reveal/css/theme/source/simple.scss | 38
+ site-reveal/assets/reveal/css/theme/source/sky.scss | 41
+ site-reveal/assets/reveal/css/theme/template/mixins.scss | 29
+ site-reveal/assets/reveal/css/theme/template/settings.scss | 33
+ site-reveal/assets/reveal/css/theme/template/theme.scss | 163
+ site-reveal/assets/reveal/grunt.js | 84
+ site-reveal/assets/reveal/js/reveal.js | 1903 ----------
+ site-reveal/assets/reveal/js/reveal.min.js | 8
+ site-reveal/assets/reveal/lib/css/zenburn.css | 115
+ site-reveal/assets/reveal/lib/font/league_gothic-webfont.eot |binary
+ site-reveal/assets/reveal/lib/font/league_gothic-webfont.svg | 230 -
+ site-reveal/assets/reveal/lib/font/league_gothic-webfont.ttf |binary
+ site-reveal/assets/reveal/lib/font/league_gothic-webfont.woff |binary
+ site-reveal/assets/reveal/lib/font/league_gothic_license | 2
+ site-reveal/assets/reveal/lib/js/classList.js | 2
+ site-reveal/assets/reveal/lib/js/head.min.js | 8
+ site-reveal/assets/reveal/lib/js/html5shiv.js | 7
+ site-reveal/assets/reveal/package.json | 31
+ site-reveal/assets/reveal/plugin/highlight/highlight.js | 9
+ site-reveal/assets/reveal/plugin/markdown/markdown.js | 37
+ site-reveal/assets/reveal/plugin/markdown/showdown.js | 62
+ site-reveal/assets/reveal/plugin/notes-server/client.js | 57
+ site-reveal/assets/reveal/plugin/notes-server/index.js | 58
+ site-reveal/assets/reveal/plugin/notes/notes.js | 100
+ site-reveal/assets/reveal/plugin/postmessage/postmessage.js | 42
+ site-reveal/assets/reveal/plugin/print-pdf/print-pdf.js | 39
+ site-reveal/assets/reveal/plugin/remotes/remotes.js | 30
+ site-reveal/assets/reveal/plugin/zoom-js/zoom.js | 256 -
+ site-reveal/engine | 1
+ site-reveal/parent | 1
+ site-reveal/templates/base.tmpl | 77
+ site-reveal/templates/base_helper.tmpl | 145
+ site-reveal/templates/index.tmpl | 32
+ site-reveal/templates/index_helper.tmpl | 21
+ site-reveal/templates/post.tmpl | 45
+ site-reveal/templates/post_helper.tmpl | 73
+ 61 files changed, 7102 deletions(-)
+
+ -- Agustin Henze <tin@sluc.org.ar> Thu, 30 May 2013 18:12:04 -0300
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..9c8088f
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,144 @@
+nikola (7.0.1-4) unstable; urgency=medium
+
+ * Add missing build dependency on python-dateutil
+
+ -- Agustin Henze <tin@debian.org> Fri, 08 Aug 2014 08:06:18 -0300
+
+nikola (7.0.1-3) unstable; urgency=medium
+
+ * Remove depends on obsolete python-support
+ * Remove echo sentence from nikola.sh (Closes: #757352)
+
+ -- Agustin Henze <tin@debian.org> Thu, 07 Aug 2014 10:47:12 -0300
+
+nikola (7.0.1-2) unstable; urgency=medium
+
+ * Add nikola.sh (nikola runner to create sh_completion files) (Closes:
+ #752954)
+
+ -- Agustin Henze <tin@debian.org> Wed, 06 Aug 2014 19:10:19 -0300
+
+nikola (7.0.1-1) unstable; urgency=medium
+
+ * Imported Upstream version 7.0.1
+ * Update patch to add install_bs3 command
+ * Add patch to replace natsort python module by naturalsort
+ * Add html5shiv.js to debian/missing-sources
+ * Update debian/copyright file
+ * Remove depends on python-tz and add depends on python-naturalsort
+ * Update debian/rules
+
+ -- Agustin Henze <tin@debian.org> Mon, 16 Jun 2014 15:28:28 -0300
+
+nikola (6.4.0-1) unstable; urgency=medium
+
+ * New upstream release version 6.4.0
+ * Update patch of the custom debian install_bs3 command
+
+ -- Agustin Henze <tin@debian.org> Sun, 09 Mar 2014 03:22:30 +0100
+
+nikola (6.3.0-1) unstable; urgency=medium
+
+ * New upstream release version 6.3.0
+ * Add the awesome patch by Chris "kwpolska" Warrick (add install_bs3
+ command) (Closes: #734613)
+ * Add bash and zsh completion
+ * Use pybuild as buildsystem
+
+ -- Agustin Henze <tin@debian.org> Fri, 28 Feb 2014 11:33:42 -0300
+
+nikola (6.2.1-1) unstable; urgency=low
+
+ * Imported Upstream version 6.2.1 (Closes: #722177)
+ * Updating debian/watch file to the new url of the project
+ * Add get-orig-source target
+ * Change the default theme bootstrap3 by bootstrap
+ * Update dependencies, recommendations and suggestions
+
+ -- Agustin Henze <tin@debian.org> Mon, 18 Nov 2013 19:26:32 -0300
+
+nikola (5.4.4-1) unstable; urgency=low
+
+ [ Agustin Henze ]
+ * Imported Upstream version 5.4.4
+ * debian/copyright:
+ - Converted to machine readable.
+ - Update copyrights.
+ * debian/rules:
+ - Fix wrong permission files
+ - Remove a copy of MIT License
+ - Remove the command that deletes a file that is no longer part of the
+ project.
+ * Update debian/README.source file with the new file differences.
+
+ [ Dererk ]
+ * Recommend py-requests for install_theme feature (Closes: #706658).
+
+ -- Agustin Henze <tin@sluc.org.ar> Fri, 31 May 2013 20:50:03 -0300
+
+nikola (5.4.2-1) unstable; urgency=low
+
+ * Imported Upstream version 5.4.2
+ * Removed unused manuals under debian folder
+ * Updated README.source file with details about the files deleted for make
+ the package dfsg compliant
+ * Fixed lintian warning about non-canonical vcs field
+
+ -- Agustin Henze <tin@sluc.org.ar> Wed, 13 Mar 2013 21:31:44 -0300
+
+nikola (5.3-1) unstable; urgency=low
+
+ * Imported Upstream version 5.3
+ * Updated debian/rules:
+ - Removed the copy of the custom.css file, fixed in upstream.
+
+ -- Agustin Henze <tin@sluc.org.ar> Wed, 27 Feb 2013 17:11:04 -0300
+
+nikola (5.2-1) unstable; urgency=low
+
+ * Imported Upstream version 5.2 (Closes: #696358, #699910).
+ * Bump Standards-Version to 3.9.4 (no changes required).
+ * Added libjs-jquery-slides dependency.
+ - Removed slides.jquery.js file of the upstream installation.
+ * Updated copyright file:
+ - The license of nikola has changed from GPL-3 to MIT.
+ - Added license of slides.jquery.js file.
+ * Fixed assets symlinks on debian/nikola.links.
+ * Updated debian/rules:
+ - Deleted the remove sentence of PyRSS2Gen, fixed in upstream.
+ - Copy custom.css into the right place, it'll be reported to upstream.
+ - Added conversion from rst to html of the docs/creating-a-theme.txt file.
+ * Created debian/pydist-overrides: pillow overridden by python-imaging.
+ * Added Vcs-git and Vcs-browser to debian/control file.
+
+ -- Agustin Henze <tin@sluc.org.ar> Wed, 13 Feb 2013 18:42:55 -0300
+
+nikola (5-1) unstable; urgency=low
+
+ * New upstream release, adds new features and fixes several bugs:
+ Features:
+ - Templates now know their name from template_name in their context.
+ - Made most of Nikola into Yapsy plugins.
+ - Recurse galleries/ and render each folder as a gallery.
+ - Breadcrumbs and folder links in image galleries.
+ Bugfixes:
+ - Fixed doc installation
+ - Put webassets cache in cache/webassets
+ - Don't crash on incomplete translations
+ - Fixed Issue 160: render_tags didn't call scan_posts()
+ - Fixed Issue 161: webassets setting USE_BUNDLES was ignored
+ - Fixed Issue 153: index.txt was being ignored in galleries.
+
+ -- Agustin Henze <tin@sluc.org.ar> Wed, 12 Dec 2012 20:33:41 -0300
+
+nikola (4.0.3-2) unstable; urgency=low
+
+ * Fix broken symlinks not being included on the repkg source.
+
+ -- Agustin Henze <tin@sluc.org.ar> Mon, 19 Nov 2012 20:34:44 -0300
+
+nikola (4.0.3-1) unstable; urgency=low
+
+ * Initial release (Closes: #690159).
+
+ -- Agustin Henze <tin@sluc.org.ar> Wed, 09 Oct 2012 18:10:41 -0300
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..351e64a
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,86 @@
+Source: nikola
+Section: python
+Priority: optional
+Maintainer: Agustin Henze <tin@debian.org>
+Uploaders: Ulises Vitulli <dererk@debian.org>
+Build-Depends:
+ debhelper (>= 9),
+ dh-python,
+ bash-completion,
+ python-all,
+ python-setuptools,
+ python-docutils,
+ python-blinker,
+ python-lxml,
+ python-yapsy,
+ python-logbook,
+ python-doit,
+ python-unidecode,
+ python-pyrss2gen,
+ python-mako,
+ python-pygments,
+ python-imaging,
+ python-natsort,
+ python-dateutil,
+Standards-Version: 3.9.5
+X-Python-Version: >= 2.7
+Homepage: http://getnikola.com/
+Vcs-Git: git://anonscm.debian.org/collab-maint/nikola.git
+Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/nikola.git
+
+Package: nikola
+Architecture: all
+Depends:
+ ${python:Depends},
+ ${misc:Depends},
+ python-doit,
+ python-pygments,
+ python-imaging,
+ python-docutils,
+ python-mako,
+ python-unidecode,
+ python-lxml,
+ python-yapsy,
+ python-pyrss2gen,
+ libjs-jquery,
+ libjs-jquery-colorbox,
+ libjs-twitter-bootstrap,
+ libjs-imagesloaded,
+Recommends:
+ python-webassets,
+ python-requests,
+ python-typogrify,
+ python-livereload,
+Suggests:
+ python-jinja2,
+ python-feedparser,
+ ipython,
+ bpython,
+ python-markdown,
+ python-misaka,
+ pandoc,
+ python-textile,
+ python-creoleparser,
+ txt2tags,
+ node-less,
+Description: simple yet powerful and flexible static website and blog generator
+ Nikola is a static site and blog generator. Feed information to it on one
+ side and get a ready-to-deploy website on the other.
+ .
+ Nikola goodies on generating static pages are, between others, that:
+ * Static websites are safer, no database nor dynamic code interpreter needed
+ * They use fewer resources
+ * You avoid vendor and platform lockin.
+ .
+ Between some of Nikola's features you may find:
+ * Blog generator, including tags, feeds, archives, comments, etc.
+ * Theme support
+ * Fast building process, thanks to doit
+ * Easy Image Gallery, just drop files in a folder!
+ * reStructuredText or Markdown as Input languages
+ * Flexible design
+ * Small codebase.
+ * Syntax highlighting for almost any programming language or markup
+ * Multi-language sites
+ * Small, since based on leverages existing tools
+ * Between others
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..f719cf0
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,216 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: Nikola
+Upstream-Contact: Roberto Alsina <ralsina@kde.org>
+Source: https://github.com/getnikola/nikola
+
+Files: *
+Copyright: (c) 2012-2013 Roberto Alsina y otros.
+License: MIT/X11
+
+Files: nikola/rc4.py
+Copyright: (C) 2012 Bo Zhu http://about.bozhu.me
+License: MIT/X11
+
+Files: nikola/plugins/compile/misaka.py
+Copyright: (c) 2013 Chris Lee
+License: MIT/X11
+
+Files: nikola/plugins/compile/markdown/mdx_podcast.py
+Copyright: (c) 2013 Michael Rabbitt, Roberto Alsina
+License: MIT/X11
+
+Files: nikola/plugins/compile_markdown/mdx_gist.py
+Copyright: (c) 2013 Michael Rabbitt
+License: MIT/X11
+
+Files: nikola/plugins/compile/ipynb*
+Copyright: (c) 2013 Damian Avila
+License: MIT/X11
+
+Files: nikola/plugins/task_localsearch/files/*
+Copyright: (c) 2013 Tipue
+License: MIT/X11
+
+Files: bower_components/bootstrap/*
+Copyright: (c) 2011-2014 Twitter, Inc
+License: MIT/X11
+
+Files: bower_components/jquery/*
+Copyright: 2005, 2014 jQuery Foundation, Inc. and other contributors
+License: MIT/X11
+
+Files: bower_components/jquery-colorbox/*
+Copyright: 2014 Jack Moore
+License: MIT/X11
+
+Files: nikola/data/themes/base/assets/js/html5.js
+Copyright: @afarkas @jdalton @jon_neal @rem
+License: MIT/X11
+
+Files: nikola/packages/tzlocal/*
+Copyright: Public domain (CC0)
+License: CC0
+
+Files: debian/*
+Copyright: (C) 2012-2013 Agustin Henze <tin@debian.org>
+License: GPL-3
+
+License: GPL-3
+ This package is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+ .
+ This package is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this package; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ .
+ On Debian systems, the complete text of the GNU General
+ Public License can be found in `/usr/share/common-licenses/GPL-3'.
+
+License: MIT/X11
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
+ this software and associated documentation files (the "Software"), to deal in
+ the Software without restriction, including without limitation the rights to
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+ of the Software, and to permit persons to whom the Software is furnished to do
+ so, subject to the following conditions:
+ .
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE.
+
+License: CC0
+ Creative Commons Legal Code
+ .
+ CC0 1.0 Universal
+ .
+ CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
+ LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
+ ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
+ INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
+ REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
+ PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
+ THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
+ HEREUNDER.
+ .
+ Statement of Purpose
+ .
+ The laws of most jurisdictions throughout the world automatically confer
+ exclusive Copyright and Related Rights (defined below) upon the creator
+ and subsequent owner(s) (each and all, an "owner") of an original work of
+ authorship and/or a database (each, a "Work").
+ .
+ Certain owners wish to permanently relinquish those rights to a Work for
+ the purpose of contributing to a commons of creative, cultural and
+ scientific works ("Commons") that the public can reliably and without fear
+ of later claims of infringement build upon, modify, incorporate in other
+ works, reuse and redistribute as freely as possible in any form whatsoever
+ and for any purposes, including without limitation commercial purposes.
+ These owners may contribute to the Commons to promote the ideal of a free
+ culture and the further production of creative, cultural and scientific
+ works, or to gain reputation or greater distribution for their Work in
+ part through the use and efforts of others.
+ .
+ For these and/or other purposes and motivations, and without any
+ expectation of additional consideration or compensation, the person
+ associating CC0 with a Work (the "Affirmer"), to the extent that he or she
+ is an owner of Copyright and Related Rights in the Work, voluntarily
+ elects to apply CC0 to the Work and publicly distribute the Work under its
+ terms, with knowledge of his or her Copyright and Related Rights in the
+ Work and the meaning and intended legal effect of CC0 on those rights.
+ .
+ 1. Copyright and Related Rights. A Work made available under CC0 may be
+ protected by copyright and related or neighboring rights ("Copyright and
+ Related Rights"). Copyright and Related Rights include, but are not
+ limited to, the following:
+ .
+ i. the right to reproduce, adapt, distribute, perform, display,
+ communicate, and translate a Work;
+ ii. moral rights retained by the original author(s) and/or performer(s);
+ iii. publicity and privacy rights pertaining to a person's image or
+ likeness depicted in a Work;
+ iv. rights protecting against unfair competition in regards to a Work,
+ subject to the limitations in paragraph 4(a), below;
+ v. rights protecting the extraction, dissemination, use and reuse of data
+ in a Work;
+ vi. database rights (such as those arising under Directive 96/9/EC of the
+ European Parliament and of the Council of 11 March 1996 on the legal
+ protection of databases, and under any national implementation
+ thereof, including any amended or successor version of such
+ directive); and
+ vii. other similar, equivalent or corresponding rights throughout the
+ world based on applicable law or treaty, and any national
+ implementations thereof.
+ .
+ 2. Waiver. To the greatest extent permitted by, but not in contravention
+ of, applicable law, Affirmer hereby overtly, fully, permanently,
+ irrevocably and unconditionally waives, abandons, and surrenders all of
+ Affirmer's Copyright and Related Rights and associated claims and causes
+ of action, whether now known or unknown (including existing as well as
+ future claims and causes of action), in the Work (i) in all territories
+ worldwide, (ii) for the maximum duration provided by applicable law or
+ treaty (including future time extensions), (iii) in any current or future
+ medium and for any number of copies, and (iv) for any purpose whatsoever,
+ including without limitation commercial, advertising or promotional
+ purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
+ member of the public at large and to the detriment of Affirmer's heirs and
+ successors, fully intending that such Waiver shall not be subject to
+ revocation, rescission, cancellation, termination, or any other legal or
+ equitable action to disrupt the quiet enjoyment of the Work by the public
+ as contemplated by Affirmer's express Statement of Purpose.
+ .
+ 3. Public License Fallback. Should any part of the Waiver for any reason
+ be judged legally invalid or ineffective under applicable law, then the
+ Waiver shall be preserved to the maximum extent permitted taking into
+ account Affirmer's express Statement of Purpose. In addition, to the
+ extent the Waiver is so judged Affirmer hereby grants to each affected
+ person a royalty-free, non transferable, non sublicensable, non exclusive,
+ irrevocable and unconditional license to exercise Affirmer's Copyright and
+ Related Rights in the Work (i) in all territories worldwide, (ii) for the
+ maximum duration provided by applicable law or treaty (including future
+ time extensions), (iii) in any current or future medium and for any number
+ of copies, and (iv) for any purpose whatsoever, including without
+ limitation commercial, advertising or promotional purposes (the
+ "License"). The License shall be deemed effective as of the date CC0 was
+ applied by Affirmer to the Work. Should any part of the License for any
+ reason be judged legally invalid or ineffective under applicable law, such
+ partial invalidity or ineffectiveness shall not invalidate the remainder
+ of the License, and in such case Affirmer hereby affirms that he or she
+ will not (i) exercise any of his or her remaining Copyright and Related
+ Rights in the Work or (ii) assert any associated claims and causes of
+ action with respect to the Work, in either case contrary to Affirmer's
+ express Statement of Purpose.
+ .
+ 4. Limitations and Disclaimers.
+ .
+ a. No trademark or patent rights held by Affirmer are waived, abandoned,
+ surrendered, licensed or otherwise affected by this document.
+ b. Affirmer offers the Work as-is and makes no representations or
+ warranties of any kind concerning the Work, express, implied,
+ statutory or otherwise, including without limitation warranties of
+ title, merchantability, fitness for a particular purpose, non
+ infringement, or the absence of latent or other defects, accuracy, or
+ the present or absence of errors, whether or not discoverable, all to
+ the greatest extent permissible under applicable law.
+ c. Affirmer disclaims responsibility for clearing rights of other persons
+ that may apply to the Work or any use thereof, including without
+ limitation any person's Copyright and Related Rights in the Work.
+ Further, Affirmer disclaims responsibility for obtaining any necessary
+ consents, permissions or other rights required for any use of the
+ Work.
+ d. Affirmer understands and acknowledges that Creative Commons is not a
+ party to this document and has no duty or obligation with respect to
+ this CC0 or use of the Work.
diff --git a/debian/gbp.conf b/debian/gbp.conf
new file mode 100644
index 0000000..cec628c
--- /dev/null
+++ b/debian/gbp.conf
@@ -0,0 +1,2 @@
+[DEFAULT]
+pristine-tar = True
diff --git a/debian/missing-sources/html5.js b/debian/missing-sources/html5.js
new file mode 100644
index 0000000..d074da7
--- /dev/null
+++ b/debian/missing-sources/html5.js
@@ -0,0 +1,301 @@
+/**
+* @preserve HTML5 Shiv v3.7.0 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
+*/
+;(function(window, document) {
+/*jshint evil:true */
+ /** version */
+ var version = '3.7.0';
+
+ /** Preset options */
+ var options = window.html5 || {};
+
+ /** Used to skip problem elements */
+ var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;
+
+ /** Not all elements can be cloned in IE **/
+ var saveClones = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i;
+
+ /** Detect whether the browser supports default html5 styles */
+ var supportsHtml5Styles;
+
+ /** Name of the expando, to work with multiple documents or to re-shiv one document */
+ var expando = '_html5shiv';
+
+ /** The id for the the documents expando */
+ var expanID = 0;
+
+ /** Cached data for each document */
+ var expandoData = {};
+
+ /** Detect whether the browser supports unknown elements */
+ var supportsUnknownElements;
+
+ (function() {
+ try {
+ var a = document.createElement('a');
+ a.innerHTML = '<xyz></xyz>';
+ //if the hidden property is implemented we can assume, that the browser supports basic HTML5 Styles
+ supportsHtml5Styles = ('hidden' in a);
+
+ supportsUnknownElements = a.childNodes.length == 1 || (function() {
+ // assign a false positive if unable to shiv
+ (document.createElement)('a');
+ var frag = document.createDocumentFragment();
+ return (
+ typeof frag.cloneNode == 'undefined' ||
+ typeof frag.createDocumentFragment == 'undefined' ||
+ typeof frag.createElement == 'undefined'
+ );
+ }());
+ } catch(e) {
+ // assign a false positive if detection fails => unable to shiv
+ supportsHtml5Styles = true;
+ supportsUnknownElements = true;
+ }
+
+ }());
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * Creates a style sheet with the given CSS text and adds it to the document.
+ * @private
+ * @param {Document} ownerDocument The document.
+ * @param {String} cssText The CSS text.
+ * @returns {StyleSheet} The style element.
+ */
+ function addStyleSheet(ownerDocument, cssText) {
+ var p = ownerDocument.createElement('p'),
+ parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement;
+
+ p.innerHTML = 'x<style>' + cssText + '</style>';
+ return parent.insertBefore(p.lastChild, parent.firstChild);
+ }
+
+ /**
+ * Returns the value of `html5.elements` as an array.
+ * @private
+ * @returns {Array} An array of shived element node names.
+ */
+ function getElements() {
+ var elements = html5.elements;
+ return typeof elements == 'string' ? elements.split(' ') : elements;
+ }
+
+ /**
+ * Returns the data associated to the given document
+ * @private
+ * @param {Document} ownerDocument The document.
+ * @returns {Object} An object of data.
+ */
+ function getExpandoData(ownerDocument) {
+ var data = expandoData[ownerDocument[expando]];
+ if (!data) {
+ data = {};
+ expanID++;
+ ownerDocument[expando] = expanID;
+ expandoData[expanID] = data;
+ }
+ return data;
+ }
+
+ /**
+ * returns a shived element for the given nodeName and document
+ * @memberOf html5
+ * @param {String} nodeName name of the element
+ * @param {Document} ownerDocument The context document.
+ * @returns {Object} The shived element.
+ */
+ function createElement(nodeName, ownerDocument, data){
+ if (!ownerDocument) {
+ ownerDocument = document;
+ }
+ if(supportsUnknownElements){
+ return ownerDocument.createElement(nodeName);
+ }
+ if (!data) {
+ data = getExpandoData(ownerDocument);
+ }
+ var node;
+
+ if (data.cache[nodeName]) {
+ node = data.cache[nodeName].cloneNode();
+ } else if (saveClones.test(nodeName)) {
+ node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode();
+ } else {
+ node = data.createElem(nodeName);
+ }
+
+ // Avoid adding some elements to fragments in IE < 9 because
+ // * Attributes like `name` or `type` cannot be set/changed once an element
+ // is inserted into a document/fragment
+ // * Link elements with `src` attributes that are inaccessible, as with
+ // a 403 response, will cause the tab/window to crash
+ // * Script elements appended to fragments will execute when their `src`
+ // or `text` property is set
+ return node.canHaveChildren && !reSkip.test(nodeName) ? data.frag.appendChild(node) : node;
+ }
+
+ /**
+ * returns a shived DocumentFragment for the given document
+ * @memberOf html5
+ * @param {Document} ownerDocument The context document.
+ * @returns {Object} The shived DocumentFragment.
+ */
+ function createDocumentFragment(ownerDocument, data){
+ if (!ownerDocument) {
+ ownerDocument = document;
+ }
+ if(supportsUnknownElements){
+ return ownerDocument.createDocumentFragment();
+ }
+ data = data || getExpandoData(ownerDocument);
+ var clone = data.frag.cloneNode(),
+ i = 0,
+ elems = getElements(),
+ l = elems.length;
+ for(;i<l;i++){
+ clone.createElement(elems[i]);
+ }
+ return clone;
+ }
+
+ /**
+ * Shivs the `createElement` and `createDocumentFragment` methods of the document.
+ * @private
+ * @param {Document|DocumentFragment} ownerDocument The document.
+ * @param {Object} data of the document.
+ */
+ function shivMethods(ownerDocument, data) {
+ if (!data.cache) {
+ data.cache = {};
+ data.createElem = ownerDocument.createElement;
+ data.createFrag = ownerDocument.createDocumentFragment;
+ data.frag = data.createFrag();
+ }
+
+
+ ownerDocument.createElement = function(nodeName) {
+ //abort shiv
+ if (!html5.shivMethods) {
+ return data.createElem(nodeName);
+ }
+ return createElement(nodeName, ownerDocument, data);
+ };
+
+ ownerDocument.createDocumentFragment = Function('h,f', 'return function(){' +
+ 'var n=f.cloneNode(),c=n.createElement;' +
+ 'h.shivMethods&&(' +
+ // unroll the `createElement` calls
+ getElements().join().replace(/[\w\-]+/g, function(nodeName) {
+ data.createElem(nodeName);
+ data.frag.createElement(nodeName);
+ return 'c("' + nodeName + '")';
+ }) +
+ ');return n}'
+ )(html5, data.frag);
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * Shivs the given document.
+ * @memberOf html5
+ * @param {Document} ownerDocument The document to shiv.
+ * @returns {Document} The shived document.
+ */
+ function shivDocument(ownerDocument) {
+ if (!ownerDocument) {
+ ownerDocument = document;
+ }
+ var data = getExpandoData(ownerDocument);
+
+ if (html5.shivCSS && !supportsHtml5Styles && !data.hasCSS) {
+ data.hasCSS = !!addStyleSheet(ownerDocument,
+ // corrects block display not defined in IE6/7/8/9
+ 'article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}' +
+ // adds styling not present in IE6/7/8/9
+ 'mark{background:#FF0;color:#000}' +
+ // hides non-rendered elements
+ 'template{display:none}'
+ );
+ }
+ if (!supportsUnknownElements) {
+ shivMethods(ownerDocument, data);
+ }
+ return ownerDocument;
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ /**
+ * The `html5` object is exposed so that more elements can be shived and
+ * existing shiving can be detected on iframes.
+ * @type Object
+ * @example
+ *
+ * // options can be changed before the script is included
+ * html5 = { 'elements': 'mark section', 'shivCSS': false, 'shivMethods': false };
+ */
+ var html5 = {
+
+ /**
+ * An array or space separated string of node names of the elements to shiv.
+ * @memberOf html5
+ * @type Array|String
+ */
+ 'elements': options.elements || 'abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video',
+
+ /**
+ * current version of html5shiv
+ */
+ 'version': version,
+
+ /**
+ * A flag to indicate that the HTML5 style sheet should be inserted.
+ * @memberOf html5
+ * @type Boolean
+ */
+ 'shivCSS': (options.shivCSS !== false),
+
+ /**
+ * Is equal to true if a browser supports creating unknown/HTML5 elements
+ * @memberOf html5
+ * @type boolean
+ */
+ 'supportsUnknownElements': supportsUnknownElements,
+
+ /**
+ * A flag to indicate that the document's `createElement` and `createDocumentFragment`
+ * methods should be overwritten.
+ * @memberOf html5
+ * @type Boolean
+ */
+ 'shivMethods': (options.shivMethods !== false),
+
+ /**
+ * A string to describe the type of `html5` object ("default" or "default print").
+ * @memberOf html5
+ * @type String
+ */
+ 'type': 'default',
+
+ // shivs the document according to the specified `html5` object options
+ 'shivDocument': shivDocument,
+
+ //creates a shived element
+ createElement: createElement,
+
+ //creates a shived documentFragment
+ createDocumentFragment: createDocumentFragment
+ };
+
+ /*--------------------------------------------------------------------------*/
+
+ // expose html5
+ window.html5 = html5;
+
+ // shiv the document
+ shivDocument(document);
+
+}(this, document));
diff --git a/debian/nikola.bash-completion b/debian/nikola.bash-completion
new file mode 100644
index 0000000..6c9035b
--- /dev/null
+++ b/debian/nikola.bash-completion
@@ -0,0 +1 @@
+_nikola_bash nikola
diff --git a/debian/nikola.dirs b/debian/nikola.dirs
new file mode 100644
index 0000000..1cda6fd
--- /dev/null
+++ b/debian/nikola.dirs
@@ -0,0 +1,2 @@
+/usr/share/doc/nikola
+/usr/share/zsh/functions/Completion/Linux
diff --git a/debian/nikola.doc-base b/debian/nikola.doc-base
new file mode 100644
index 0000000..b5a9992
--- /dev/null
+++ b/debian/nikola.doc-base
@@ -0,0 +1,9 @@
+Document: nikola-reference-manual
+Title: Nikola User Manual
+Author: Roberto Alsina
+Abstract: Static Site and Blog Generator
+Section: Programming/Python
+
+Format: HTML
+Index: /usr/share/doc/nikola/manual.html
+Files: /usr/share/doc/nikola/*.html
diff --git a/debian/nikola.docs b/debian/nikola.docs
new file mode 100644
index 0000000..a1320b1
--- /dev/null
+++ b/debian/nikola.docs
@@ -0,0 +1 @@
+README.rst
diff --git a/debian/nikola.links b/debian/nikola.links
new file mode 100644
index 0000000..9ab3302
--- /dev/null
+++ b/debian/nikola.links
@@ -0,0 +1,65 @@
+/usr/share/javascript/jquery-colorbox/jquery.colorbox-min.js
+usr/share/pyshared/nikola/data/themes/bootstrap/assets/js/jquery.colorbox-min.js
+
+/usr/share/pyshared/nikola/data/themes/bootstrap/assets/js/jquery.colorbox-min.js
+usr/lib/python2.7/dist-packages/nikola/data/themes/bootstrap/assets/js/jquery.colorbox-min.js
+
+/usr/share/javascript/jquery/jquery.min.js
+usr/share/pyshared/nikola/data/themes/bootstrap/assets/js/jquery.min.js
+
+/usr/share/pyshared/nikola/data/themes/bootstrap/assets/js/jquery.min.js
+usr/lib/python2.7/dist-packages/nikola/data/themes/bootstrap/assets/js/jquery.min.js
+
+/usr/share/twitter-bootstrap/files/js/bootstrap.js
+usr/share/pyshared/nikola/data/themes/bootstrap/assets/js/bootstrap.js
+
+/usr/share/pyshared/nikola/data/themes/bootstrap/assets/js/bootstrap.js
+usr/lib/python2.7/dist-packages/nikola/data/themes/bootstrap/assets/js/bootstrap.js
+
+/usr/share/twitter-bootstrap/files/js/bootstrap.min.js
+usr/share/pyshared/nikola/data/themes/bootstrap/assets/js/bootstrap.min.js
+
+/usr/share/pyshared/nikola/data/themes/bootstrap/assets/js/bootstrap.min.js
+usr/lib/python2.7/dist-packages/nikola/data/themes/bootstrap/assets/js/bootstrap.min.js
+
+/usr/share/javascript/imagesloaded/imagesloaded.pkgd.min.js
+usr/share/pyshared/nikola/data/themes/bootstrap/assets/js/imagesloaded.pkgd.min.js
+
+/usr/share/pyshared/nikola/data/themes/bootstrap/assets/js/imagesloaded.pkgd.min.js
+usr/lib/python2.7/dist-packages/nikola/data/themes/bootstrap/assets/js/imagesloaded.pkgd.min.js
+
+/usr/share/twitter-bootstrap/files/css/bootstrap-responsive.css
+usr/share/pyshared/nikola/data/themes/bootstrap/assets/css/bootstrap-responsive.css
+
+/usr/share/pyshared/nikola/data/themes/bootstrap/assets/css/bootstrap-responsive.css
+usr/lib/python2.7/dist-packages/nikola/data/themes/bootstrap/assets/css/bootstrap-responsive.css
+
+/usr/share/twitter-bootstrap/files/css/bootstrap-responsive.min.css
+usr/share/pyshared/nikola/data/themes/bootstrap/assets/css/bootstrap-responsive.min.css
+
+/usr/share/pyshared/nikola/data/themes/bootstrap/assets/css/bootstrap-responsive.min.css
+usr/lib/python2.7/dist-packages/nikola/data/themes/bootstrap/assets/css/bootstrap-responsive.min.css
+
+/usr/share/twitter-bootstrap/files/css/bootstrap.css
+usr/share/pyshared/nikola/data/themes/bootstrap/assets/css/bootstrap.css
+
+/usr/share/pyshared/nikola/data/themes/bootstrap/assets/css/bootstrap.css
+usr/lib/python2.7/dist-packages/nikola/data/themes/bootstrap/assets/css/bootstrap.css
+
+/usr/share/twitter-bootstrap/files/css/bootstrap.min.css
+usr/share/pyshared/nikola/data/themes/bootstrap/assets/css/bootstrap.min.css
+
+/usr/share/pyshared/nikola/data/themes/bootstrap/assets/css/bootstrap.min.css
+usr/lib/python2.7/dist-packages/nikola/data/themes/bootstrap/assets/css/bootstrap.min.css
+
+/usr/share/twitter-bootstrap/files/img/glyphicons-halflings.png
+usr/share/pyshared/nikola/data/themes/bootstrap/assets/img/glyphicons-halflings.png
+
+/usr/share/pyshared/nikola/data/themes/bootstrap/assets/img/glyphicons-halflings.png
+usr/lib/python2.7/dist-packages/nikola/data/themes/bootstrap/assets/img/glyphicons-halflings.png
+
+/usr/share/twitter-bootstrap/files/img/glyphicons-halflings-white.png
+usr/share/pyshared/nikola/data/themes/bootstrap/assets/img/glyphicons-halflings-white.png
+
+/usr/share/pyshared/nikola/data/themes/bootstrap/assets/img/glyphicons-halflings-white.png
+usr/lib/python2.7/dist-packages/nikola/data/themes/bootstrap/assets/img/glyphicons-halflings-white.png
diff --git a/debian/nikola.manpages b/debian/nikola.manpages
new file mode 100644
index 0000000..55f0254
--- /dev/null
+++ b/debian/nikola.manpages
@@ -0,0 +1 @@
+docs/man/nikola.1
diff --git a/debian/nikola.sh b/debian/nikola.sh
new file mode 100755
index 0000000..b5b2458
--- /dev/null
+++ b/debian/nikola.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+export PYTHONPATH=${ROOT_PATH}
+${ROOT_PATH}/debian/nikola/usr/bin/nikola $@
diff --git a/debian/patches/0001-Add-install_bs3-command.patch b/debian/patches/0001-Add-install_bs3-command.patch
new file mode 100644
index 0000000..96df249
--- /dev/null
+++ b/debian/patches/0001-Add-install_bs3-command.patch
@@ -0,0 +1,209 @@
+Description: Add install_bs3 command
+Author: Chris “Kwpolska” Warrick <kwpolska@gmail.com>
+
+--- nikola-7.0.1.orig/nikola/conf.py.in
++++ nikola-7.0.1/nikola/conf.py.in
+@@ -65,6 +65,9 @@ TRANSLATIONS_PATTERN = ${TRANSLATIONS_PA
+ NAVIGATION_LINKS = ${NAVIGATION_LINKS}
+
+ # Name of the theme to use.
++# WARNING: With this Nikola package, the bootstrap3 and bootstrap3-jinja
++# themes must be installed separately. In order to do this,
++# use: nikola install_bs3
+ THEME = ${THEME}
+
+ ##############################################
+--- nikola-7.0.1.orig/nikola/plugins/command/init.py
++++ nikola-7.0.1/nikola/plugins/command/init.py
+@@ -57,7 +57,7 @@ SAMPLE_CONF = {
+ # Example for another language:
+ # "es": "./es",
+ }""",
+- 'THEME': 'bootstrap3',
++ 'THEME': 'bootstrap',
+ 'TIMEZONE': 'UTC',
+ 'COMMENT_SYSTEM': 'disqus',
+ 'COMMENT_SYSTEM_ID': 'nikolademo',
+@@ -343,7 +343,16 @@ class CommandInit(Command):
+ answer = ask('Comment system site identifier', '')
+ SAMPLE_CONF['COMMENT_SYSTEM_ID'] = answer
+
+- STORAGE = {'target': target}
++ def debhandler(default, toconf):
++ print("The Nikola package you're using does not ship with the Bootstrap 3 theme family (due to licensing issues in Debian), which are the Nikola default.")
++ print("However, you can (and should) download the theme manually.")
++ print("")
++ q = ask_yesno("Install the Bootstrap 3 themes and default to them?", True)
++ STORAGE['deb_bs3'] = q
++ if not q:
++ print("You can install the themes at any later point -- use `nikola install_bs3`.")
++
++ STORAGE = {'target': target, 'deb_bs3': True}
+
+ questions = [
+ ('Questions about the site', None, None, None),
+@@ -359,6 +368,8 @@ class CommandInit(Command):
+ (tzhandler, None, True, True),
+ ('Questions about comments', None, None, None),
+ (chandler, None, True, True),
++ ('Bootstrap 3 themes', None, None, None),
++ (debhandler, None, True, True),
+ ]
+
+ print("Creating Nikola Site")
+@@ -396,6 +407,7 @@ class CommandInit(Command):
+ target = args[0]
+ except IndexError:
+ target = None
++ deb_bs3 = False
+ if not options.get('quiet'):
+ st = self.ask_questions(target=target)
+ try:
+@@ -403,6 +415,7 @@ class CommandInit(Command):
+ target = st['target']
+ except KeyError:
+ pass
++ deb_bs3 = st['deb_bs3']
+
+ if not target:
+ print("Usage: nikola init [--demo] [--quiet] folder")
+@@ -421,3 +434,10 @@ Options:
+ LOGGER.info("See README.txt in that folder for more information.")
+
+ self.create_configuration(target)
++ if deb_bs3:
++ os.chdir(target)
++ import nikola.plugins.command.install_bs3 as bs3
++ s = bs3.CommandInstallThemeBS3()._execute([], {})
++ if not s:
++ print("The installation failed. Use `nikola install_bs3` to try again.")
++ print("You might need to change `conf.py` to use 'bootstrap' (version 2) if it continues to fail.")
+--- /dev/null
++++ nikola-7.0.1/nikola/plugins/command/install_bs3.plugin
+@@ -0,0 +1,9 @@
++[Core]
++Name = install_bs3
++Module = install_bs3
++
++[Documentation]
++Author = Roberto Alsina, Chris Warrick
++Version = 0.1
++Website = http://getnikola.com
++Description = Install the bootstrap3 theme into the current site.
+--- /dev/null
++++ nikola-7.0.1/nikola/plugins/command/install_bs3.py
+@@ -0,0 +1,114 @@
++# -*- coding: utf-8 -*-
++
++# Copyright © 2012-2014 Roberto Alsina, Chris Warrick and others.
++
++# Permission is hereby granted, free of charge, to any
++# person obtaining a copy of this software and associated
++# documentation files (the "Software"), to deal in the
++# Software without restriction, including without limitation
++# the rights to use, copy, modify, merge, publish,
++# distribute, sublicense, and/or sell copies of the
++# Software, and to permit persons to whom the Software is
++# furnished to do so, subject to the following conditions:
++#
++# The above copyright notice and this permission notice
++# shall be included in all copies or substantial portions of
++# the Software.
++#
++# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
++# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
++# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
++# PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
++# OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
++# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
++# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
++# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
++
++from __future__ import print_function
++from nikola import __version__
++import os
++import json
++import shutil
++from io import BytesIO
++
++try:
++ import requests
++except ImportError:
++ requests = None # NOQA
++
++from nikola.plugin_categories import Command
++from nikola import utils
++
++LOGGER = utils.get_logger('install_bs3', utils.STDERR_HANDLER)
++
++
++# Stolen from textwrap in Python 3.3.2.
++def indent(text, prefix, predicate=None): # NOQA
++ """Adds 'prefix' to the beginning of selected lines in 'text'.
++
++ If 'predicate' is provided, 'prefix' will only be added to the lines
++ where 'predicate(line)' is True. If 'predicate' is not provided,
++ it will default to adding 'prefix' to all non-empty lines that do not
++ consist solely of whitespace characters.
++ """
++ if predicate is None:
++ def predicate(line):
++ return line.strip()
++
++ def prefixed_lines():
++ for line in text.splitlines(True):
++ yield (prefix + line if predicate(line) else line)
++ return ''.join(prefixed_lines())
++
++
++class CommandInstallThemeBS3(Command):
++ """Install a theme. Bootstrap 3, to be precise."""
++
++ name = "install_bs3"
++ doc_usage = ""
++ doc_purpose = "install bootstrap3 into the current site"
++ output_dir = 'themes'
++ cmd_options = []
++
++ def _execute(self, options, args):
++ """Install theme into current site."""
++ if requests is None:
++ utils.req_missing(['requests'], 'install the bootstrap3 theme')
++
++ url = 'http://themes.getnikola.com/bs3/v{0}/bs3.json'.format(__version__)
++
++ data = requests.get(url).text
++ data = json.loads(data)
++ installstatus1 = self.do_install('bootstrap3', data)
++ installstatus2 = self.do_install('bootstrap3-jinja', data)
++ if installstatus1:
++ LOGGER.info('Remember to set THEME="bootstrap3" or THEME="bootstrap3-jinja" in conf.py if you want to use one of the themes.')
++
++ return installstatus1 and installstatus2
++
++
++ def do_install(self, name, data):
++ if name in data:
++ utils.makedirs(self.output_dir)
++ LOGGER.info('Downloading: ' + data[name])
++ zip_file = BytesIO()
++ zip_file.write(requests.get(data[name]).content)
++ LOGGER.info('Extracting: {0} into themes'.format(name))
++ utils.extract_all(zip_file)
++ dest_path = os.path.join('themes', name)
++ else:
++ try:
++ theme_path = utils.get_theme_path(name)
++ except:
++ LOGGER.error("Can't find theme " + name)
++ return False
++
++ utils.makedirs(self.output_dir)
++ dest_path = os.path.join(self.output_dir, name)
++ if os.path.exists(dest_path):
++ LOGGER.error("{0} is already installed".format(name))
++ return False
++
++ LOGGER.info('Copying {0} into themes'.format(theme_path))
++ shutil.copytree(theme_path, dest_path)
++ return True
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..793cce5
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-Add-install_bs3-command.patch
diff --git a/debian/pydist-overrides b/debian/pydist-overrides
new file mode 100644
index 0000000..fb7f70d
--- /dev/null
+++ b/debian/pydist-overrides
@@ -0,0 +1 @@
+pillow python-imaging
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..616e792
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,64 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+UVERSION := $(shell dpkg-parsechangelog | sed -n -e's/^Version: \(.*\)-[^-]\+/\1/p' | cut -d ":" -f 2)
+PACKAGE_NAME := $(shell dpkg-parsechangelog | sed -n -e's/^Source: \(.*\)\+/\1/p')
+export PYBUILD_NAME=$(PACKAGE_NAME)
+export ROOT_PATH=$(CURDIR)
+
+%:
+ dh $@ --with python2,bash-completion --buildsystem=pybuild
+
+override_dh_clean:
+ dh_clean
+ rm -rf cache
+ rm -f .doit.db
+ rm -f _nikola_zsh
+ rm -f _nikola_bash
+ rm -rf debian/dpackaging_site
+ rm -f debian/source/include-binaries
+
+override_dh_bash-completion:
+ ./debian/nikola.sh init -q debian/dpackaging_site
+ cd debian/dpackaging_site/ && ../nikola.sh tabcompletion --shell bash --hardcode-tasks > ../../_nikola_bash
+ cd debian/dpackaging_site/ && ../nikola.sh tabcompletion --shell zsh --hardcode-tasks > ../../_nikola_zsh
+ dh_bash-completion
+ cp _nikola_zsh debian/nikola/usr/share/zsh/functions/Completion/Linux/_nikola
+
+override_dh_auto_install:
+ dh_auto_install
+ # Remove copy of licenses
+ find debian/nikola/usr/lib -name "MIT-LICENSE.txt" -type f -exec rm {} +
+ find debian/nikola -name "LICENSE.txt" -type f -exec rm {} +
+ # Drop wrong permission
+ find debian/nikola/usr/lib -perm /a+x -type f -exec chmod -x {} +
+
+override_dh_installdocs:
+ rst2html docs/manual.txt debian/nikola/usr/share/doc/nikola/manual.html
+ rst2html docs/theming.txt debian/nikola/usr/share/doc/nikola/theming.html
+ rst2html docs/creating-a-theme.txt debian/nikola/usr/share/doc/nikola/creating-a-theme.html
+ rst2html docs/extending.txt debian/nikola/usr/share/doc/nikola/extending.html
+ dh_installdocs
+
+override_dh_auto_test:
+
+get-orig-source:
+ @if [ ! -d "debian" ] ; then \
+ echo 'Run this from the top directory of the Debian source' >&2; \
+ exit 1; \
+ fi
+ mkdir -p ../tmp/nikola_$(UVERSION)
+ wget https://github.com/getnikola/nikola/archive/v$(UVERSION).tar.gz \
+ -O ../tmp/nikola_$(UVERSION).tar.gz;
+ tar xf ../tmp/nikola_$(UVERSION).tar.gz \
+ -C ../tmp/nikola_$(UVERSION) \
+ '--exclude=*min.*' \
+ '--exclude=*bootstrap3*' \
+ '--exclude=*bootstrap.js' \
+ '--exclude=*bootstrap.css' \
+ '--exclude=*bootstrap-responsive.css' \
+ '--exclude=*glyphicons-halflings*.png';
+ tar -C ../tmp/nikola_$(UVERSION) nikola-$(UVERSION) -c --xz -f ../nikola_$(UVERSION).orig.tar.xz
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..32d6ce3
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,3 @@
+version=3
+
+https://github.com/getnikola/nikola/releases .*archive/v?([0-9.]*).tar.gz