summaryrefslogtreecommitdiffstats
path: root/templates/package/content/arch.tmpl
blob: 6138b1d698bbb4eb75131980aae2877b74d75bac (plain)
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
{{if eq .PackageDescriptor.Package.Type "arch"}}
<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.installation"}}</h4>
<div class="ui attached segment">
	<div class="ui form">
		<div class="field">
			<label>{{svg "octicon-terminal"}} {{ctx.Locale.Tr "packages.arch.pacman.helper.gpg"}}</label>
			<div class="markup">
				<pre class="code-block"><code>wget -O sign.gpg <origin-url data-url="{{AppSubUrl}}/api/packages/{{.PackageDescriptor.Owner.Name}}/arch/repository.key"></origin-url>
pacman-key --add sign.gpg
pacman-key --lsign-key '{{$.SignMail}}'</code></pre>
			</div>
		</div>
		<div class="field">
			<label>{{svg "octicon-gear"}} {{ctx.Locale.Tr "packages.arch.pacman.conf"}}</label>
			<div class="markup">
				<pre
					class="code-block"><code>
{{- if gt (len $.Groups) 1 -}}
# {{ctx.Locale.Tr "packages.arch.pacman.repo.multi" $.PackageDescriptor.Package.LowerName}}

{{end -}}
{{- $GroupSize := (len .Groups) -}}
{{-  range $i,$v := .Groups -}}
{{- if gt $i 0}}
{{end -}}{{- if gt $GroupSize 1 -}}
# {{ctx.Locale.Tr "packages.arch.pacman.repo.multi.item" .}}
{{end -}}
[{{$.PackageDescriptor.Owner.LowerName}}.{{$.RegistryHost}}]
SigLevel = Required
Server = <origin-url data-url="{{AppSubUrl}}/api/packages/{{$.PackageDescriptor.Owner.Name}}/arch/{{.}}/$arch"></origin-url>
{{end -}}
</code></pre>
			</div>
		</div>
		<div class="field">
			<label>{{svg "octicon-sync"}} {{ctx.Locale.Tr "packages.arch.pacman.sync"}}</label>
			<div class="markup">
				<pre class="code-block"><code>pacman -Sy {{.PackageDescriptor.Package.LowerName}}</code></pre>
			</div>
		</div>
		<div class="field">
			<label>{{ctx.Locale.Tr "packages.registry.documentation" "Arch"
				"https://forgejo.org/docs/latest/user/packages/arch/"}}</label>
		</div>
	</div>
</div>

<h4 class="ui top attached header">{{ctx.Locale.Tr "packages.arch.version.properties"}}</h4>
<div class="ui attached segment">
	<table class="ui very basic compact table">
		<tbody>
			<tr>
				<td class="collapsing">
					<h5>{{ctx.Locale.Tr "packages.arch.version.description"}}</h5>
				</td>
				<td>{{.PackageDescriptor.Metadata.Description}}</td>
			</tr>

			{{if .PackageDescriptor.Metadata.Groups}}
			<tr>
				<td class="collapsing">
					<h5>{{ctx.Locale.Tr "packages.arch.version.groups"}}</h5>
				</td>
				<td>{{StringUtils.Join $.PackageDescriptor.Metadata.Groups ", "}}</td>
			</tr>
			{{end}}

			{{if .PackageDescriptor.Metadata.Provides}}
			<tr>
				<td class="collapsing">
					<h5>{{ctx.Locale.Tr "packages.arch.version.provides"}}</h5>
				</td>
				<td>{{StringUtils.Join $.PackageDescriptor.Metadata.Provides ", "}}</td>
			</tr>
			{{end}}

			{{if .PackageDescriptor.Metadata.Depends}}
			<tr>
				<td class="collapsing">
					<h5>{{ctx.Locale.Tr "packages.arch.version.depends"}}</h5>
				</td>
				<td>{{StringUtils.Join $.PackageDescriptor.Metadata.Depends ", "}}</td>
			</tr>
			{{end}}

			{{if .PackageDescriptor.Metadata.OptDepends}}
			<tr>
				<td class="collapsing">
					<h5>{{ctx.Locale.Tr "packages.arch.version.optdepends"}}</h5>
				</td>
				<td>{{StringUtils.Join $.PackageDescriptor.Metadata.OptDepends ", "}}</td>
			</tr>
			{{end}}

			{{if .PackageDescriptor.Metadata.MakeDepends}}
			<tr>
				<td class="collapsing">
					<h5>{{ctx.Locale.Tr "packages.arch.version.makedepends"}}</h5>
				</td>
				<td>{{StringUtils.Join $.PackageDescriptor.Metadata.MakeDepends ", "}}</td>
			</tr>
			{{end}}

			{{if .PackageDescriptor.Metadata.CheckDepends}}
			<tr>
				<td class="collapsing">
					<h5>{{ctx.Locale.Tr "packages.arch.version.checkdepends"}}</h5>
				</td>
				<td>{{StringUtils.Join $.PackageDescriptor.Metadata.CheckDepends ", "}}</td>
			</tr>
			{{end}}

			{{if .PackageDescriptor.Metadata.Conflicts}}
			<tr>
				<td class="collapsing">
					<h5>{{ctx.Locale.Tr "packages.arch.version.conflicts"}}</h5>
				</td>
				<td>{{StringUtils.Join $.PackageDescriptor.Metadata.Conflicts ", "}}</td>
			</tr>
			{{end}}

			{{if .PackageDescriptor.Metadata.Replaces}}
			<tr>
				<td class="collapsing">
					<h5>{{ctx.Locale.Tr "packages.arch.version.replaces"}}</h5>
				</td>
				<td>{{StringUtils.Join $.PackageDescriptor.Metadata.Replaces ", "}}</td>
			</tr>
			{{end}}

			{{if .PackageDescriptor.Metadata.Backup}}
			<tr>
				<td class="collapsing">
					<h5>{{ctx.Locale.Tr "packages.arch.version.backup"}}</h5>
				</td>
				<td>{{StringUtils.Join $.PackageDescriptor.Metadata.Backup ", "}}</td>
			</tr>
			{{end}}
		</tbody>
	</table>
</div>

{{end}}