-
Notifications
You must be signed in to change notification settings - Fork 7
/
package.html
376 lines (343 loc) · 20.1 KB
/
package.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
<!DOCTYPE html>
<html lang="en-us">
<head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-LT9ZYVM869"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-LT9ZYVM869');
</script>
<meta charset="UTF-8">
<title>Spack Packages</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:300,400"
rel="stylesheet">
<link rel="stylesheet"
href="//fonts.googleapis.com/css?family=Source+Sans+Pro:300,300i,600">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/fonts/remixicon.css"
rel="stylesheet">
<link rel="stylesheet" href="css/style.css">
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/cdn.min.js"></script>
<script type="text/javascript">
const package = {
name: '',
aliases: [],
description: '',
homepage: '',
build_system: '',
maintainers: [],
dependencies: [],
dependent_to: [],
resources: [],
variants: [],
patches: [],
conflicts: [],
versions: [],
versions_deprecated: [],
initialized: false,
notFound: false,
init() {
this.loadData();
this.initialized = true;
},
buildSystemUrl() {
if (this.build_system === 'Package') {
return "https://spack.readthedocs.io/en/latest/spack.build_systems.html";
} else {
return "https://spack.readthedocs.io/en/latest/build_systems/" + this.build_system.toLowerCase() + ".html";
}
},
packageUrl(name) {
return `package.html?name=${name}`
},
packagePyUrl() {
return `https://github.com/spack/spack/tree/develop/var/spack/repos/builtin/packages/${this.name}/package.py`;
},
maintainerUrl(maintainer) {
return `https://github.com/${maintainer}`;
},
async loadData() {
const urlParams = new URLSearchParams(window.location.search);
const name = urlParams.get('name');
if (name === null) {
this.notFound = true;
return;
}
const response = await fetch(`data/packages/${name}.json`);
if (!response.ok) {
this.notFound = true;
return;
}
const data = await response.json();
this.name = data.name;
this.aliases = data.aliases;
this.description = data.description;
this.homepage = data.homepage;
this.build_system = data.build_system;
this.maintainers = data.maintainers;
this.dependencies = data.dependencies;
this.dependent_to = data.dependent_to;
this.resources = data.resources;
this.variants = data.variants;
this.patches = data.patches;
this.conflicts = data.conflicts;
this.versions = data.versions;
this.versions_deprecated = data.versions_deprecated;
}
};
</script>
</head>
<body class="bg-gray-100" x-data="package">
<div class="container mx-auto p-4 md:px-0 md:py-8">
<header class="drop-shadow-xl relative z-[100]">
<div class="navbar bg-base-100 rounded">
<div class="flex-1 gap-3">
<a href="/" class="btn btn-ghost !px-2 !py-1 !flex gap-2">
<img src="img/spack-logo.svg" class="max-h-full w-auto">
<!-- Show text only on main packages list -->
<!-- Spack Packages -->
</a>
<h1 class="border-l pl-4" x-text="name"></h1>
</div>
<div class="flex justify-end flex-1 px-2">
<div class="flex items-stretch pl-3">
<div class="tooltip tooltip-bottom" data-tip="Spack Cache">
<a href="https://cache.spack.io/" class="btn btn-ghost btn-square
rounded-btn" target="_blank" alt="Spack Cache">
<i class="ri-database-2-line text-xl"></i>
</a>
</div>
<div class="dropdown dropdown-end">
<label tabindex="0" class="btn btn-ghost btn-square rounded-btn">
<i class="ri-github-fill text-xl"></i>
</label>
<ul tabindex="0" class="menu dropdown-content p-2 shadow bg-base-100
rounded-box mt-4">
<li>
<a href="https://github.com/spack/packages.spack.io"
class="nolink" target="_blank">
<i class="ri-git-repository-fill text-xl"></i>
packages.spack.io
</a>
</li>
<li>
<a href="https://github.com/spack/cache.spack.io"
class="nolink" target="_blank">
<i class="ri-git-repository-fill text-xl"></i>
cache.spack.io
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
</header>
<div class="py-8 pb-24">
<div class="grid gap-12 lg:grid-cols-12">
<div class="space-y-6 lg:col-span-9">
<div class="package-info grid gap-6">
<div class="border-l-4 bg-base-100 border-base-300 card drop-shadow-xl rounded-l-[2px]">
<div class="card-body">
<h2 class="card-title">Description</h2>
<div class="leading-7" x-text="description"></div>
</div>
</div>
<div class="grid gap-6 lg:grid-cols-2">
<div class="border-l-4 bg-base-100 border-base-300 card drop-shadow-xl rounded-l-[2px]">
<div class="card-body">
<h2 class="card-title">Dependencies</h2>
<div class="leading-7">
<template x-for="dependency in dependencies" :key="dependency.name">
<a :href="packageUrl(dependency.name)" class="btn btn-xs btn-primary mx-[2px] normal-case" x-text="dependency.name"></a>
</template>
</div>
<div class="text-gray-400 font-light" x-show="dependencies.length == 0">
This package has no dependencies
</div>
</div>
</div>
<div class="border-l-4 bg-base-100 border-base-300 card drop-shadow-xl rounded-l-[2px]">
<div class="card-body">
<h2 class="card-title">Required by</h2>
<div class="leading-7">
<template x-for="dependent in dependent_to" :key="dependent.name">
<a :href="packageUrl(dependent.name)" class="btn btn-xs btn-primary mx-[2px] normal-case" x-text="dependent.name"></a>
</template>
<div class="text-gray-400 font-light" x-show="dependent_to.length == 0">
This package is not required by any other packages
</div>
</div>
</div>
</div>
</div>
<div class="border-l-4 bg-base-100 border-base-300 card drop-shadow-xl rounded-l-[2px]">
<div class="card-body">
<h2 class="card-title">Variants</h2>
<div class="leading-7">
<template x-for="variant in variants" :key="variant.name">
<div>
<a href="#" class="btn btn-xs btn-secondary normal-case" x-text="variant.name"></a>
(<span x-text="variant.default"></span>) <span x-text="variant.description"></span>
</div>
</template>
<div class="text-gray-400 font-light" x-show="variants.length == 0">
There are no variants to show
</div>
</div>
</div>
</div>
<div class="border-l-4 bg-base-100 border-base-300 card drop-shadow-xl rounded-l-[2px]" x-show="aliases.length > 0">
<div class="card-body">
<h2 class="card-title">Aliases</h2>
<div class="flex flex-wrap gap-2 leading-7">
<template x-for="alias in aliases" :key="alias.name">
<span href="#" class="badge badge-ghost bg-gray-100 border-0 py-3 !text-xs rounded" x-text="alias.name"></span>
</template>
</div>
</div>
</div>
<div class="border-l-4 bg-base-100 border-base-300 card drop-shadow-xl rounded-l-[2px]" x-show="resources.length">
<div class="card-body">
<h2 class="card-title">Resources</h2>
<div class="grid lg:grid-cols-2 gap-x-8">
<template x-for="resource in resources">
<div class="border-b border-base-200 py-2 text-gray-500 text-sm">
<span class="font-bold text-neutral" x-text="resource.name"></span>
placed at
<span class="text-neutral" x-text="resource.placement"></span>
when
<span class="text-neutral" x-text="resource.version"></span>
</div>
</template>
</div>
</div>
</div>
<div class="border-l-4 bg-base-100 border-base-300 card drop-shadow-xl rounded-l-[2px]" x-show="patches.length > 0">
<div class="card-body">
<h2 class="card-title">Patches</h2>
<div class="leading-7">
<template x-for="patch in patches" :key="patch.sha256">
<div>
<a href="#" x-show="patch.relative_path" x-text="patch.relative_path"></a>
<a href="#" x-show="!patch.relative_path && patch.url">link</a>
when <span x-text="patch.version"></span>
</div>
</template>
</div>
</div>
</div>
</div>
</div>
<div class="lg:col-span-3">
<div class="card bg-base-100 drop-shadow-xl">
<div class="card-body border-b border-base-200 p-6">
<div class="space-y-4">
<div x-show="description == true">
<h2 class="card-title text-base">Description</h2>
<template x-text="description"></template>
</div>
<div class="card-actions !m-0">
<div class="tooltip tooltip-right lg:tooltip-left" x-bind:data-tip="homepage">
<a x-bind:href="homepage" class="btn btn-primary btn-sm gap-2">
<i class="ri-home-4-fill text-lg"></i>
Homepage
</a>
</div>
</div>
</div>
</div>
<div class="card-body border-b border-base-200 p-6">
<div>
<h2 class="card-title text-base">Build System</h2>
<a x-bind:href="buildSystemUrl()" x-text="build_system"></a> (view <a x-bind:href="packagePyUrl">package.py</a>)
</div>
</div>
<div class="card-body border-b border-base-200 p-6">
<div>
<h2 class="card-title text-base">Maintainers</h2>
<ul x-show="maintainers.length > 0">
<template x-for="maintainer in maintainers">
<li>
<a x-bind:href="maintainerUrl(maintainer)" x-text="maintainer" target="_blank"></a>
</li>
</template>
</ul>
<!-- TODO -->
<div x-show="initialized && maintainers.length === 0" class="alert bg-blue-50 border-l-[5px] border-primary flex-col items-start mt-2 pl-6 pb-6 gap-2 relative text-primary text-sm">
<div>
<strong class="inline" x-text="name"></strong>is looking for a maintainer!
</div>
<a href='https://github.com/spack/spack/issues' target='_blank' class="btn btn-xs btn-primary absolute -bottom-3 right-3">I'm Interested</a>
</div>
</div>
</div>
<div class="card-body border-b border-base-200 p-6">
<div>
<h2 class="card-title text-base">Versions</h2>
<div>
<ul class="flex flex-wrap">
<template x-for="(version, index) in versions">
<li class="w-1/2">
<span x-text="version.name" x-bind:title="version.sha256"></span>
</li>
<div x-show="(index + 1) % columns === 0" class="w-full"></div>
</template>
</ul>
</div>
</div>
</div>
<div class="card-body border-b border-base-200 p-6">
<div>
<h2 class="card-title text-base">Deprecated versions</h2>
<div>
<ul class="flex flex-wrap">
<template x-for="(version, index) in versions_deprecated">
<li class="w-1/2">
<span x-text="version.name" x-bind:title="version.sha256"></span>
</li>
<div x-show="(index + 1) % columns === 0" class="w-full"></div>
</template>
</ul>
<div class="text-gray-400 font-light" x-show="versions_deprecated.length == 0">
There are no deprecated versions
</div>
</div>
</div>
</div>
<div class="card-body border-b border-base-200 p-6">
<div>
<h2 class="card-title text-base">Conflicts</h2>
<div>
<template x-for="conflict in conflicts">
<p class="text-xs">
<span class="font-mono" x-text="conflict.name"></span> when <span class="font-mono" x-text="conflict.spec"></span>
</p>
</template>
<div class="text-gray-400 font-light" x-show="conflicts.length == 0">
There are no conflicts
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<footer class="border-t border-base-300 footer footer-center p-4 text-base-content">
<div>
<p>
<span class="site-footer-credits">
Contribute to Spack Packages Repository on <a target="_blank"
href="https://github.com/spack/packages.spack.io">GitHub</a>.
</span>
</p>
</div>
</footer>
</div>
</body>
</html>