1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-25 08:59:31 -05:00
forgejo/templates/package/content/arch.tmpl
Exploding Dragon 89742c4913 feat: add architecture-specific removal support for arch package (#5351)
- [x] add architecture-specific removal support
- [x] Fix upload competition
- [x] Fix not checking input when downloading

docs: https://codeberg.org/forgejo/docs/pulls/874

### Release notes

- [ ] I do not want this change to show in the release notes.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5351
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Exploding Dragon <explodingfkl@gmail.com>
Co-committed-by: Exploding Dragon <explodingfkl@gmail.com>
2024-09-27 08:21:22 +00:00

143 lines
4.4 KiB
Go HTML Template

{{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}}