diff options
author | Daniel Baumann <daniel@debian.org> | 2024-10-18 20:33:49 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2024-12-12 23:57:56 +0100 |
commit | e68b9d00a6e05b3a941f63ffb696f91e554ac5ec (patch) | |
tree | 97775d6c13b0f416af55314eb6a89ef792474615 /templates/package/content/arch.tmpl | |
parent | Initial commit. (diff) | |
download | forgejo-e68b9d00a6e05b3a941f63ffb696f91e554ac5ec.tar.xz forgejo-e68b9d00a6e05b3a941f63ffb696f91e554ac5ec.zip |
Adding upstream version 9.0.3.
Signed-off-by: Daniel Baumann <daniel@debian.org>
Diffstat (limited to 'templates/package/content/arch.tmpl')
-rw-r--r-- | templates/package/content/arch.tmpl | 143 |
1 files changed, 143 insertions, 0 deletions
diff --git a/templates/package/content/arch.tmpl b/templates/package/content/arch.tmpl new file mode 100644 index 0000000..6138b1d --- /dev/null +++ b/templates/package/content/arch.tmpl @@ -0,0 +1,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}} |