Skip to content

Commit

Permalink
(SIMP-346) Update RPM .spec to build sphinx
Browse files Browse the repository at this point in the history
Before this commit, the RPM .spec file would fail to build (causing
pkg:rpm to fail, causing simp ISO builds that included documentation to
fail).

This commit removes all publican logic and introduces sphinx-based ReST
builds.

SIMP-4   #comment Updated RPM .spec to handle sphinx
SIMP-346 #close
  • Loading branch information
op-ct committed Aug 1, 2015
1 parent 68878f4 commit 1acb763
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 91 deletions.
8 changes: 0 additions & 8 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,13 @@ class DocPkg < Simp::Rake::Pkg
rm(short_name)
end
end

Rake::Task['rdoc:clean'].invoke
end
end

def define_pkg_tar
# First, we need to assemble the documentation.
# This doesn't work properly under Ruby >= 1.9 and leaves cruft in the directories
# We can try again when 'puppet strings' hits the ground
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('1.9')
Rake::Task['rdoc:build'].invoke
end

# Rake::Task['publican:build'].invoke(@spec_file)

super
end

Expand Down
67 changes: 0 additions & 67 deletions build/rake_helpers/rdoc.rake

This file was deleted.

33 changes: 19 additions & 14 deletions build/simp-doc.spec
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
%define publican_lang en-US
%define simp_major_version 5

Summary: SIMP Documentation
Name: simp-doc
Version: 5.1.0
Release: Alpha
Release: Beta2
License: Apache License, Version 2.0
Group: Documentation
Source: %{name}-%{version}-%{release}.tar.gz
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Buildarch: noarch
Requires: links
BuildRequires: publican >= 2.1

BuildRequires: sphinx >= 1.2
BuildRequires: python-sphinx >= 0
Prefix: /usr/share/doc/simp-%{version}

%description
Expand All @@ -25,25 +25,22 @@ command 'simp doc'. Alternatively, a PDF is provided in
%setup

%build
cd publican
publican build --formats=html,html-single,pdf --langs=%{publican_lang}
cd -
sphinx-build -n -t simp_%{simp_major_version} -b html -d sphinx_cache docs %{simp_major_version}/html
sphinx-build -E -n -t simp_%{simp_major_version} -b singlehtml -d sphinx_cache docs %{simp_major_version}/html-single

%install
mkdir -p %{buildroot}%{prefix}
src_dirs="changelogs Changelog.txt examples ldifs html upgrade_utils"

src_dirs="changelogs Changelog.txt ldifs html"
for dir in $src_dirs; do
if [ -e $dir ]; then
cp -r $dir %{buildroot}%{prefix}
fi
done

# Publican Material
mkdir -p %{buildroot}%{prefix}/html/users_guide
cp -r "build_docs/%{publican_lang}/html" %{buildroot}%{prefix}/html/users_guide
cp -r "build_docs/%{publican_lang}/html-single" %{buildroot}%{prefix}/html/users_guide
cp -r "build_docs/%{publican_lang}/pdf" %{buildroot}%{prefix}
mkdir -p %{buildroot}%{prefix}/html
cp -r "%{simp_major_version}/html" %{buildroot}%{prefix}/html
cp -r "%{simp_major_version}/html-single" %{buildroot}%{prefix}/html-single

chmod -R u=rwX,g=rX,o=rX %{buildroot}%{prefix}

Expand All @@ -62,6 +59,14 @@ chmod -R u=rwX,g=rX,o=rX %{buildroot}%{prefix}
# Post uninstall stuff

%changelog
* Fri Jul 31 2015 Judy Johnson <judy.johnson@onyxpoint.com> - 5.1.0-Beta2
- ReStructured Text!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- And things.

* Wed Mar 11 2015 Trevor Vaughan <tvaughan@onyxpoint.com> - 5.1.0-Alpha
- Added text to cover the move to the new Puppet Server and the migration to
Environments.
Expand All @@ -86,5 +91,5 @@ chmod -R u=rwX,g=rX,o=rX %{buildroot}%{prefix}
- Added a script for converting LDAP users to InetOrgPerson entries
and updated the LDIFs to account for such.

* Fri Nov 25 2013 Trevor Vaughan <tvaughan@onyxpoint.com> - 4.1.0-Alpha2
* Mon Nov 25 2013 Trevor Vaughan <tvaughan@onyxpoint.com> - 4.1.0-Alpha2
- First release of 4.1.0-Alpha2
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
# The short X.Y version.
version = '5'
# The full version, including alpha/beta/rc tags.
release = '1-Beta'
release = '1-Beta2'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down Expand Up @@ -113,7 +113,7 @@

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'classic'
# html_theme = 'classic'

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
Expand Down

0 comments on commit 1acb763

Please sign in to comment.