source: BLFS/xsl/gen_config.xsl@ b15261a

ablfs-more legacy trunk
Last change on this file since b15261a was 945ccaa, checked in by Pierre Labastie <pierre@…>, 8 years ago

Merge the new_features branch (manully, thanks to svn)

  • Property mode set to 100644
File size: 5.3 KB
RevLine 
[e576789]1<?xml version="1.0" encoding="ISO-8859-1"?>
2
[56178ba]3<!-- $Id$ -->
[e576789]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)
[945ccaa]61
62
63config WRAP_INSTALL
64 bool "Use `porg style' package management"
65 default n
66 help
67 Select if you want the installation commands to be wrapped
68 between "wrapInstall '" and "' ; packInstall" functions,
69 where wrapInstall is used to set up a LD_PRELOAD library (for
70 example using porg), and packInstall makes the package tarball
[e576789]71</xsl:text>
72 </xsl:template>
73
74 <xsl:template match="list">
75 <xsl:if
76 test=".//*[self::package or self::module]
77 [(version and not(inst-version)) or
78 string(version) != string(inst-version)]">
79 <xsl:text>config&#9;MENU_</xsl:text>
80 <xsl:value-of select="@id"/>
81 <xsl:text>
82bool&#9;"</xsl:text>
83 <xsl:value-of select="name"/>
84 <xsl:text>"
85default&#9;n
86
87menu "</xsl:text>
88 <xsl:value-of select="name"/>
89 <xsl:text>"
90depends MENU_</xsl:text>
91 <xsl:value-of select="@id"/>
92 <xsl:text>
93
94</xsl:text>
95 <xsl:apply-templates select="sublist"/>
96 <xsl:text>endmenu
97
98</xsl:text>
99 </xsl:if>
100 </xsl:template>
101
102 <xsl:template match="sublist">
103 <xsl:if
104 test=".//*[self::package or self::module]
105 [(version and not(inst-version)) or
106 string(version) != string(inst-version)]">
107 <xsl:text>&#9;config&#9;MENU_</xsl:text>
108 <xsl:value-of select="@id"/>
109 <xsl:text>
110&#9;bool&#9;"</xsl:text>
111 <xsl:value-of select="name"/>
112 <xsl:text>"
113&#9;default&#9;n
114
115&#9;menu "</xsl:text>
116 <xsl:value-of select="name"/>
117 <xsl:text>"
118&#9;depends MENU_</xsl:text>
119 <xsl:value-of select="@id"/>
120 <xsl:text>
121
122</xsl:text>
123 <xsl:apply-templates select="package"/>
124 <xsl:text>&#9;endmenu
125
126</xsl:text>
127 </xsl:if>
128 </xsl:template>
129
130 <xsl:template match="package">
131 <xsl:if
132 test="(version and not(inst-version)) or
133 string(version) != string(inst-version)">
134 <xsl:text>&#9;&#9;config&#9;CONFIG_</xsl:text>
135 <xsl:value-of select="name"/>
136 <xsl:text>
137&#9;&#9;bool&#9;"</xsl:text>
138 <xsl:value-of select="name"/>
139 <xsl:text> </xsl:text>
140 <xsl:value-of select="version"/>
141 <xsl:if test="inst-version">
142 <xsl:text> [Installed </xsl:text>
143 <xsl:value-of select="inst-version"/>
144 <xsl:text>]</xsl:text>
145 </xsl:if>
146 <xsl:text>"
147&#9;&#9;default&#9;n
148
149</xsl:text>
150 </xsl:if>
151 <xsl:if
152 test="not(version) and ./module[not(inst-version) or
153 string(version) != string(inst-version)]">
154 <xsl:text>&#9;&#9;config&#9;MENU_</xsl:text>
155 <xsl:value-of select="translate(name,' ','_')"/>
156 <xsl:text>
157&#9;&#9;bool&#9;"</xsl:text>
158 <xsl:value-of select="name"/>
159 <xsl:text>"
160&#9;&#9;default&#9;n
161
162&#9;&#9;menu "</xsl:text>
163 <xsl:value-of select="name"/>
164 <xsl:text>"
165&#9;&#9;depends MENU_</xsl:text>
166 <xsl:value-of select="translate(name,' ','_')"/>
167 <xsl:text>
168
169</xsl:text>
170 <xsl:apply-templates select="module"/>
171 <xsl:text>&#9;&#9;endmenu
172
173</xsl:text>
174 </xsl:if>
175 </xsl:template>
176
177 <xsl:template match="module">
178 <xsl:if
179 test="not(inst-version) or
180 string(version) != string(inst-version)">
181 <xsl:text>&#9;&#9;&#9;config&#9;CONFIG_</xsl:text>
182 <xsl:value-of select="name"/>
183 <xsl:text>
184&#9;&#9;&#9;bool&#9;"</xsl:text>
185 <xsl:value-of select="name"/>
186 <xsl:text> </xsl:text>
187 <xsl:value-of select="version"/>
188 <xsl:if test="inst-version">
189 <xsl:text> [Installed </xsl:text>
190 <xsl:value-of select="inst-version"/>
191 <xsl:text>]</xsl:text>
192 </xsl:if>
193 <xsl:text>"
194&#9;&#9;&#9;default&#9;</xsl:text>
195 <xsl:choose>
196 <xsl:when test="contains(../name,'xorg')">
197 <xsl:text>y
198
199</xsl:text>
200 </xsl:when>
201 <xsl:otherwise>
202 <xsl:text>n
203
204</xsl:text>
205 </xsl:otherwise>
206 </xsl:choose>
207 </xsl:if>
208 </xsl:template>
209
210</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.