[nickle/f17] Build and package tutorial PDF

Michel Alexandre Salim salimma at fedoraproject.org
Sat Nov 10 16:57:54 UTC 2012


commit 936f81a7e5791a663535b6aefc27ed58f77868c8
Author: Michel Alexandre Salim <salimma at fedoraproject.org>
Date:   Sat Nov 10 23:20:33 2012 +0700

    Build and package tutorial PDF

 nickle-2.77-tutorial_sgml_fix.patch |   41 +++++++++++++++++++++++++++++++++++
 nickle.spec                         |   21 +++++++++++++++--
 2 files changed, 59 insertions(+), 3 deletions(-)
---
diff --git a/nickle-2.77-tutorial_sgml_fix.patch b/nickle-2.77-tutorial_sgml_fix.patch
new file mode 100644
index 0000000..81c12cc
--- /dev/null
+++ b/nickle-2.77-tutorial_sgml_fix.patch
@@ -0,0 +1,41 @@
+From 1e29f3df828ec68ca7b4556e9b1bb830c8afbb4b Mon Sep 17 00:00:00 2001
+From: Keith Packard <keithp at keithp.com>
+Date: Fri, 9 Nov 2012 21:35:40 -0800
+Subject: [PATCH] tutorial: Close a couple of SGML tags
+
+nsgmls found a couple of unclosed tags which may make some versions
+of docbook tools unhappy.
+
+Signed-off-by: Keith Packard <keithp at keithp.com>
+---
+ doc/tutorial/advanced/concurrency.sgml | 1 +
+ doc/tutorial/intro/variables.sgml      | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/doc/tutorial/advanced/concurrency.sgml b/doc/tutorial/advanced/concurrency.sgml
+index e60da32..8d4bcbc 100644
+--- a/doc/tutorial/advanced/concurrency.sgml
++++ b/doc/tutorial/advanced/concurrency.sgml
+@@ -222,6 +222,7 @@ void signal ( semaphore s )
+ <literal>wait</literal> merely decrements the count of <literal>s</literal>, which starts with the initial value specified by <literal>new</literal>.
+ If the count, after the decrement, is positive, the thread continues to run; if it is negative, it blocks until the count becomes positive again.
+ This will occur when one of the running threads calls <literal>signal</literal>, which increments the count of <literal>s</literal> and wakes up another thread if any are waiting.
++</para>
+ </sect3>
+ 
+ <sect3><title>Negative initial counts</title>
+diff --git a/doc/tutorial/intro/variables.sgml b/doc/tutorial/intro/variables.sgml
+index 5274baf..add93f2 100644
+--- a/doc/tutorial/intro/variables.sgml
++++ b/doc/tutorial/intro/variables.sgml
+@@ -298,6 +298,7 @@ separate key from value.  Eliding the key specifies the
+ "default" value -- used to instantiate newly created elements in the hash.
+ </para>
+ 
++</sect3>
+ <sect3><title>Pointers</title>
+ <para>
+ Pointers hold a reference to a separate object; multiple pointers may point at the same object and changes to the referenced object are reflected both in the underlying object as well as in any other references to the same object.
+-- 
+1.8.0
+
diff --git a/nickle.spec b/nickle.spec
index 76e32e3..379512c 100644
--- a/nickle.spec
+++ b/nickle.spec
@@ -1,12 +1,13 @@
 Name:    nickle
 Version: 2.77
-Release: 1%{?dist}
+Release: 2%{?dist}
 Summary: A programming language-based prototyping environment
 
 Group:   Development/Languages
 License: MIT
 URL:     http://nickle.org
 Source0: http://nickle.org/release/nickle-%{version}.tar.gz
+Patch0:  %{name}-2.77-tutorial_sgml_fix.patch
 %if 0%{?rhel} <= 5
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 %endif
@@ -14,6 +15,12 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires: bison
 BuildRequires: ncurses-devel
 BuildRequires: readline-devel
+# for documentation
+BuildRequires: docbook-utils-pdf
+%if 0%{?fedora} >= 18
+BuildRequires: texlive-collection-fontsrecommended
+BuildRequires: texlive-collection-htmlxml
+%endif
 
 %description
 Nickle is a programming language based prototyping environment with
@@ -39,12 +46,16 @@ Requires: %{name} = %{version}-%{release}
 Include files for Nickle, used for building external FFI (foreign
 function interface) libraries (e.g. the Cairo interface for Nickle).
 
+
 %prep
 %setup -q
+%patch0 -p1 -b .tutorial_sgml_fix
 
 
 %build
-%configure
+# we will install documentation ourselves,
+# but this saves having to delete the ones installed by 'make install'
+%configure --docdir=%{_defaultdocdir}/%{name}-%{version}
 make %{?_smp_flags}
 
 
@@ -71,7 +82,8 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(-,root,root,-)
-%doc README README.name COPYING AUTHORS debian/changelog TODO examples
+%doc README README.name COPYING AUTHORS debian/changelog TODO
+%doc examples doc/tutorial/nickle-tutorial.pdf
 %{_bindir}/nickle
 %{_datadir}/nickle/
 %exclude %{_datadir}/nickle/COPYING
@@ -83,6 +95,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_includedir}/nickle
 
 %changelog
+* Sat Nov 10 2012 Michel Salim <salimma at fedoraproject.org> - 2.77-2
+- Build and package tutorial PDF
+
 * Fri Nov  9 2012 Michel Salim <salimma at fedoraproject.org> - 2.77-1
 - Update to 2.77
 


More information about the scm-commits mailing list