fpm-cookery 0.28.0 → 0.29.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +6 -0
- data/docs/.gitignore +1 -0
- data/docs/Makefile +192 -0
- data/docs/conf.py +295 -0
- data/docs/index.rst +37 -0
- data/docs/pages/getting-started.rst +184 -0
- data/lib/fpm/cookery/lifecycle_hooks.rb +18 -0
- data/lib/fpm/cookery/packager.rb +9 -0
- data/lib/fpm/cookery/recipe.rb +11 -0
- data/lib/fpm/cookery/version.rb +1 -1
- data/spec/recipe_spec.rb +6 -0
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e13450b36139981c3b9700c05e8a1cdd307a7d15
|
4
|
+
data.tar.gz: 36cbf763dd3217ee377eba4e6301d3f74d3825d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 431ea4562cea0993d46c3b05b6f841d933d5263831106b9080c11dee93c735cecb3851ed23b7a6c52f74ca1454e129b94b94d3034cdbe40c342d64976d33e832
|
7
|
+
data.tar.gz: e5f23c74e1358f45f0bcfb7e35caddfe8c5ac85eb81dfff5bff7016c0ba1c1082e5c1cf64246aea80e6496616f72cfe0ad49e438d1a1668a6718b2d38086b010
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
# v0.29.0 (2015-07-25)
|
2
|
+
* Start documentation at https://fpm-cookery.readthedocs.org/.
|
3
|
+
The documentation is now included in the source code (`docs/` directory) and
|
4
|
+
is written in sphinx/rst.
|
5
|
+
* Add lifecycle hooks to the recipe class. (#113)
|
6
|
+
__WARNING__: This is an experimental feature and the hook names might change!
|
7
|
+
* Add `extraced_source` attribute to the recipe class. (#112)
|
8
|
+
|
1
9
|
# v0.28.0 (2015-07-10)
|
2
10
|
* Add :extract option to git source handler.
|
3
11
|
Using ":extract => :clone" with a :git source handler will clone the
|
data/README.md
CHANGED
@@ -20,6 +20,12 @@ quite some time
|
|
20
20
|
|
21
21
|
It is using __fpm__ to create the actual packages.
|
22
22
|
|
23
|
+
## Documentation
|
24
|
+
|
25
|
+
Please find the documentation page here: https://fpm-cookery.readthedocs.org/
|
26
|
+
|
27
|
+
Hosting and building of the documentation is provided by the great [Read the Docs project](https://readthedocs.org/)!
|
28
|
+
|
23
29
|
## Why?
|
24
30
|
|
25
31
|
Building operating system packages for Debian/Ubuntu and RedHat using the
|
data/docs/.gitignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
/_build
|
data/docs/Makefile
ADDED
@@ -0,0 +1,192 @@
|
|
1
|
+
# Makefile for Sphinx documentation
|
2
|
+
#
|
3
|
+
|
4
|
+
# You can set these variables from the command line.
|
5
|
+
SPHINXOPTS =
|
6
|
+
SPHINXBUILD = sphinx-build
|
7
|
+
PAPER =
|
8
|
+
BUILDDIR = _build
|
9
|
+
|
10
|
+
# User-friendly check for sphinx-build
|
11
|
+
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
|
12
|
+
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
|
13
|
+
endif
|
14
|
+
|
15
|
+
# Internal variables.
|
16
|
+
PAPEROPT_a4 = -D latex_paper_size=a4
|
17
|
+
PAPEROPT_letter = -D latex_paper_size=letter
|
18
|
+
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
|
19
|
+
# the i18n builder cannot share the environment and doctrees with the others
|
20
|
+
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
|
21
|
+
|
22
|
+
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext
|
23
|
+
|
24
|
+
help:
|
25
|
+
@echo "Please use \`make <target>' where <target> is one of"
|
26
|
+
@echo " html to make standalone HTML files"
|
27
|
+
@echo " dirhtml to make HTML files named index.html in directories"
|
28
|
+
@echo " singlehtml to make a single large HTML file"
|
29
|
+
@echo " pickle to make pickle files"
|
30
|
+
@echo " json to make JSON files"
|
31
|
+
@echo " htmlhelp to make HTML files and a HTML help project"
|
32
|
+
@echo " qthelp to make HTML files and a qthelp project"
|
33
|
+
@echo " applehelp to make an Apple Help Book"
|
34
|
+
@echo " devhelp to make HTML files and a Devhelp project"
|
35
|
+
@echo " epub to make an epub"
|
36
|
+
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
|
37
|
+
@echo " latexpdf to make LaTeX files and run them through pdflatex"
|
38
|
+
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
|
39
|
+
@echo " text to make text files"
|
40
|
+
@echo " man to make manual pages"
|
41
|
+
@echo " texinfo to make Texinfo files"
|
42
|
+
@echo " info to make Texinfo files and run them through makeinfo"
|
43
|
+
@echo " gettext to make PO message catalogs"
|
44
|
+
@echo " changes to make an overview of all changed/added/deprecated items"
|
45
|
+
@echo " xml to make Docutils-native XML files"
|
46
|
+
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
|
47
|
+
@echo " linkcheck to check all external links for integrity"
|
48
|
+
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
|
49
|
+
@echo " coverage to run coverage check of the documentation (if enabled)"
|
50
|
+
|
51
|
+
clean:
|
52
|
+
rm -rf $(BUILDDIR)/*
|
53
|
+
|
54
|
+
html:
|
55
|
+
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
|
56
|
+
@echo
|
57
|
+
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
|
58
|
+
|
59
|
+
dirhtml:
|
60
|
+
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
|
61
|
+
@echo
|
62
|
+
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
|
63
|
+
|
64
|
+
singlehtml:
|
65
|
+
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
|
66
|
+
@echo
|
67
|
+
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
|
68
|
+
|
69
|
+
pickle:
|
70
|
+
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
|
71
|
+
@echo
|
72
|
+
@echo "Build finished; now you can process the pickle files."
|
73
|
+
|
74
|
+
json:
|
75
|
+
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
|
76
|
+
@echo
|
77
|
+
@echo "Build finished; now you can process the JSON files."
|
78
|
+
|
79
|
+
htmlhelp:
|
80
|
+
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
|
81
|
+
@echo
|
82
|
+
@echo "Build finished; now you can run HTML Help Workshop with the" \
|
83
|
+
".hhp project file in $(BUILDDIR)/htmlhelp."
|
84
|
+
|
85
|
+
qthelp:
|
86
|
+
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
|
87
|
+
@echo
|
88
|
+
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
|
89
|
+
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
|
90
|
+
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/fpm-cookery.qhcp"
|
91
|
+
@echo "To view the help file:"
|
92
|
+
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/fpm-cookery.qhc"
|
93
|
+
|
94
|
+
applehelp:
|
95
|
+
$(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
|
96
|
+
@echo
|
97
|
+
@echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
|
98
|
+
@echo "N.B. You won't be able to view it unless you put it in" \
|
99
|
+
"~/Library/Documentation/Help or install it in your application" \
|
100
|
+
"bundle."
|
101
|
+
|
102
|
+
devhelp:
|
103
|
+
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
|
104
|
+
@echo
|
105
|
+
@echo "Build finished."
|
106
|
+
@echo "To view the help file:"
|
107
|
+
@echo "# mkdir -p $$HOME/.local/share/devhelp/fpm-cookery"
|
108
|
+
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/fpm-cookery"
|
109
|
+
@echo "# devhelp"
|
110
|
+
|
111
|
+
epub:
|
112
|
+
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
|
113
|
+
@echo
|
114
|
+
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
|
115
|
+
|
116
|
+
latex:
|
117
|
+
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
118
|
+
@echo
|
119
|
+
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
|
120
|
+
@echo "Run \`make' in that directory to run these through (pdf)latex" \
|
121
|
+
"(use \`make latexpdf' here to do that automatically)."
|
122
|
+
|
123
|
+
latexpdf:
|
124
|
+
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
125
|
+
@echo "Running LaTeX files through pdflatex..."
|
126
|
+
$(MAKE) -C $(BUILDDIR)/latex all-pdf
|
127
|
+
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
|
128
|
+
|
129
|
+
latexpdfja:
|
130
|
+
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
131
|
+
@echo "Running LaTeX files through platex and dvipdfmx..."
|
132
|
+
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
|
133
|
+
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
|
134
|
+
|
135
|
+
text:
|
136
|
+
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
|
137
|
+
@echo
|
138
|
+
@echo "Build finished. The text files are in $(BUILDDIR)/text."
|
139
|
+
|
140
|
+
man:
|
141
|
+
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
|
142
|
+
@echo
|
143
|
+
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
|
144
|
+
|
145
|
+
texinfo:
|
146
|
+
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
|
147
|
+
@echo
|
148
|
+
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
|
149
|
+
@echo "Run \`make' in that directory to run these through makeinfo" \
|
150
|
+
"(use \`make info' here to do that automatically)."
|
151
|
+
|
152
|
+
info:
|
153
|
+
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
|
154
|
+
@echo "Running Texinfo files through makeinfo..."
|
155
|
+
make -C $(BUILDDIR)/texinfo info
|
156
|
+
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
|
157
|
+
|
158
|
+
gettext:
|
159
|
+
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
|
160
|
+
@echo
|
161
|
+
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
|
162
|
+
|
163
|
+
changes:
|
164
|
+
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
|
165
|
+
@echo
|
166
|
+
@echo "The overview file is in $(BUILDDIR)/changes."
|
167
|
+
|
168
|
+
linkcheck:
|
169
|
+
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
|
170
|
+
@echo
|
171
|
+
@echo "Link check complete; look for any errors in the above output " \
|
172
|
+
"or in $(BUILDDIR)/linkcheck/output.txt."
|
173
|
+
|
174
|
+
doctest:
|
175
|
+
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
|
176
|
+
@echo "Testing of doctests in the sources finished, look at the " \
|
177
|
+
"results in $(BUILDDIR)/doctest/output.txt."
|
178
|
+
|
179
|
+
coverage:
|
180
|
+
$(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
|
181
|
+
@echo "Testing of coverage in the sources finished, look at the " \
|
182
|
+
"results in $(BUILDDIR)/coverage/python.txt."
|
183
|
+
|
184
|
+
xml:
|
185
|
+
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
|
186
|
+
@echo
|
187
|
+
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
|
188
|
+
|
189
|
+
pseudoxml:
|
190
|
+
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
|
191
|
+
@echo
|
192
|
+
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
|
data/docs/conf.py
ADDED
@@ -0,0 +1,295 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
#
|
3
|
+
# fpm-cookery documentation build configuration file, created by
|
4
|
+
# sphinx-quickstart on Sat Jul 25 11:02:45 2015.
|
5
|
+
#
|
6
|
+
# This file is execfile()d with the current directory set to its
|
7
|
+
# containing dir.
|
8
|
+
#
|
9
|
+
# Note that not all possible configuration values are present in this
|
10
|
+
# autogenerated file.
|
11
|
+
#
|
12
|
+
# All configuration values have a default; values that are commented out
|
13
|
+
# serve to show the default.
|
14
|
+
|
15
|
+
import sys
|
16
|
+
import os
|
17
|
+
import shlex
|
18
|
+
|
19
|
+
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
|
20
|
+
|
21
|
+
if not on_rtd: # only import and set the theme if we're building docs locally
|
22
|
+
import sphinx_rtd_theme
|
23
|
+
html_theme = 'sphinx_rtd_theme'
|
24
|
+
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
|
25
|
+
# otherwise, readthedocs.org uses their theme by default, so no need to specify it
|
26
|
+
|
27
|
+
|
28
|
+
# If extensions (or modules to document with autodoc) are in another directory,
|
29
|
+
# add these directories to sys.path here. If the directory is relative to the
|
30
|
+
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
31
|
+
#sys.path.insert(0, os.path.abspath('.'))
|
32
|
+
|
33
|
+
# -- General configuration ------------------------------------------------
|
34
|
+
|
35
|
+
# If your documentation needs a minimal Sphinx version, state it here.
|
36
|
+
#needs_sphinx = '1.0'
|
37
|
+
|
38
|
+
# Add any Sphinx extension module names here, as strings. They can be
|
39
|
+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
40
|
+
# ones.
|
41
|
+
extensions = [
|
42
|
+
'sphinx.ext.ifconfig',
|
43
|
+
]
|
44
|
+
|
45
|
+
# Add any paths that contain templates here, relative to this directory.
|
46
|
+
templates_path = ['_templates']
|
47
|
+
|
48
|
+
# The suffix(es) of source filenames.
|
49
|
+
# You can specify multiple suffix as a list of string:
|
50
|
+
# source_suffix = ['.rst', '.md']
|
51
|
+
source_suffix = '.rst'
|
52
|
+
|
53
|
+
# The encoding of source files.
|
54
|
+
#source_encoding = 'utf-8-sig'
|
55
|
+
|
56
|
+
# The master toctree document.
|
57
|
+
master_doc = 'index'
|
58
|
+
|
59
|
+
# General information about the project.
|
60
|
+
project = u'fpm-cookery'
|
61
|
+
copyright = u'2015, Bernd Ahlers'
|
62
|
+
author = u'Bernd Ahlers'
|
63
|
+
|
64
|
+
# The version info for the project you're documenting, acts as replacement for
|
65
|
+
# |version| and |release|, also used in various other places throughout the
|
66
|
+
# built documents.
|
67
|
+
#
|
68
|
+
# The short X.Y version.
|
69
|
+
version = open("../lib/fpm/cookery/version.rb").read().split("'")[1]
|
70
|
+
# The full version, including alpha/beta/rc tags.
|
71
|
+
release = version
|
72
|
+
|
73
|
+
# The language for content autogenerated by Sphinx. Refer to documentation
|
74
|
+
# for a list of supported languages.
|
75
|
+
#
|
76
|
+
# This is also used if you do content translation via gettext catalogs.
|
77
|
+
# Usually you set "language" from the command line for these cases.
|
78
|
+
language = None
|
79
|
+
|
80
|
+
# There are two options for replacing |today|: either, you set today to some
|
81
|
+
# non-false value, then it is used:
|
82
|
+
#today = ''
|
83
|
+
# Else, today_fmt is used as the format for a strftime call.
|
84
|
+
#today_fmt = '%B %d, %Y'
|
85
|
+
|
86
|
+
# List of patterns, relative to source directory, that match files and
|
87
|
+
# directories to ignore when looking for source files.
|
88
|
+
exclude_patterns = ['_build']
|
89
|
+
|
90
|
+
# The reST default role (used for this markup: `text`) to use for all
|
91
|
+
# documents.
|
92
|
+
#default_role = None
|
93
|
+
|
94
|
+
# If true, '()' will be appended to :func: etc. cross-reference text.
|
95
|
+
#add_function_parentheses = True
|
96
|
+
|
97
|
+
# If true, the current module name will be prepended to all description
|
98
|
+
# unit titles (such as .. function::).
|
99
|
+
#add_module_names = True
|
100
|
+
|
101
|
+
# If true, sectionauthor and moduleauthor directives will be shown in the
|
102
|
+
# output. They are ignored by default.
|
103
|
+
#show_authors = False
|
104
|
+
|
105
|
+
# The name of the Pygments (syntax highlighting) style to use.
|
106
|
+
pygments_style = 'sphinx'
|
107
|
+
|
108
|
+
# A list of ignored prefixes for module index sorting.
|
109
|
+
#modindex_common_prefix = []
|
110
|
+
|
111
|
+
# If true, keep warnings as "system message" paragraphs in the built documents.
|
112
|
+
#keep_warnings = False
|
113
|
+
|
114
|
+
# If true, `todo` and `todoList` produce output, else they produce nothing.
|
115
|
+
todo_include_todos = False
|
116
|
+
|
117
|
+
|
118
|
+
# -- Options for HTML output ----------------------------------------------
|
119
|
+
|
120
|
+
# The theme to use for HTML and HTML Help pages. See the documentation for
|
121
|
+
# a list of builtin themes.
|
122
|
+
#html_theme = 'alabaster'
|
123
|
+
|
124
|
+
# Theme options are theme-specific and customize the look and feel of a theme
|
125
|
+
# further. For a list of options available for each theme, see the
|
126
|
+
# documentation.
|
127
|
+
#html_theme_options = {}
|
128
|
+
|
129
|
+
# Add any paths that contain custom themes here, relative to this directory.
|
130
|
+
#html_theme_path = []
|
131
|
+
|
132
|
+
# The name for this set of Sphinx documents. If None, it defaults to
|
133
|
+
# "<project> v<release> documentation".
|
134
|
+
#html_title = None
|
135
|
+
|
136
|
+
# A shorter title for the navigation bar. Default is the same as html_title.
|
137
|
+
#html_short_title = None
|
138
|
+
|
139
|
+
# The name of an image file (relative to this directory) to place at the top
|
140
|
+
# of the sidebar.
|
141
|
+
#html_logo = None
|
142
|
+
|
143
|
+
# The name of an image file (within the static path) to use as favicon of the
|
144
|
+
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
|
145
|
+
# pixels large.
|
146
|
+
#html_favicon = None
|
147
|
+
|
148
|
+
# Add any paths that contain custom static files (such as style sheets) here,
|
149
|
+
# relative to this directory. They are copied after the builtin static files,
|
150
|
+
# so a file named "default.css" will overwrite the builtin "default.css".
|
151
|
+
html_static_path = ['_static']
|
152
|
+
|
153
|
+
# Add any extra paths that contain custom files (such as robots.txt or
|
154
|
+
# .htaccess) here, relative to this directory. These files are copied
|
155
|
+
# directly to the root of the documentation.
|
156
|
+
#html_extra_path = []
|
157
|
+
|
158
|
+
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
|
159
|
+
# using the given strftime format.
|
160
|
+
#html_last_updated_fmt = '%b %d, %Y'
|
161
|
+
|
162
|
+
# If true, SmartyPants will be used to convert quotes and dashes to
|
163
|
+
# typographically correct entities.
|
164
|
+
#html_use_smartypants = True
|
165
|
+
|
166
|
+
# Custom sidebar templates, maps document names to template names.
|
167
|
+
#html_sidebars = {}
|
168
|
+
|
169
|
+
# Additional templates that should be rendered to pages, maps page names to
|
170
|
+
# template names.
|
171
|
+
#html_additional_pages = {}
|
172
|
+
|
173
|
+
# If false, no module index is generated.
|
174
|
+
#html_domain_indices = True
|
175
|
+
|
176
|
+
# If false, no index is generated.
|
177
|
+
#html_use_index = True
|
178
|
+
|
179
|
+
# If true, the index is split into individual pages for each letter.
|
180
|
+
#html_split_index = False
|
181
|
+
|
182
|
+
# If true, links to the reST sources are added to the pages.
|
183
|
+
#html_show_sourcelink = True
|
184
|
+
|
185
|
+
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
|
186
|
+
#html_show_sphinx = True
|
187
|
+
|
188
|
+
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
|
189
|
+
#html_show_copyright = True
|
190
|
+
|
191
|
+
# If true, an OpenSearch description file will be output, and all pages will
|
192
|
+
# contain a <link> tag referring to it. The value of this option must be the
|
193
|
+
# base URL from which the finished HTML is served.
|
194
|
+
#html_use_opensearch = ''
|
195
|
+
|
196
|
+
# This is the file name suffix for HTML files (e.g. ".xhtml").
|
197
|
+
#html_file_suffix = None
|
198
|
+
|
199
|
+
# Language to be used for generating the HTML full-text search index.
|
200
|
+
# Sphinx supports the following languages:
|
201
|
+
# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
|
202
|
+
# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'
|
203
|
+
#html_search_language = 'en'
|
204
|
+
|
205
|
+
# A dictionary with options for the search language support, empty by default.
|
206
|
+
# Now only 'ja' uses this config value
|
207
|
+
#html_search_options = {'type': 'default'}
|
208
|
+
|
209
|
+
# The name of a javascript file (relative to the configuration directory) that
|
210
|
+
# implements a search results scorer. If empty, the default will be used.
|
211
|
+
#html_search_scorer = 'scorer.js'
|
212
|
+
|
213
|
+
# Output file base name for HTML help builder.
|
214
|
+
htmlhelp_basename = 'fpm-cookerydoc'
|
215
|
+
|
216
|
+
# -- Options for LaTeX output ---------------------------------------------
|
217
|
+
|
218
|
+
latex_elements = {
|
219
|
+
# The paper size ('letterpaper' or 'a4paper').
|
220
|
+
#'papersize': 'letterpaper',
|
221
|
+
|
222
|
+
# The font size ('10pt', '11pt' or '12pt').
|
223
|
+
#'pointsize': '10pt',
|
224
|
+
|
225
|
+
# Additional stuff for the LaTeX preamble.
|
226
|
+
#'preamble': '',
|
227
|
+
|
228
|
+
# Latex figure (float) alignment
|
229
|
+
#'figure_align': 'htbp',
|
230
|
+
}
|
231
|
+
|
232
|
+
# Grouping the document tree into LaTeX files. List of tuples
|
233
|
+
# (source start file, target name, title,
|
234
|
+
# author, documentclass [howto, manual, or own class]).
|
235
|
+
latex_documents = [
|
236
|
+
(master_doc, 'fpm-cookery.tex', u'fpm-cookery Documentation',
|
237
|
+
u'Bernd Ahlers', 'manual'),
|
238
|
+
]
|
239
|
+
|
240
|
+
# The name of an image file (relative to this directory) to place at the top of
|
241
|
+
# the title page.
|
242
|
+
#latex_logo = None
|
243
|
+
|
244
|
+
# For "manual" documents, if this is true, then toplevel headings are parts,
|
245
|
+
# not chapters.
|
246
|
+
#latex_use_parts = False
|
247
|
+
|
248
|
+
# If true, show page references after internal links.
|
249
|
+
#latex_show_pagerefs = False
|
250
|
+
|
251
|
+
# If true, show URL addresses after external links.
|
252
|
+
#latex_show_urls = False
|
253
|
+
|
254
|
+
# Documents to append as an appendix to all manuals.
|
255
|
+
#latex_appendices = []
|
256
|
+
|
257
|
+
# If false, no module index is generated.
|
258
|
+
#latex_domain_indices = True
|
259
|
+
|
260
|
+
|
261
|
+
# -- Options for manual page output ---------------------------------------
|
262
|
+
|
263
|
+
# One entry per manual page. List of tuples
|
264
|
+
# (source start file, name, description, authors, manual section).
|
265
|
+
man_pages = [
|
266
|
+
(master_doc, 'fpm-cookery', u'fpm-cookery Documentation',
|
267
|
+
[author], 1)
|
268
|
+
]
|
269
|
+
|
270
|
+
# If true, show URL addresses after external links.
|
271
|
+
#man_show_urls = False
|
272
|
+
|
273
|
+
|
274
|
+
# -- Options for Texinfo output -------------------------------------------
|
275
|
+
|
276
|
+
# Grouping the document tree into Texinfo files. List of tuples
|
277
|
+
# (source start file, target name, title, author,
|
278
|
+
# dir menu entry, description, category)
|
279
|
+
texinfo_documents = [
|
280
|
+
(master_doc, 'fpm-cookery', u'fpm-cookery Documentation',
|
281
|
+
author, 'fpm-cookery', 'One line description of project.',
|
282
|
+
'Miscellaneous'),
|
283
|
+
]
|
284
|
+
|
285
|
+
# Documents to append as an appendix to all manuals.
|
286
|
+
#texinfo_appendices = []
|
287
|
+
|
288
|
+
# If false, no module index is generated.
|
289
|
+
#texinfo_domain_indices = True
|
290
|
+
|
291
|
+
# How to display URL addresses: 'footnote', 'no', or 'inline'.
|
292
|
+
#texinfo_show_urls = 'footnote'
|
293
|
+
|
294
|
+
# If true, do not generate a @detailmenu in the "Top" node's menu.
|
295
|
+
#texinfo_no_detailmenu = False
|
data/docs/index.rst
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
.. fpm-cookery documentation master file, created by
|
2
|
+
sphinx-quickstart on Sat Jul 25 11:02:45 2015.
|
3
|
+
You can adapt this file completely to your liking, but it should at least
|
4
|
+
contain the root `toctree` directive.
|
5
|
+
|
6
|
+
Welcome to the fpm-cookery documentation!
|
7
|
+
=========================================
|
8
|
+
|
9
|
+
**Current version:** |version|
|
10
|
+
|
11
|
+
fpm-cookery provides an infrastructure to automatically build software based on recipes. It's heavily inspired and borrows code from the great `homebrew <https://github.com/mxcl/homebrew>`_ and `brew2deb <https://github.com/tmm1/brew2deb>`_ projects.
|
12
|
+
|
13
|
+
Features
|
14
|
+
^^^^^^^^
|
15
|
+
|
16
|
+
* Source archive download and caching.
|
17
|
+
* Recipes to describe and execute the software build. (e.g. configure, make, make install)
|
18
|
+
* Sandboxed builds.
|
19
|
+
* Package creation via `fpm <https://github.com/jordansissel/fpm>`_.
|
20
|
+
* Standalone recipe trees/books/you name it. No need to put the recipes into the fpm-cookery source tree.
|
21
|
+
|
22
|
+
Documentation Contents
|
23
|
+
^^^^^^^^^^^^^^^^^^^^^^
|
24
|
+
|
25
|
+
.. toctree::
|
26
|
+
:maxdepth: 2
|
27
|
+
|
28
|
+
pages/getting-started
|
29
|
+
|
30
|
+
|
31
|
+
Indices and tables
|
32
|
+
==================
|
33
|
+
|
34
|
+
* :ref:`genindex`
|
35
|
+
* :ref:`modindex`
|
36
|
+
* :ref:`search`
|
37
|
+
|
@@ -0,0 +1,184 @@
|
|
1
|
+
Getting Started
|
2
|
+
===============
|
3
|
+
|
4
|
+
This page helps you to get started with the fpm-cookery tool and guides you
|
5
|
+
through the installation and the creation of a simple recipe to build your
|
6
|
+
first package.
|
7
|
+
|
8
|
+
You will create a package for the `tmux <http://tmux.sourceforge.net/>`_ program.
|
9
|
+
|
10
|
+
Prerequisites
|
11
|
+
-------------
|
12
|
+
|
13
|
+
The following instructions have been tested with an Ubuntu 12.04 Linux system.
|
14
|
+
It might work on other versions or other Linux systems but that cannot be
|
15
|
+
guaranteed. Please use something like `Vagrant <http://www.vagrantup.com/>`_ to
|
16
|
+
create an Ubuntu 12.04 VM if you do not have one at hand.
|
17
|
+
|
18
|
+
Installation
|
19
|
+
------------
|
20
|
+
|
21
|
+
Rubygems
|
22
|
+
^^^^^^^^
|
23
|
+
|
24
|
+
fpm-cookery is written in Ruby. Before we can actually install the rubygem, you
|
25
|
+
have to install a Ruby interpreter and some build tools.
|
26
|
+
Execute the following to install the required packages::
|
27
|
+
|
28
|
+
$ sudo apt-get install ruby1.9.1 ruby1.9.1-dev build-essential curl
|
29
|
+
|
30
|
+
Ruby 1.9 includes the ``gem`` program to install rubygems::
|
31
|
+
|
32
|
+
$ sudo gem install fpm-cookery
|
33
|
+
|
34
|
+
This installs the fpm-cookery rubygem and its dependencies. At the end you
|
35
|
+
should see something like "Successfully installed fpm-cookery-|version|".
|
36
|
+
|
37
|
+
Your fpm-cookery installation is ready to build some packages now!
|
38
|
+
|
39
|
+
OS Package
|
40
|
+
^^^^^^^^^^
|
41
|
+
|
42
|
+
We are planning to provide a packaged version for different operating systems.
|
43
|
+
Please use the Rubygems installation method above in the meantime.
|
44
|
+
|
45
|
+
The Recipe
|
46
|
+
----------
|
47
|
+
|
48
|
+
The recipe is a Ruby file that contains a simple class which acts as a DSL
|
49
|
+
to set the attributes of a package (like name and version) and to describe
|
50
|
+
the build and installation process of a package.
|
51
|
+
|
52
|
+
You might want to create some folders to organize your recipes::
|
53
|
+
|
54
|
+
$ mkdir recipes
|
55
|
+
$ mkdir recipes/tmux
|
56
|
+
$ cd recipes/tmux
|
57
|
+
$ touch recipe.rb
|
58
|
+
|
59
|
+
The last command creates an empty recipe file. See the following snippet for
|
60
|
+
the complete recipe to build a tmux package. We will go through each step
|
61
|
+
afterwards. Use your text editor to add the code to the ``recipe.rb`` file.
|
62
|
+
|
63
|
+
.. code-block:: ruby
|
64
|
+
|
65
|
+
class Tmux < FPM::Cookery::Recipe
|
66
|
+
description 'terminal multiplexer'
|
67
|
+
|
68
|
+
name 'tmux'
|
69
|
+
version '1.9a'
|
70
|
+
homepage 'http://tmux.sourceforce.net/'
|
71
|
+
source 'http://freefr.dl.sourceforge.net/project/tmux/tmux/tmux-1.9/tmux-1.9a.tar.gz'
|
72
|
+
|
73
|
+
build_depends 'libevent-dev', 'libncurses5-dev'
|
74
|
+
depends 'libevent-2.0-5'
|
75
|
+
|
76
|
+
def build
|
77
|
+
configure :prefix => prefix
|
78
|
+
make
|
79
|
+
end
|
80
|
+
|
81
|
+
def install
|
82
|
+
make :install, 'DESTDIR' => destdir
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
Example Workflow
|
87
|
+
----------------
|
88
|
+
|
89
|
+
The following commands require the ``recipe.rb`` recipe file created above.
|
90
|
+
|
91
|
+
.. code-block:: none
|
92
|
+
|
93
|
+
$ fpm-cook
|
94
|
+
===> Starting package creation for tmux-1.9a (ubuntu, deb)
|
95
|
+
===>
|
96
|
+
===> Verifying build_depends and depends with Puppet
|
97
|
+
===> Verifying package: libevent-dev
|
98
|
+
===> Verifying package: libevent-2.0-5
|
99
|
+
===> Missing/wrong version packages: libevent-dev
|
100
|
+
ERROR: Not running as root; please run 'sudo fpm-cook install-deps' to install dependencies.
|
101
|
+
|
102
|
+
.. code-block:: none
|
103
|
+
|
104
|
+
$ sudo fpm-cook install-deps
|
105
|
+
===> Verifying build_depends and depends with Puppet
|
106
|
+
===> Verifying package: libevent-dev
|
107
|
+
===> Verifying package: libevent-2.0-5
|
108
|
+
===> Missing/wrong version packages: libevent-dev
|
109
|
+
===> Running as root; installing missing/wrong version build_depends and depends with Puppet
|
110
|
+
===> Installing package: libevent-dev
|
111
|
+
===> ensure changed 'purged' to 'present'
|
112
|
+
===> All dependencies installed!
|
113
|
+
|
114
|
+
.. code-block:: none
|
115
|
+
|
116
|
+
$ fpm-cook
|
117
|
+
===> Starting package creation for tmux-1.9a (ubuntu, deb)
|
118
|
+
===>
|
119
|
+
===> Verifying build_depends and depends with Puppet
|
120
|
+
===> Verifying package: libevent-dev
|
121
|
+
===> Verifying package: libncurses5-dev
|
122
|
+
===> Verifying package: libevent-2.0-5
|
123
|
+
===> All build_depends and depends packages installed
|
124
|
+
===> Fetching source:
|
125
|
+
######################################################################## 100.0%
|
126
|
+
===> Building in /home/vagrant/recipes/tmux/tmp-build/tmux-1.9a
|
127
|
+
checking for a BSD-compatible install... /usr/bin/install -c
|
128
|
+
checking whether build environment is sane... yes
|
129
|
+
|
130
|
+
[lots of output removed]
|
131
|
+
|
132
|
+
make[1]: Nothing to be done for `install-data-am'.
|
133
|
+
make[1]: Leaving directory `/home/vagrant/recipes/tmux/tmp-build/tmux-1.9a'
|
134
|
+
===> [FPM] Converting dir to deb {}
|
135
|
+
===> [FPM] No deb_installed_size set, calculating now. {}
|
136
|
+
===> [FPM] Reading template {"path":"/var/lib/gems/1.9.1/gems/fpm-1.0.2/templates/deb.erb"}
|
137
|
+
===> [FPM] Creating {"path":"/tmp/package-deb-build20140308-7998-1v6uqm5/control.tar.gz","from":"/tmp/package-deb-build20140308-7998-1v6uqm5/control"}
|
138
|
+
===> [FPM] Created deb package {"path":"tmux_1.9a-1_amd64.deb"}
|
139
|
+
===> Created package: /home/vagrant/recipes/tmux/pkg/tmux_1.9a-1_amd64.deb
|
140
|
+
|
141
|
+
.. code-block:: none
|
142
|
+
|
143
|
+
.
|
144
|
+
|-- cache
|
145
|
+
| `-- tmux-1.9a.tar.gz
|
146
|
+
|-- pkg
|
147
|
+
| `-- tmux_1.9a-1_amd64.deb
|
148
|
+
|-- recipe.rb
|
149
|
+
|-- tmp-build
|
150
|
+
| `-- tmux-1.9a
|
151
|
+
`-- tmp-dest
|
152
|
+
`-- usr
|
153
|
+
|
154
|
+
.. code-block:: none
|
155
|
+
|
156
|
+
$ dpkg -c pkg/tmux_1.9a-1_amd64.deb
|
157
|
+
drwxrwxr-x 0/0 0 2014-03-08 01:26 ./
|
158
|
+
drwxrwxr-x 0/0 0 2014-03-08 01:26 ./usr/
|
159
|
+
drwxrwxr-x 0/0 0 2014-03-08 01:26 ./usr/share/
|
160
|
+
drwxrwxr-x 0/0 0 2014-03-08 01:26 ./usr/share/man/
|
161
|
+
drwxrwxr-x 0/0 0 2014-03-08 01:26 ./usr/share/man/man1/
|
162
|
+
-rw-r--r-- 0/0 93888 2014-03-08 01:26 ./usr/share/man/man1/tmux.1
|
163
|
+
drwxrwxr-x 0/0 0 2014-03-08 01:26 ./usr/bin/
|
164
|
+
-rwxr-xr-x 0/0 491016 2014-03-08 01:26 ./usr/bin/tmux
|
165
|
+
|
166
|
+
.. code-block:: none
|
167
|
+
|
168
|
+
$ dpkg -I pkg/tmux_1.9a-1_amd64.deb
|
169
|
+
new debian package, version 2.0.
|
170
|
+
size 235488 bytes: control archive= 437 bytes.
|
171
|
+
260 bytes, 12 lines control
|
172
|
+
105 bytes, 2 lines md5sums
|
173
|
+
Package: tmux
|
174
|
+
Version: 1.9a-1
|
175
|
+
License: unknown
|
176
|
+
Vendor:
|
177
|
+
Architecture: amd64
|
178
|
+
Maintainer: <vagrant@ubuntu1204>
|
179
|
+
Installed-Size: 571
|
180
|
+
Depends: libevent-2.0-5
|
181
|
+
Section: optional
|
182
|
+
Priority: extra
|
183
|
+
Homepage: http://tmux.sourceforce.net/
|
184
|
+
Description: terminal multiplexer
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'fpm/cookery/log'
|
2
|
+
|
3
|
+
module FPM
|
4
|
+
module Cookery
|
5
|
+
module LifecycleHooks
|
6
|
+
def run_lifecycle_hook(hook_name)
|
7
|
+
Log.debug("Run lifecycle hook: #{hook_name}")
|
8
|
+
self.__send__(hook_name)
|
9
|
+
end
|
10
|
+
|
11
|
+
def before_dependency_installation
|
12
|
+
end
|
13
|
+
|
14
|
+
def after_dependency_installation
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
data/lib/fpm/cookery/packager.rb
CHANGED
@@ -44,7 +44,9 @@ module FPM
|
|
44
44
|
end
|
45
45
|
|
46
46
|
def install_deps
|
47
|
+
recipe.run_lifecycle_hook(:before_dependency_installation)
|
47
48
|
DependencyInspector.verify!(recipe.depends, recipe.build_depends)
|
49
|
+
recipe.run_lifecycle_hook(:after_dependency_installation)
|
48
50
|
Log.info("All dependencies installed!")
|
49
51
|
end
|
50
52
|
|
@@ -59,7 +61,9 @@ module FPM
|
|
59
61
|
|
60
62
|
# RecipeInspector.verify!(recipe)
|
61
63
|
if config.fetch(:dependency_check, true)
|
64
|
+
recipe.run_lifecycle_hook(:before_dependency_installation)
|
62
65
|
DependencyInspector.verify!(recipe.depends, recipe.build_depends)
|
66
|
+
recipe.run_lifecycle_hook(:after_dependency_installation)
|
63
67
|
end
|
64
68
|
|
65
69
|
recipe.installing = false
|
@@ -101,6 +105,11 @@ module FPM
|
|
101
105
|
Dir.chdir(recipe.builddir) do
|
102
106
|
extracted_source = source.extract
|
103
107
|
|
108
|
+
if recipe.extracted_source
|
109
|
+
Log.debug "Using custom extracted source dir: #{recipe.builddir(recipe.extracted_source)}"
|
110
|
+
extracted_source = recipe.extracted_source
|
111
|
+
end
|
112
|
+
|
104
113
|
Dir.chdir(extracted_source) do
|
105
114
|
#Source::Patches.new(recipe.patches).apply!
|
106
115
|
|
data/lib/fpm/cookery/recipe.rb
CHANGED
@@ -6,6 +6,7 @@ require 'fpm/cookery/source_handler'
|
|
6
6
|
require 'fpm/cookery/utils'
|
7
7
|
require 'fpm/cookery/path_helper'
|
8
8
|
require 'fpm/cookery/environment'
|
9
|
+
require 'fpm/cookery/lifecycle_hooks'
|
9
10
|
require 'fpm/cookery/package/cpan'
|
10
11
|
require 'fpm/cookery/package/dir'
|
11
12
|
require 'fpm/cookery/package/gem'
|
@@ -19,6 +20,7 @@ module FPM
|
|
19
20
|
include FileUtils
|
20
21
|
include FPM::Cookery::Utils
|
21
22
|
include FPM::Cookery::PathHelper
|
23
|
+
include FPM::Cookery::LifecycleHooks
|
22
24
|
|
23
25
|
def self.attr_rw(*attrs)
|
24
26
|
attrs.each do |attr|
|
@@ -166,12 +168,21 @@ module FPM
|
|
166
168
|
@spec = spec
|
167
169
|
end
|
168
170
|
alias_method :url, :source
|
171
|
+
|
172
|
+
def extracted_source(path = nil)
|
173
|
+
return @extracted_source if path.nil?
|
174
|
+
@extracted_source = path
|
175
|
+
end
|
169
176
|
end
|
170
177
|
|
171
178
|
def source
|
172
179
|
self.class.source
|
173
180
|
end
|
174
181
|
|
182
|
+
def extracted_source
|
183
|
+
self.class.extracted_source
|
184
|
+
end
|
185
|
+
|
175
186
|
attr_reader :source_handler
|
176
187
|
|
177
188
|
extend Forwardable
|
data/lib/fpm/cookery/version.rb
CHANGED
data/spec/recipe_spec.rb
CHANGED
@@ -199,6 +199,12 @@ describe "Recipe" do
|
|
199
199
|
end
|
200
200
|
end
|
201
201
|
|
202
|
+
describe "#extracted_source" do
|
203
|
+
it "can be set" do
|
204
|
+
check_attribute(:extracted_source, 'test-1.0.0')
|
205
|
+
end
|
206
|
+
end
|
207
|
+
|
202
208
|
def self.spec_recipe_attribute_list(name, list)
|
203
209
|
class_eval %Q{
|
204
210
|
describe "##{name}" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fpm-cookery
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.29.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bernd Ahlers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -124,6 +124,11 @@ files:
|
|
124
124
|
- README.md
|
125
125
|
- Rakefile
|
126
126
|
- bin/fpm-cook
|
127
|
+
- docs/.gitignore
|
128
|
+
- docs/Makefile
|
129
|
+
- docs/conf.py
|
130
|
+
- docs/index.rst
|
131
|
+
- docs/pages/getting-started.rst
|
127
132
|
- fpm-cookery.gemspec
|
128
133
|
- lib/fpm/cookery/book.rb
|
129
134
|
- lib/fpm/cookery/book_hook.rb
|
@@ -134,6 +139,7 @@ files:
|
|
134
139
|
- lib/fpm/cookery/environment.rb
|
135
140
|
- lib/fpm/cookery/exceptions.rb
|
136
141
|
- lib/fpm/cookery/facts.rb
|
142
|
+
- lib/fpm/cookery/lifecycle_hooks.rb
|
137
143
|
- lib/fpm/cookery/log.rb
|
138
144
|
- lib/fpm/cookery/log/color.rb
|
139
145
|
- lib/fpm/cookery/log/output/console.rb
|