[1f10495] | 1 | <?xml version="1.0"?>
|
---|
| 2 |
|
---|
| 3 | <!-- $Id$ -->
|
---|
| 4 |
|
---|
| 5 | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
---|
| 6 | xmlns:exsl="http://exslt.org/common"
|
---|
| 7 | extension-element-prefixes="exsl"
|
---|
| 8 | version="1.0">
|
---|
| 9 |
|
---|
| 10 | <!-- Base system build customization templates.
|
---|
| 11 | This is a collection of free non-book dependant templates that can be
|
---|
| 12 | used to customize the build scripts content, how each of the base system
|
---|
| 13 | packages is build, or to insert scripts into the system build flow.
|
---|
| 14 | Don't edit the templates directly here, this file is only for reference
|
---|
[9ba7afe] | 15 | and your changes will be lost if updating the jhalfs code.
|
---|
[1f10495] | 16 | Select what of them you need and place it into you customization layout.-->
|
---|
| 17 |
|
---|
| 18 |
|
---|
| 19 | <!-- ########## TEMPLATES TO INSERT CODE AND TO ADD EXTRA SCRIPTS ########## -->
|
---|
| 20 |
|
---|
| 21 | <!-- Hock to insert extra code after the logs date timestamp dump and
|
---|
| 22 | before the envars settings -->
|
---|
| 23 | <xsl:template name="user_header">
|
---|
| 24 | <xsl:text>
</xsl:text>
|
---|
| 25 | </xsl:template>
|
---|
| 26 |
|
---|
| 27 |
|
---|
| 28 | <!-- Hock to add envars or extra commands after unpacking the tarball
|
---|
| 29 | but before cd into the sources dir -->
|
---|
| 30 | <xsl:template name="user_pre_commands">
|
---|
| 31 | <xsl:text>
</xsl:text>
|
---|
| 32 | </xsl:template>
|
---|
| 33 |
|
---|
| 34 |
|
---|
| 35 | <!-- Hock for commands additions after the book commands but before
|
---|
| 36 | removing sources dir -->
|
---|
| 37 | <xsl:template name="user_footer">
|
---|
| 38 | <xsl:text>
</xsl:text>
|
---|
| 39 | </xsl:template>
|
---|
| 40 |
|
---|
| 41 |
|
---|
| 42 | <!-- Hock for inserting scripts before a selected one -->
|
---|
| 43 | <xsl:template name="insert_script_before">
|
---|
| 44 | <!-- Inherited values -->
|
---|
| 45 | <xsl:param name="reference" select="foo"/>
|
---|
| 46 | <xsl:param name="order" select="foo"/>
|
---|
| 47 | <!-- Added a string to be sure that this scripts are run
|
---|
| 48 | before the selected one -->
|
---|
| 49 | <xsl:variable name="insert_order" select="concat($order,'_0')"/>
|
---|
| 50 | <!-- Add an xsl:if block for each referenced sect1 you want
|
---|
| 51 | to insert scripts before -->
|
---|
| 52 | <xsl:if test="$reference = 'ID_of_selected_sect1'">
|
---|
| 53 | <!-- Add an exsl:document block for each script to be inserted
|
---|
| 54 | at this point of the build. This one is only a dummy example. -->
|
---|
| 55 | <exsl:document href="{$insert_order}01-dummy" method="text">
|
---|
| 56 | <xsl:call-template name="header"/>
|
---|
| 57 | <xsl:text>
|
---|
| 58 | PKG_PHASE=dummy
|
---|
| 59 | PACKAGE=dummy
|
---|
| 60 | VERSION=0.0.0
|
---|
| 61 | TARBALL=dummy-0.0.0.tar.bz2
|
---|
| 62 | </xsl:text>
|
---|
| 63 | <xsl:call-template name="disk_usage"/>
|
---|
| 64 | <xsl:call-template name="unpack"/>
|
---|
| 65 | <xsl:text>
|
---|
| 66 | cd $PKGDIR
|
---|
| 67 | ./configure --prefix=/usr
|
---|
| 68 | make
|
---|
| 69 | make check
|
---|
| 70 | make install
|
---|
| 71 | </xsl:text>
|
---|
| 72 | <xsl:call-template name="disk_usage"/>
|
---|
| 73 | <xsl:call-template name="clean_sources"/>
|
---|
| 74 | <xsl:call-template name="footer"/>
|
---|
| 75 | </exsl:document>
|
---|
| 76 | </xsl:if>
|
---|
| 77 | </xsl:template>
|
---|
| 78 |
|
---|
| 79 |
|
---|
| 80 | <!-- Hock for inserting scripts after a selected one -->
|
---|
| 81 | <xsl:template name="insert_script_after">
|
---|
| 82 | <!-- Inherited values -->
|
---|
| 83 | <xsl:param name="reference" select="foo"/>
|
---|
| 84 | <xsl:param name="order" select="foo"/>
|
---|
| 85 | <!-- Added a string to be sure that this scripts are run
|
---|
| 86 | after the selected one -->
|
---|
| 87 | <xsl:variable name="insert_order" select="concat($order,'_z')"/>
|
---|
| 88 | <!-- Add an xsl:if block for each referenced sect1 you want
|
---|
| 89 | to insert scripts after -->
|
---|
| 90 | <xsl:if test="$reference = 'ID_of_selected_sect1'">
|
---|
| 91 | <!-- Add an exsl:document block for each script to be inserted
|
---|
| 92 | at this point of the build. This one is only a dummy example. -->
|
---|
| 93 | <exsl:document href="{$insert_order}01-dummy" method="text">
|
---|
| 94 | <xsl:call-template name="header"/>
|
---|
| 95 | <xsl:text>
|
---|
| 96 | PKG_PHASE=dummy
|
---|
| 97 | PACKAGE=dummy
|
---|
| 98 | VERSION=0.0.0
|
---|
| 99 | TARBALL=dummy-0.0.0.tar.bz2
|
---|
| 100 | </xsl:text>
|
---|
| 101 | <xsl:call-template name="disk_usage"/>
|
---|
| 102 | <xsl:call-template name="unpack"/>
|
---|
| 103 | <xsl:text>
|
---|
| 104 | cd $PKGDIR
|
---|
| 105 | ./configure --prefix=/usr
|
---|
| 106 | make
|
---|
| 107 | make check
|
---|
| 108 | make install
|
---|
| 109 | </xsl:text>
|
---|
| 110 | <xsl:call-template name="disk_usage"/>
|
---|
| 111 | <xsl:call-template name="clean_sources"/>
|
---|
| 112 | <xsl:call-template name="footer"/>
|
---|
| 113 | </exsl:document>
|
---|
| 114 | </xsl:if>
|
---|
| 115 | </xsl:template>
|
---|
| 116 |
|
---|
| 117 |
|
---|
| 118 | <!-- ######################################################################## -->
|
---|
| 119 |
|
---|
| 120 | <!-- ########## TEMPLATES TO SELECT THE MODE USED ON SCREEN BLOCKS ########## -->
|
---|
| 121 |
|
---|
| 122 | <!-- NOTE: Testsuites commands are handled on the master stylesheets -->
|
---|
| 123 |
|
---|
| 124 |
|
---|
| 125 | <!-- userinput @remap='pre' -->
|
---|
| 126 | <xsl:template match="userinput[@remap='pre']">
|
---|
| 127 | <xsl:apply-templates select="." mode="pre"/>
|
---|
| 128 | </xsl:template>
|
---|
| 129 |
|
---|
| 130 |
|
---|
| 131 | <!-- userinput @remap='configure' -->
|
---|
| 132 | <xsl:template match="userinput[@remap='configure']">
|
---|
| 133 | <xsl:apply-templates select="." mode="configure"/>
|
---|
| 134 | </xsl:template>
|
---|
| 135 |
|
---|
| 136 |
|
---|
| 137 | <!-- userinput @remap='make' -->
|
---|
| 138 | <xsl:template match="userinput[@remap='make']">
|
---|
| 139 | <xsl:apply-templates select="." mode="make"/>
|
---|
| 140 | </xsl:template>
|
---|
| 141 |
|
---|
| 142 |
|
---|
| 143 | <!-- userinput @remap='install' -->
|
---|
| 144 | <xsl:template match="userinput[@remap='install']">
|
---|
| 145 | <xsl:apply-templates select="." mode="install"/>
|
---|
| 146 | </xsl:template>
|
---|
| 147 |
|
---|
| 148 |
|
---|
| 149 | <!-- userinput @remap='adjust' -->
|
---|
| 150 | <xsl:template match="userinput[@remap='adjust']">
|
---|
| 151 | <xsl:apply-templates select="." mode="adjust"/>
|
---|
| 152 | </xsl:template>
|
---|
| 153 |
|
---|
| 154 |
|
---|
| 155 | <!-- userinput @remap='locale-full' -->
|
---|
| 156 | <xsl:template match="userinput[@remap='locale-full']">
|
---|
| 157 | <xsl:apply-templates select="." mode="locale-full"/>
|
---|
| 158 | </xsl:template>
|
---|
| 159 |
|
---|
| 160 |
|
---|
| 161 |
|
---|
| 162 | <!-- userinput without @remap -->
|
---|
| 163 | <xsl:template match="userinput">
|
---|
| 164 | <xsl:choose>
|
---|
| 165 | <xsl:when test="ancestor::sect2[@role='configuration']">
|
---|
| 166 | <xsl:apply-templates select="." mode="configuration_section"/>
|
---|
| 167 | </xsl:when>
|
---|
| 168 | <xsl:otherwise>
|
---|
| 169 | <xsl:apply-templates select="." mode="no_remap"/>
|
---|
| 170 | </xsl:otherwise>
|
---|
| 171 | </xsl:choose>
|
---|
| 172 | </xsl:template>
|
---|
| 173 |
|
---|
| 174 |
|
---|
| 175 | <!-- ######################################################################## -->
|
---|
| 176 |
|
---|
| 177 | <!-- ############## STOCK MODE TEMPLATES USED ON SCREEN BLOCKS ############## -->
|
---|
| 178 |
|
---|
[9ba7afe] | 179 | <!-- NOTE: You can use this modes or create you own ones -->
|
---|
[1f10495] | 180 |
|
---|
| 181 |
|
---|
| 182 | <!-- mode pre -->
|
---|
| 183 | <xsl:template match="userinput" mode="pre">
|
---|
| 184 | <xsl:apply-templates select="." mode="default"/>
|
---|
| 185 | </xsl:template>
|
---|
| 186 |
|
---|
| 187 |
|
---|
| 188 | <!-- mode configure -->
|
---|
| 189 | <xsl:template match="userinput" mode="configure">
|
---|
| 190 | <xsl:apply-templates select="." mode="default"/>
|
---|
| 191 | </xsl:template>
|
---|
| 192 |
|
---|
| 193 |
|
---|
| 194 | <!-- mode make -->
|
---|
| 195 | <xsl:template match="userinput" mode="make">
|
---|
| 196 | <xsl:apply-templates select="." mode="default"/>
|
---|
| 197 | </xsl:template>
|
---|
| 198 |
|
---|
| 199 |
|
---|
| 200 | <!-- mode install -->
|
---|
| 201 | <xsl:template match="userinput" mode="install">
|
---|
| 202 | <xsl:apply-templates select="." mode="default"/>
|
---|
| 203 | </xsl:template>
|
---|
| 204 |
|
---|
| 205 |
|
---|
| 206 | <!-- mode adjust -->
|
---|
| 207 | <xsl:template match="userinput" mode="adjust">
|
---|
| 208 | <xsl:apply-templates select="." mode="default"/>
|
---|
| 209 | </xsl:template>
|
---|
| 210 |
|
---|
| 211 |
|
---|
| 212 | <!-- mode locale-full -->
|
---|
| 213 | <xsl:template match="userinput" mode="locale-full">
|
---|
| 214 | <xsl:apply-templates select="." mode="default"/>
|
---|
| 215 | </xsl:template>
|
---|
| 216 |
|
---|
| 217 |
|
---|
| 218 | <!-- mode configuration_section -->
|
---|
| 219 | <xsl:template match="userinput" mode="configuration_section">
|
---|
| 220 | <xsl:apply-templates select="." mode="default"/>
|
---|
| 221 | </xsl:template>
|
---|
| 222 |
|
---|
| 223 |
|
---|
| 224 | <!-- mode no_remap -->
|
---|
| 225 | <xsl:template match="userinput" mode="no_remap">
|
---|
| 226 | <xsl:apply-templates select="." mode="default"/>
|
---|
| 227 | </xsl:template>
|
---|
| 228 |
|
---|
| 229 |
|
---|
| 230 | <!-- mode default -->
|
---|
| 231 | <xsl:template match="userinput" mode="default">
|
---|
| 232 | <xsl:apply-templates/>
|
---|
| 233 | </xsl:template>
|
---|
| 234 |
|
---|
| 235 | </xsl:stylesheet>
|
---|