Author: bdubbs
Date: 2011-10-07 20:12:06 -0600 (Fri, 07 Oct 2011)
New Revision: 9618

Added:
   trunk/BOOK/stylesheets/md5sum.xsl
Modified:
   trunk/BOOK/Makefile
   trunk/BOOK/bootscripts/Makefile
   trunk/BOOK/chapter01/changelog.xml
   trunk/BOOK/packages.ent
Log:
Miror update to bootscripts Makefile.
Add capability in main Makefile to create md5sum file.


Modified: trunk/BOOK/Makefile
===================================================================
--- trunk/BOOK/Makefile 2011-10-07 19:17:11 UTC (rev 9617)
+++ trunk/BOOK/Makefile 2011-10-08 02:12:06 UTC (rev 9618)
@@ -103,6 +103,17 @@
        $(Q)xsltproc --xinclude --nonet --output $(BASEDIR)/wget-list \
          stylesheets/wget-list.xsl chapter03/chapter03.xml
 
+md5sums:
+       @echo "Generating md5sum file..."
+       $(Q)mkdir -p $(BASEDIR)
+       $(Q)xsltproc --xinclude --nonet --output $(BASEDIR)/md5sums \
+         stylesheets/md5sum.xsl chapter03/chapter03.xml
+       $(Q)sed -i -e "s/BOOTSCRIPTS-MD5SUM/$(shell md5sum 
lfs-bootscripts*.tar.bz2 | cut -d' ' -f1)/" \
+      $(BASEDIR)/md5sums
+       $(Q)sed -i -e "s/UDEV-MD5SUM/$(shell md5sum udev-config*.tar.bz2 | cut 
-d' ' -f1)/" \
+      $(BASEDIR)/md5sums
+
+
 dump-commands: validxml
        @echo "Dumping book commands..."
        $(Q)xsltproc --output $(DUMPDIR)/ \
@@ -111,7 +122,7 @@
 validate: maketar validxml
        @echo "Validation complete."
 
-all: lfs nochunks pdf dump-commands
+all: lfs nochunks pdf dump-commands md5sums
 
 .PHONY : all dump-commands lfs nochunks pdf profile-html tmpdir validate \
-        validxml wget-list maketar
+        validxml wget-list maketar md5sums

Modified: trunk/BOOK/bootscripts/Makefile
===================================================================
--- trunk/BOOK/bootscripts/Makefile     2011-10-07 19:17:11 UTC (rev 9617)
+++ trunk/BOOK/bootscripts/Makefile     2011-10-08 02:12:06 UTC (rev 9618)
@@ -21,7 +21,9 @@
        install -d -m ${DIRMODE}  ${EXTDIR}/rc.d/rcS.d
        install -d -m ${DIRMODE}  ${EXTDIR}/rc.d/init.d
        install -d -m ${DIRMODE}  ${EXTDIR}/sysconfig
-       install -d -m ${DIRMODE}  ${LIBDIR}
+       install -d -m ${DIRMODE}  ${EXTDIR}/sysconfig
+       install -d -m ${DIRMODE}  ${MAN8}
+       install -d -m ${DIRMODE}  ${SBIN}
        ln -svf       services    ${DESTDIR}/lib/lsb
        ln -sf        rc.d/init.d ${EXTDIR}/init.d
 

Modified: trunk/BOOK/chapter01/changelog.xml
===================================================================
--- trunk/BOOK/chapter01/changelog.xml  2011-10-07 19:17:11 UTC (rev 9617)
+++ trunk/BOOK/chapter01/changelog.xml  2011-10-08 02:12:06 UTC (rev 9618)
@@ -39,6 +39,11 @@
     <listitem>
       <para>2011-10-07</para>
       <itemizedlist>
+      <listitem>
+          <para>[bdubbs] - Miror update to bootscripts Makefile. Fixes
+          <ulink url="&lfs-ticket-root;2939">#2939</ulink>.
+          </para>
+        </listitem>
         <listitem>
           <para>[matthew] - Remove Pkg-Config, and its dependencies PCRE and
           Glib.  E2fsprogs, Man-DB and Udev can all be built without 
Pkg-Config,

Modified: trunk/BOOK/packages.ent
===================================================================
--- trunk/BOOK/packages.ent     2011-10-07 19:17:11 UTC (rev 9617)
+++ trunk/BOOK/packages.ent     2011-10-08 02:12:06 UTC (rev 9618)
@@ -290,7 +290,7 @@
 <!ENTITY less-ch6-du "3.5 MB">
 <!ENTITY less-ch6-sbu "less than 0.1 SBU">
 
-<!ENTITY lfs-bootscripts-version "20111006">                 <!-- Scripts 
depend on this format -->
+<!ENTITY lfs-bootscripts-version "20111007">                 <!-- Scripts 
depend on this format -->
 <!ENTITY lfs-bootscripts-size "BOOTSCRIPTS-SIZE KB">         <!-- Updated in 
Makefile -->
 <!ENTITY lfs-bootscripts-url 
"&downloads-root;lfs-bootscripts-&lfs-bootscripts-version;.tar.bz2">
 <!ENTITY lfs-bootscripts-md5 "BOOTSCRIPTS-MD5SUM">           <!-- Updated in 
Makefile -->

Added: trunk/BOOK/stylesheets/md5sum.xsl
===================================================================
--- trunk/BOOK/stylesheets/md5sum.xsl                           (rev 0)
+++ trunk/BOOK/stylesheets/md5sum.xsl   2011-10-08 02:12:06 UTC (rev 9618)
@@ -0,0 +1,58 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+
+<!-- Create a md5 list for packages and pathces used. -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
+    version="1.0">
+
+  <xsl:output method="text"/>
+
+  <xsl:template match="/">
+    <xsl:apply-templates select="//ulink"/>
+  </xsl:template>
+
+  <xsl:template match="ulink">
+      <!-- If some package don't have the predefined strings in their
+      name, the next test must be fixed to match it also. Skip possible
+      duplicated URLs that may be split for PDF output -->
+    <xsl:if test="(contains( @url, '.tar.' ) or 
+                   contains( @url, '.tgz'  ) or 
+                   contains( @url, '.patch') ) and
+                   not( ancestor-or-self::*/@condition = 'pdf' )" >
+      <!-- Get the md5sum -->
+      <xsl:value-of select="../../para/literal"/>
+
+      <!-- Add two spaces -->
+      <xsl:text>  </xsl:text>
+
+      <!-- Get the basename -->
+      <xsl:call-template name="basename">
+        <xsl:with-param name="pathname" select="@url"/>
+      </xsl:call-template>
+
+      <!-- Add a newline -->
+      <xsl:text>&#x0a;</xsl:text>
+    
+    </xsl:if>
+  </xsl:template>
+
+  <xsl:template name="basename">
+    <xsl:param name="pathname"/>
+   
+    <xsl:choose>
+
+       <xsl:when test="contains( $pathname, '/' )" >
+          <xsl:call-template name="basename">
+            <xsl:with-param name="pathname" select="substring-after( 
$pathname, '/' )" />
+          </xsl:call-template>
+       </xsl:when>
+
+        <xsl:otherwise>
+          <xsl:value-of select="$pathname"/>
+        </xsl:otherwise>
+
+    </xsl:choose>
+  </xsl:template>
+
+</xsl:stylesheet>
+

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-book
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to