source: BLFS/xsl/gen_config.xsl@ fbdd1a8

2.4 ablfs-more legacy trunk
Last change on this file since fbdd1a8 was e576789, checked in by Pierre Labastie <pierre@…>, 11 years ago

Merge ablfs branch. Normally, jhalfs should not perform differently
for building LFS

  • Property mode set to 100644
File size: 5.0 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2
3<!-- $Id: gen_config.xsl 21 2012-02-16 15:06:19Z labastie $ -->
4
5<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
6 version="1.0">
7
8 <xsl:output method="text"
9 encoding='ISO-8859-1'/>
10
11 <xsl:template match="/">
12 <xsl:apply-templates select="//list"/>
13 <xsl:text>comment ""
14
15menu "Default package for resolving MTA dependency"
16
17choice
18 prompt "Mail server"
19 config MS_sendmail
20 bool "sendmail"
21 config MS_postfix
22 bool "postfix"
23 config MS_exim
24 bool "exim"
25endchoice
26config MAIL_SERVER
27 string
28 default sendmail if MS_sendmail
29 default postfix if MS_postfix
30 default exim if MS_exim
31
32endmenu
33
34choice
35 prompt "Dependency level"
36 default DEPLVL_2
37
38 config DEPLVL_1
39 bool "Required dependencies only"
40
41 config DEPLVL_2
42 bool "Required and recommended dependencies"
43
44 config DEPLVL_3
45 bool "Required, recommended and optional dependencies"
46
47endchoice
48config optDependency
49 int
50 default 1 if DEPLVL_1
51 default 2 if DEPLVL_2
52 default 3 if DEPLVL_3
53
54
55config SUDO
56 bool "Build as User"
57 default y
58 help
59 Select if sudo will be used (you build as a normal user)
60 otherwise sudo is not needed (you build as root)
61</xsl:text>
62 </xsl:template>
63
64 <xsl:template match="list">
65 <xsl:if
66 test=".//*[self::package or self::module]
67 [(version and not(inst-version)) or
68 string(version) != string(inst-version)]">
69 <xsl:text>config&#9;MENU_</xsl:text>
70 <xsl:value-of select="@id"/>
71 <xsl:text>
72bool&#9;"</xsl:text>
73 <xsl:value-of select="name"/>
74 <xsl:text>"
75default&#9;n
76
77menu "</xsl:text>
78 <xsl:value-of select="name"/>
79 <xsl:text>"
80depends MENU_</xsl:text>
81 <xsl:value-of select="@id"/>
82 <xsl:text>
83
84</xsl:text>
85 <xsl:apply-templates select="sublist"/>
86 <xsl:text>endmenu
87
88</xsl:text>
89 </xsl:if>
90 </xsl:template>
91
92 <xsl:template match="sublist">
93 <xsl:if
94 test=".//*[self::package or self::module]
95 [(version and not(inst-version)) or
96 string(version) != string(inst-version)]">
97 <xsl:text>&#9;config&#9;MENU_</xsl:text>
98 <xsl:value-of select="@id"/>
99 <xsl:text>
100&#9;bool&#9;"</xsl:text>
101 <xsl:value-of select="name"/>
102 <xsl:text>"
103&#9;default&#9;n
104
105&#9;menu "</xsl:text>
106 <xsl:value-of select="name"/>
107 <xsl:text>"
108&#9;depends MENU_</xsl:text>
109 <xsl:value-of select="@id"/>
110 <xsl:text>
111
112</xsl:text>
113 <xsl:apply-templates select="package"/>
114 <xsl:text>&#9;endmenu
115
116</xsl:text>
117 </xsl:if>
118 </xsl:template>
119
120 <xsl:template match="package">
121 <xsl:if
122 test="(version and not(inst-version)) or
123 string(version) != string(inst-version)">
124 <xsl:text>&#9;&#9;config&#9;CONFIG_</xsl:text>
125 <xsl:value-of select="name"/>
126 <xsl:text>
127&#9;&#9;bool&#9;"</xsl:text>
128 <xsl:value-of select="name"/>
129 <xsl:text> </xsl:text>
130 <xsl:value-of select="version"/>
131 <xsl:if test="inst-version">
132 <xsl:text> [Installed </xsl:text>
133 <xsl:value-of select="inst-version"/>
134 <xsl:text>]</xsl:text>
135 </xsl:if>
136 <xsl:text>"
137&#9;&#9;default&#9;n
138
139</xsl:text>
140 </xsl:if>
141 <xsl:if
142 test="not(version) and ./module[not(inst-version) or
143 string(version) != string(inst-version)]">
144 <xsl:text>&#9;&#9;config&#9;MENU_</xsl:text>
145 <xsl:value-of select="translate(name,' ','_')"/>
146 <xsl:text>
147&#9;&#9;bool&#9;"</xsl:text>
148 <xsl:value-of select="name"/>
149 <xsl:text>"
150&#9;&#9;default&#9;n
151
152&#9;&#9;menu "</xsl:text>
153 <xsl:value-of select="name"/>
154 <xsl:text>"
155&#9;&#9;depends MENU_</xsl:text>
156 <xsl:value-of select="translate(name,' ','_')"/>
157 <xsl:text>
158
159</xsl:text>
160 <xsl:apply-templates select="module"/>
161 <xsl:text>&#9;&#9;endmenu
162
163</xsl:text>
164 </xsl:if>
165 </xsl:template>
166
167 <xsl:template match="module">
168 <xsl:if
169 test="not(inst-version) or
170 string(version) != string(inst-version)">
171 <xsl:text>&#9;&#9;&#9;config&#9;CONFIG_</xsl:text>
172 <xsl:value-of select="name"/>
173 <xsl:text>
174&#9;&#9;&#9;bool&#9;"</xsl:text>
175 <xsl:value-of select="name"/>
176 <xsl:text> </xsl:text>
177 <xsl:value-of select="version"/>
178 <xsl:if test="inst-version">
179 <xsl:text> [Installed </xsl:text>
180 <xsl:value-of select="inst-version"/>
181 <xsl:text>]</xsl:text>
182 </xsl:if>
183 <xsl:text>"
184&#9;&#9;&#9;default&#9;</xsl:text>
185 <xsl:choose>
186 <xsl:when test="contains(../name,'xorg')">
187 <xsl:text>y
188
189</xsl:text>
190 </xsl:when>
191 <xsl:otherwise>
192 <xsl:text>n
193
194</xsl:text>
195 </xsl:otherwise>
196 </xsl:choose>
197 </xsl:if>
198 </xsl:template>
199
200</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.