[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. -->
|
---|
[7db3be7] | 55 | <!-- See blfs-tool.xsl for exsl:document examples -->
|
---|
[1f10495] | 56 | <exsl:document href="{$insert_order}01-dummy" method="text">
|
---|
| 57 | <xsl:call-template name="header"/>
|
---|
| 58 | <xsl:text>
|
---|
| 59 | PKG_PHASE=dummy
|
---|
| 60 | PACKAGE=dummy
|
---|
| 61 | VERSION=0.0.0
|
---|
| 62 | TARBALL=dummy-0.0.0.tar.bz2
|
---|
[7db3be7] | 63 | DOWNLOAD=http://www.example.com/sources/dummy-0.0.0.tar.bz2
|
---|
| 64 | MD5SUM=b0c2f10c23b1d529725c8f9c693858cf
|
---|
| 65 |
|
---|
| 66 | PATCH="http://www.example.com/sources/dummy-0.0.0.fix1.patch 65c913efccffda4b9dc66e9002e8516e"
|
---|
| 67 | PATCH="http://www.example.com/sources/dummy-0.0.0.fix2.patch fb411aae8d1eb8a733bb1def9266f2ba"
|
---|
[1f10495] | 68 | </xsl:text>
|
---|
| 69 | <xsl:call-template name="disk_usage"/>
|
---|
| 70 | <xsl:call-template name="unpack"/>
|
---|
| 71 | <xsl:text>
|
---|
| 72 | cd $PKGDIR
|
---|
| 73 | ./configure --prefix=/usr
|
---|
| 74 | make
|
---|
| 75 | make check
|
---|
| 76 | make install
|
---|
| 77 | </xsl:text>
|
---|
| 78 | <xsl:call-template name="disk_usage"/>
|
---|
| 79 | <xsl:call-template name="clean_sources"/>
|
---|
| 80 | <xsl:call-template name="footer"/>
|
---|
| 81 | </exsl:document>
|
---|
| 82 | </xsl:if>
|
---|
| 83 | </xsl:template>
|
---|
| 84 |
|
---|
| 85 |
|
---|
| 86 | <!-- Hock for inserting scripts after a selected one -->
|
---|
| 87 | <xsl:template name="insert_script_after">
|
---|
| 88 | <!-- Inherited values -->
|
---|
| 89 | <xsl:param name="reference" select="foo"/>
|
---|
| 90 | <xsl:param name="order" select="foo"/>
|
---|
| 91 | <!-- Added a string to be sure that this scripts are run
|
---|
| 92 | after the selected one -->
|
---|
| 93 | <xsl:variable name="insert_order" select="concat($order,'_z')"/>
|
---|
| 94 | <!-- Add an xsl:if block for each referenced sect1 you want
|
---|
| 95 | to insert scripts after -->
|
---|
| 96 | <xsl:if test="$reference = 'ID_of_selected_sect1'">
|
---|
| 97 | <!-- Add an exsl:document block for each script to be inserted
|
---|
| 98 | at this point of the build. This one is only a dummy example. -->
|
---|
[7db3be7] | 99 | <!-- See blfs-tool.xsl for exsl:document examples -->
|
---|
[1f10495] | 100 | <exsl:document href="{$insert_order}01-dummy" method="text">
|
---|
| 101 | <xsl:call-template name="header"/>
|
---|
| 102 | <xsl:text>
|
---|
| 103 | PKG_PHASE=dummy
|
---|
| 104 | PACKAGE=dummy
|
---|
| 105 | VERSION=0.0.0
|
---|
| 106 | TARBALL=dummy-0.0.0.tar.bz2
|
---|
[7db3be7] | 107 | DOWNLOAD=http://www.example.com/sources/dummy-0.0.0.tar.bz2
|
---|
| 108 | MD5SUM=b0c2f10c23b1d529725c8f9c693858cf
|
---|
| 109 |
|
---|
| 110 | PATCH="http://www.example.com/sources/dummy-0.0.0.fix1.patch 65c913efccffda4b9dc66e9002e8516e"
|
---|
| 111 | PATCH="http://www.example.com/sources/dummy-0.0.0.fix2.patch fb411aae8d1eb8a733bb1def9266f2ba"
|
---|
[1f10495] | 112 | </xsl:text>
|
---|
| 113 | <xsl:call-template name="disk_usage"/>
|
---|
| 114 | <xsl:call-template name="unpack"/>
|
---|
| 115 | <xsl:text>
|
---|
| 116 | cd $PKGDIR
|
---|
| 117 | ./configure --prefix=/usr
|
---|
| 118 | make
|
---|
| 119 | make check
|
---|
| 120 | make install
|
---|
| 121 | </xsl:text>
|
---|
| 122 | <xsl:call-template name="disk_usage"/>
|
---|
| 123 | <xsl:call-template name="clean_sources"/>
|
---|
| 124 | <xsl:call-template name="footer"/>
|
---|
| 125 | </exsl:document>
|
---|
| 126 | </xsl:if>
|
---|
| 127 | </xsl:template>
|
---|
| 128 |
|
---|
| 129 |
|
---|
| 130 | <!-- ######################################################################## -->
|
---|
| 131 |
|
---|
| 132 | <!-- ########## TEMPLATES TO SELECT THE MODE USED ON SCREEN BLOCKS ########## -->
|
---|
| 133 |
|
---|
| 134 | <!-- NOTE: Testsuites commands are handled on the master stylesheets -->
|
---|
| 135 |
|
---|
| 136 |
|
---|
| 137 | <!-- userinput @remap='pre' -->
|
---|
| 138 | <xsl:template match="userinput[@remap='pre']">
|
---|
| 139 | <xsl:apply-templates select="." mode="pre"/>
|
---|
| 140 | </xsl:template>
|
---|
| 141 |
|
---|
| 142 |
|
---|
| 143 | <!-- userinput @remap='configure' -->
|
---|
| 144 | <xsl:template match="userinput[@remap='configure']">
|
---|
| 145 | <xsl:apply-templates select="." mode="configure"/>
|
---|
| 146 | </xsl:template>
|
---|
| 147 |
|
---|
| 148 |
|
---|
| 149 | <!-- userinput @remap='make' -->
|
---|
| 150 | <xsl:template match="userinput[@remap='make']">
|
---|
| 151 | <xsl:apply-templates select="." mode="make"/>
|
---|
| 152 | </xsl:template>
|
---|
| 153 |
|
---|
| 154 |
|
---|
| 155 | <!-- userinput @remap='install' -->
|
---|
| 156 | <xsl:template match="userinput[@remap='install']">
|
---|
| 157 | <xsl:apply-templates select="." mode="install"/>
|
---|
| 158 | </xsl:template>
|
---|
| 159 |
|
---|
| 160 |
|
---|
| 161 | <!-- userinput @remap='adjust' -->
|
---|
| 162 | <xsl:template match="userinput[@remap='adjust']">
|
---|
| 163 | <xsl:apply-templates select="." mode="adjust"/>
|
---|
| 164 | </xsl:template>
|
---|
| 165 |
|
---|
| 166 |
|
---|
| 167 | <!-- userinput @remap='locale-full' -->
|
---|
| 168 | <xsl:template match="userinput[@remap='locale-full']">
|
---|
| 169 | <xsl:apply-templates select="." mode="locale-full"/>
|
---|
| 170 | </xsl:template>
|
---|
| 171 |
|
---|
| 172 |
|
---|
| 173 |
|
---|
| 174 | <!-- userinput without @remap -->
|
---|
| 175 | <xsl:template match="userinput">
|
---|
| 176 | <xsl:choose>
|
---|
| 177 | <xsl:when test="ancestor::sect2[@role='configuration']">
|
---|
| 178 | <xsl:apply-templates select="." mode="configuration_section"/>
|
---|
| 179 | </xsl:when>
|
---|
| 180 | <xsl:otherwise>
|
---|
| 181 | <xsl:apply-templates select="." mode="no_remap"/>
|
---|
| 182 | </xsl:otherwise>
|
---|
| 183 | </xsl:choose>
|
---|
| 184 | </xsl:template>
|
---|
| 185 |
|
---|
| 186 |
|
---|
| 187 | <!-- ######################################################################## -->
|
---|
| 188 |
|
---|
| 189 | <!-- ############## STOCK MODE TEMPLATES USED ON SCREEN BLOCKS ############## -->
|
---|
| 190 |
|
---|
[9ba7afe] | 191 | <!-- NOTE: You can use this modes or create you own ones -->
|
---|
[1f10495] | 192 |
|
---|
| 193 |
|
---|
| 194 | <!-- mode pre -->
|
---|
| 195 | <xsl:template match="userinput" mode="pre">
|
---|
| 196 | <xsl:apply-templates select="." mode="default"/>
|
---|
| 197 | </xsl:template>
|
---|
| 198 |
|
---|
| 199 |
|
---|
| 200 | <!-- mode configure -->
|
---|
| 201 | <xsl:template match="userinput" mode="configure">
|
---|
| 202 | <xsl:apply-templates select="." mode="default"/>
|
---|
| 203 | </xsl:template>
|
---|
| 204 |
|
---|
| 205 |
|
---|
| 206 | <!-- mode make -->
|
---|
| 207 | <xsl:template match="userinput" mode="make">
|
---|
| 208 | <xsl:apply-templates select="." mode="default"/>
|
---|
| 209 | </xsl:template>
|
---|
| 210 |
|
---|
| 211 |
|
---|
| 212 | <!-- mode install -->
|
---|
| 213 | <xsl:template match="userinput" mode="install">
|
---|
| 214 | <xsl:apply-templates select="." mode="default"/>
|
---|
| 215 | </xsl:template>
|
---|
| 216 |
|
---|
| 217 |
|
---|
| 218 | <!-- mode adjust -->
|
---|
| 219 | <xsl:template match="userinput" mode="adjust">
|
---|
| 220 | <xsl:apply-templates select="." mode="default"/>
|
---|
| 221 | </xsl:template>
|
---|
| 222 |
|
---|
| 223 |
|
---|
| 224 | <!-- mode locale-full -->
|
---|
| 225 | <xsl:template match="userinput" mode="locale-full">
|
---|
| 226 | <xsl:apply-templates select="." mode="default"/>
|
---|
| 227 | </xsl:template>
|
---|
| 228 |
|
---|
| 229 |
|
---|
| 230 | <!-- mode configuration_section -->
|
---|
| 231 | <xsl:template match="userinput" mode="configuration_section">
|
---|
| 232 | <xsl:apply-templates select="." mode="default"/>
|
---|
| 233 | </xsl:template>
|
---|
| 234 |
|
---|
| 235 |
|
---|
| 236 | <!-- mode no_remap -->
|
---|
| 237 | <xsl:template match="userinput" mode="no_remap">
|
---|
| 238 | <xsl:apply-templates select="." mode="default"/>
|
---|
| 239 | </xsl:template>
|
---|
| 240 |
|
---|
| 241 |
|
---|
| 242 | <!-- mode default -->
|
---|
| 243 | <xsl:template match="userinput" mode="default">
|
---|
| 244 | <xsl:apply-templates/>
|
---|
| 245 | </xsl:template>
|
---|
| 246 |
|
---|
| 247 | </xsl:stylesheet>
|
---|