From e68b9d00a6e05b3a941f63ffb696f91e554ac5ec Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 18 Oct 2024 20:33:49 +0200 Subject: Adding upstream version 9.0.3. Signed-off-by: Daniel Baumann --- templates/package/content/alpine.tmpl | 52 ++++++++ templates/package/content/arch.tmpl | 143 +++++++++++++++++++++ templates/package/content/cargo.tmpl | 63 +++++++++ templates/package/content/chef.tmpl | 48 +++++++ templates/package/content/composer.tmpl | 50 +++++++ .../package/content/composer_dependencies.tmpl | 19 +++ templates/package/content/conan.tmpl | 34 +++++ templates/package/content/conda.tmpl | 30 +++++ templates/package/content/container.tmpl | 90 +++++++++++++ templates/package/content/cran.tmpl | 59 +++++++++ templates/package/content/debian.tmpl | 65 ++++++++++ templates/package/content/generic.tmpl | 18 +++ templates/package/content/go.tmpl | 14 ++ templates/package/content/helm.tmpl | 57 ++++++++ templates/package/content/maven.tmpl | 75 +++++++++++ templates/package/content/npm.tmpl | 65 ++++++++++ templates/package/content/npm_dependencies.tmpl | 19 +++ templates/package/content/nuget.tmpl | 51 ++++++++ templates/package/content/pub.tmpl | 19 +++ templates/package/content/pypi.tmpl | 31 +++++ templates/package/content/rpm.tmpl | 56 ++++++++ templates/package/content/rubygems.tmpl | 40 ++++++ .../package/content/rubygems_dependencies.tmpl | 19 +++ templates/package/content/swift.tmpl | 40 ++++++ templates/package/content/vagrant.tmpl | 18 +++ 25 files changed, 1175 insertions(+) create mode 100644 templates/package/content/alpine.tmpl create mode 100644 templates/package/content/arch.tmpl create mode 100644 templates/package/content/cargo.tmpl create mode 100644 templates/package/content/chef.tmpl create mode 100644 templates/package/content/composer.tmpl create mode 100644 templates/package/content/composer_dependencies.tmpl create mode 100644 templates/package/content/conan.tmpl create mode 100644 templates/package/content/conda.tmpl create mode 100644 templates/package/content/container.tmpl create mode 100644 templates/package/content/cran.tmpl create mode 100644 templates/package/content/debian.tmpl create mode 100644 templates/package/content/generic.tmpl create mode 100644 templates/package/content/go.tmpl create mode 100644 templates/package/content/helm.tmpl create mode 100644 templates/package/content/maven.tmpl create mode 100644 templates/package/content/npm.tmpl create mode 100644 templates/package/content/npm_dependencies.tmpl create mode 100644 templates/package/content/nuget.tmpl create mode 100644 templates/package/content/pub.tmpl create mode 100644 templates/package/content/pypi.tmpl create mode 100644 templates/package/content/rpm.tmpl create mode 100644 templates/package/content/rubygems.tmpl create mode 100644 templates/package/content/rubygems_dependencies.tmpl create mode 100644 templates/package/content/swift.tmpl create mode 100644 templates/package/content/vagrant.tmpl (limited to 'templates/package/content') diff --git a/templates/package/content/alpine.tmpl b/templates/package/content/alpine.tmpl new file mode 100644 index 0000000..8914006 --- /dev/null +++ b/templates/package/content/alpine.tmpl @@ -0,0 +1,52 @@ +{{if eq .PackageDescriptor.Package.Type "alpine"}} +

{{ctx.Locale.Tr "packages.installation"}}

+
+
+
+ +
/$branch/$repository
+

{{ctx.Locale.Tr "packages.alpine.registry.info"}}

+
+
+ +
curl -JO 
+
+
+ +
+
sudo apk add {{$.PackageDescriptor.Package.Name}}={{$.PackageDescriptor.Version.Version}}
+
+
+
+ +
+
+
+ +

{{ctx.Locale.Tr "packages.alpine.repository"}}

+
+ + + + + + + + + + + + + + + +
{{ctx.Locale.Tr "packages.alpine.repository.branches"}}
{{StringUtils.Join .Branches ", "}}
{{ctx.Locale.Tr "packages.alpine.repository.repositories"}}
{{StringUtils.Join .Repositories ", "}}
{{ctx.Locale.Tr "packages.alpine.repository.architectures"}}
{{StringUtils.Join .Architectures ", "}}
+
+ + {{if .PackageDescriptor.Metadata.Description}} +

{{ctx.Locale.Tr "packages.about"}}

+
+ {{.PackageDescriptor.Metadata.Description}} +
+ {{end}} +{{end}} 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"}} +

{{ctx.Locale.Tr "packages.installation"}}

+
+
+
+ +
+
wget -O sign.gpg 
+pacman-key --add sign.gpg
+pacman-key --lsign-key '{{$.SignMail}}'
+
+
+
+ +
+

+{{- 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 = 
+{{end -}}
+
+
+
+
+ +
+
pacman -Sy {{.PackageDescriptor.Package.LowerName}}
+
+
+
+ +
+
+
+ +

{{ctx.Locale.Tr "packages.arch.version.properties"}}

+
+ + + + + + + + {{if .PackageDescriptor.Metadata.Groups}} + + + + + {{end}} + + {{if .PackageDescriptor.Metadata.Provides}} + + + + + {{end}} + + {{if .PackageDescriptor.Metadata.Depends}} + + + + + {{end}} + + {{if .PackageDescriptor.Metadata.OptDepends}} + + + + + {{end}} + + {{if .PackageDescriptor.Metadata.MakeDepends}} + + + + + {{end}} + + {{if .PackageDescriptor.Metadata.CheckDepends}} + + + + + {{end}} + + {{if .PackageDescriptor.Metadata.Conflicts}} + + + + + {{end}} + + {{if .PackageDescriptor.Metadata.Replaces}} + + + + + {{end}} + + {{if .PackageDescriptor.Metadata.Backup}} + + + + + {{end}} + +
+
{{ctx.Locale.Tr "packages.arch.version.description"}}
+
{{.PackageDescriptor.Metadata.Description}}
+
{{ctx.Locale.Tr "packages.arch.version.groups"}}
+
{{StringUtils.Join $.PackageDescriptor.Metadata.Groups ", "}}
+
{{ctx.Locale.Tr "packages.arch.version.provides"}}
+
{{StringUtils.Join $.PackageDescriptor.Metadata.Provides ", "}}
+
{{ctx.Locale.Tr "packages.arch.version.depends"}}
+
{{StringUtils.Join $.PackageDescriptor.Metadata.Depends ", "}}
+
{{ctx.Locale.Tr "packages.arch.version.optdepends"}}
+
{{StringUtils.Join $.PackageDescriptor.Metadata.OptDepends ", "}}
+
{{ctx.Locale.Tr "packages.arch.version.makedepends"}}
+
{{StringUtils.Join $.PackageDescriptor.Metadata.MakeDepends ", "}}
+
{{ctx.Locale.Tr "packages.arch.version.checkdepends"}}
+
{{StringUtils.Join $.PackageDescriptor.Metadata.CheckDepends ", "}}
+
{{ctx.Locale.Tr "packages.arch.version.conflicts"}}
+
{{StringUtils.Join $.PackageDescriptor.Metadata.Conflicts ", "}}
+
{{ctx.Locale.Tr "packages.arch.version.replaces"}}
+
{{StringUtils.Join $.PackageDescriptor.Metadata.Replaces ", "}}
+
{{ctx.Locale.Tr "packages.arch.version.backup"}}
+
{{StringUtils.Join $.PackageDescriptor.Metadata.Backup ", "}}
+
+ +{{end}} diff --git a/templates/package/content/cargo.tmpl b/templates/package/content/cargo.tmpl new file mode 100644 index 0000000..2f14945 --- /dev/null +++ b/templates/package/content/cargo.tmpl @@ -0,0 +1,63 @@ +{{if eq .PackageDescriptor.Package.Type "cargo"}} +

{{ctx.Locale.Tr "packages.installation"}}

+
+
+
+ +
[registry]
+default = "forgejo"
+
+[registries.forgejo]
+index = "sparse+" # Sparse index
+# index = "" # Git
+
+[net]
+git-fetch-with-cli = true
+
+
+ +
cargo add {{.PackageDescriptor.Package.Name}}@{{.PackageDescriptor.Version.Version}}
+
+
+ +
+
+
+ + {{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.Readme}} +

{{ctx.Locale.Tr "packages.about"}}

+ {{if .PackageDescriptor.Metadata.Description}}
{{.PackageDescriptor.Metadata.Description}}
{{end}} + {{if .PackageDescriptor.Metadata.Readme}}
{{RenderMarkdownToHtml $.Context .PackageDescriptor.Metadata.Readme}}
{{end}} + {{end}} + + {{if .PackageDescriptor.Metadata.Dependencies}} +

{{ctx.Locale.Tr "packages.dependencies"}}

+
+ + + + + + + + + {{range .PackageDescriptor.Metadata.Dependencies}} + + + + + {{end}} + +
{{ctx.Locale.Tr "packages.dependency.id"}}{{ctx.Locale.Tr "packages.dependency.version"}}
{{.Name}}{{.Req}}
+
+ {{end}} + + {{if .PackageDescriptor.Metadata.Keywords}} +

{{ctx.Locale.Tr "packages.keywords"}}

+
+ {{range .PackageDescriptor.Metadata.Keywords}} + {{.}} + {{end}} +
+ {{end}} +{{end}} diff --git a/templates/package/content/chef.tmpl b/templates/package/content/chef.tmpl new file mode 100644 index 0000000..d39164b --- /dev/null +++ b/templates/package/content/chef.tmpl @@ -0,0 +1,48 @@ +{{if eq .PackageDescriptor.Package.Type "chef"}} +

{{ctx.Locale.Tr "packages.installation"}}

+
+
+
+ +
knife[:supermarket_site] = ''
+
+
+ +
knife supermarket install {{.PackageDescriptor.Package.Name}} {{.PackageDescriptor.Version.Version}}
+
+
+ +
+
+
+ + {{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.LongDescription}} +

{{ctx.Locale.Tr "packages.about"}}

+
+ {{if .PackageDescriptor.Metadata.Description}}

{{.PackageDescriptor.Metadata.Description}}

{{end}} + {{if .PackageDescriptor.Metadata.LongDescription}}{{RenderMarkdownToHtml $.Context .PackageDescriptor.Metadata.LongDescription}}{{end}} +
+ {{end}} + + {{if .PackageDescriptor.Metadata.Dependencies}} +

{{ctx.Locale.Tr "packages.dependencies"}}

+
+ + + + + + + + + {{range $dependency, $version := .PackageDescriptor.Metadata.Dependencies}} + + + + + {{end}} + +
{{ctx.Locale.Tr "packages.dependency.id"}}{{ctx.Locale.Tr "packages.dependency.version"}}
{{$dependency}}{{$version}}
+
+ {{end}} +{{end}} diff --git a/templates/package/content/composer.tmpl b/templates/package/content/composer.tmpl new file mode 100644 index 0000000..73ab3ac --- /dev/null +++ b/templates/package/content/composer.tmpl @@ -0,0 +1,50 @@ +{{if eq .PackageDescriptor.Package.Type "composer"}} +

{{ctx.Locale.Tr "packages.installation"}}

+
+
+
+ +
{
+	"repositories": [{
+			"type": "composer",
+			"url": ""
+		}
+	]
+}
+
+
+ +
composer require {{.PackageDescriptor.Package.Name}}:{{.PackageDescriptor.Version.Version}}
+
+
+ +
+
+
+ + {{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.Comments}} +

{{ctx.Locale.Tr "packages.about"}}

+ {{if .PackageDescriptor.Metadata.Description}}
{{.PackageDescriptor.Metadata.Description}}
{{end}} + {{if .PackageDescriptor.Metadata.Readme}}
{{RenderMarkdownToHtml $.Context .PackageDescriptor.Metadata.Readme}}
{{end}} + {{if .PackageDescriptor.Metadata.Comments}}
{{StringUtils.Join .PackageDescriptor.Metadata.Comments " "}}
{{end}} + {{end}} + + {{if or .PackageDescriptor.Metadata.Require .PackageDescriptor.Metadata.RequireDev}} +

{{ctx.Locale.Tr "packages.dependencies"}}

+
+
+ {{template "package/content/composer_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.Require "title" (ctx.Locale.Tr "packages.composer.dependencies")}} + {{template "package/content/composer_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.RequireDev "title" (ctx.Locale.Tr "packages.composer.dependencies.development")}} +
+
+ {{end}} + + {{if .PackageDescriptor.Metadata.Keywords}} +

{{ctx.Locale.Tr "packages.keywords"}}

+
+ {{range .PackageDescriptor.Metadata.Keywords}} + {{.}} + {{end}} +
+ {{end}} +{{end}} diff --git a/templates/package/content/composer_dependencies.tmpl b/templates/package/content/composer_dependencies.tmpl new file mode 100644 index 0000000..dba4575 --- /dev/null +++ b/templates/package/content/composer_dependencies.tmpl @@ -0,0 +1,19 @@ +{{if .dependencies}} +

{{.title}}

+ + + + + + + + + {{range $dependency, $version := .dependencies}} + + + + + {{end}} + +
{{ctx.Locale.Tr "packages.dependency.id"}}{{ctx.Locale.Tr "packages.dependency.version"}}
{{$dependency}}{{$version}}
+{{end}} diff --git a/templates/package/content/conan.tmpl b/templates/package/content/conan.tmpl new file mode 100644 index 0000000..8ebc258 --- /dev/null +++ b/templates/package/content/conan.tmpl @@ -0,0 +1,34 @@ +{{if eq .PackageDescriptor.Package.Type "conan"}} +

{{ctx.Locale.Tr "packages.installation"}}

+
+
+
+ +
conan remote add forgejo 
+
+
+ +
conan install --remote=forgejo {{.PackageDescriptor.Package.Name}}/{{.PackageDescriptor.Version.Version}}
+
+
+ +
+
+
+ + {{if .PackageDescriptor.Metadata.Description}} +

{{ctx.Locale.Tr "packages.about"}}

+
+ {{if .PackageDescriptor.Metadata.Description}}{{.PackageDescriptor.Metadata.Description}}{{end}} +
+ {{end}} + + {{if or .PackageDescriptor.Metadata.Keywords}} +

{{ctx.Locale.Tr "packages.keywords"}}

+
+ {{range .PackageDescriptor.Metadata.Keywords}} + {{.}} + {{end}} +
+ {{end}} +{{end}} diff --git a/templates/package/content/conda.tmpl b/templates/package/content/conda.tmpl new file mode 100644 index 0000000..5ff7944 --- /dev/null +++ b/templates/package/content/conda.tmpl @@ -0,0 +1,30 @@ +{{if eq .PackageDescriptor.Package.Type "conda"}} +

{{ctx.Locale.Tr "packages.installation"}}

+
+
+
+ +
channel_alias: 
+channels:
+  - 
+default_channels:
+  - 
+
+
+ + {{$channel := .PackageDescriptor.PackageProperties.GetByName "conda.channel"}} +
conda install{{if $channel}} -c {{$channel}}{{end}} {{.PackageDescriptor.PackageProperties.GetByName "conda.name"}}={{.PackageDescriptor.Version.Version}}
+
+
+ +
+
+
+ + {{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.Summary}} +

{{ctx.Locale.Tr "packages.about"}}

+
+ {{if .PackageDescriptor.Metadata.Description}}{{.PackageDescriptor.Metadata.Description}}{{else}}{{.PackageDescriptor.Metadata.Summary}}{{end}} +
+ {{end}} +{{end}} diff --git a/templates/package/content/container.tmpl b/templates/package/content/container.tmpl new file mode 100644 index 0000000..b5fdcfe --- /dev/null +++ b/templates/package/content/container.tmpl @@ -0,0 +1,90 @@ +{{if eq .PackageDescriptor.Package.Type "container"}} +

{{ctx.Locale.Tr "packages.installation"}}

+
+
+
+ + {{if eq .PackageDescriptor.Metadata.Type "helm"}} +
helm pull oci://{{.RegistryHost}}/{{.PackageDescriptor.Owner.LowerName}}/{{.PackageDescriptor.Package.LowerName}} --version {{.PackageDescriptor.Version.LowerVersion}}
+ {{else}} + {{$separator := ":"}} + {{if not .PackageDescriptor.Metadata.IsTagged}} + {{$separator = "@"}} + {{end}} +
docker pull {{.RegistryHost}}/{{.PackageDescriptor.Owner.LowerName}}/{{.PackageDescriptor.Package.LowerName}}{{$separator}}{{.PackageDescriptor.Version.LowerVersion}}
+ {{end}} +
+
+ +
{{range .PackageDescriptor.Files}}{{if eq .File.LowerName "manifest.json"}}{{.Properties.GetByName "container.digest"}}{{end}}{{end}}
+
+
+ +
+
+
+ {{if .PackageDescriptor.Metadata.Manifests}} +

{{ctx.Locale.Tr "packages.container.multi_arch"}}

+
+ + + + + + + + + + {{range .PackageDescriptor.Metadata.Manifests}} + + + + + + {{end}} + +
{{ctx.Locale.Tr "packages.container.digest"}}{{ctx.Locale.Tr "packages.container.multi_arch"}}{{ctx.Locale.Tr "admin.packages.size"}}
{{.Digest}}{{.Platform}}{{ctx.Locale.TrSize .Size}}
+
+ {{end}} + {{if .PackageDescriptor.Metadata.Description}} +

{{ctx.Locale.Tr "packages.about"}}

+
+ {{.PackageDescriptor.Metadata.Description}} +
+ {{end}} + {{if .PackageDescriptor.Metadata.ImageLayers}} +

{{ctx.Locale.Tr "packages.container.layers"}}

+
+ + + {{range .PackageDescriptor.Metadata.ImageLayers}} + + + + {{end}} + +
{{.}}
+
+ {{end}} + {{if .PackageDescriptor.Metadata.Labels}} +

{{ctx.Locale.Tr "packages.container.labels"}}

+
+ + + + + + + + + {{range $key, $value := .PackageDescriptor.Metadata.Labels}} + + + + + {{end}} + +
{{ctx.Locale.Tr "packages.container.labels.key"}}{{ctx.Locale.Tr "packages.container.labels.value"}}
{{$key}}{{$value}}
+
+ {{end}} +{{end}} diff --git a/templates/package/content/cran.tmpl b/templates/package/content/cran.tmpl new file mode 100644 index 0000000..df7a48c --- /dev/null +++ b/templates/package/content/cran.tmpl @@ -0,0 +1,59 @@ +{{if eq .PackageDescriptor.Package.Type "cran"}} +

{{ctx.Locale.Tr "packages.installation"}}

+
+
+
+ +
options("repos" = c(getOption("repos"), c(forgejo="")))
+
+
+ +
install.packages("{{.PackageDescriptor.Package.Name}}")
+
+
+ +
+
+
+ + {{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.Title}} +

{{ctx.Locale.Tr "packages.about"}}

+
+ {{if .PackageDescriptor.Metadata.Description}}{{.PackageDescriptor.Metadata.Description}}{{.PackageDescriptor.Metadata.Title}}{{else}}{{end}} +
+ {{end}} + + {{if or .PackageDescriptor.Metadata.Imports .PackageDescriptor.Metadata.Depends .PackageDescriptor.Metadata.LinkingTo .PackageDescriptor.Metadata.Suggests}} +

{{ctx.Locale.Tr "packages.dependencies"}}

+
+ + + {{if .PackageDescriptor.Metadata.Imports}} + + + + + {{end}} + {{if .PackageDescriptor.Metadata.Depends}} + + + + + {{end}} + {{if .PackageDescriptor.Metadata.LinkingTo}} + + + + + {{end}} + {{if .PackageDescriptor.Metadata.Suggests}} + + + + + {{end}} + +
Imports{{StringUtils.Join .PackageDescriptor.Metadata.Imports ", "}}
Depends{{StringUtils.Join .PackageDescriptor.Metadata.Depends ", "}}
LinkingTo{{StringUtils.Join .PackageDescriptor.Metadata.LinkingTo ", "}}
Suggests{{StringUtils.Join .PackageDescriptor.Metadata.Suggests ", "}}
+
+ {{end}} +{{end}} diff --git a/templates/package/content/debian.tmpl b/templates/package/content/debian.tmpl new file mode 100644 index 0000000..782ac1c --- /dev/null +++ b/templates/package/content/debian.tmpl @@ -0,0 +1,65 @@ +{{if eq .PackageDescriptor.Package.Type "debian"}} +

{{ctx.Locale.Tr "packages.installation"}}

+
+
+
+ +
sudo curl  -o /etc/apt/keyrings/forgejo-{{$.PackageDescriptor.Owner.Name}}.asc
+echo "deb [signed-by=/etc/apt/keyrings/forgejo-{{$.PackageDescriptor.Owner.Name}}.asc]  $distribution $component" | sudo tee -a /etc/apt/sources.list.d/forgejo.list
+sudo apt update
+

{{ctx.Locale.Tr "packages.debian.registry.info"}}

+
+
+ +
+
sudo apt install {{$.PackageDescriptor.Package.Name}}={{$.PackageDescriptor.Version.Version}}
+
+
+
+ +
+
+
+ +

{{ctx.Locale.Tr "packages.debian.repository"}}

+
+ + + + + + + + + + + + + + + +
{{ctx.Locale.Tr "packages.debian.repository.distributions"}}
{{StringUtils.Join .Distributions ", "}}
{{ctx.Locale.Tr "packages.debian.repository.components"}}
{{StringUtils.Join .Components ", "}}
{{ctx.Locale.Tr "packages.debian.repository.architectures"}}
{{StringUtils.Join .Architectures ", "}}
+
+ + {{if .PackageDescriptor.Metadata.Description}} +

{{ctx.Locale.Tr "packages.about"}}

+
+ {{.PackageDescriptor.Metadata.Description}} +
+ {{end}} + + {{if .PackageDescriptor.Metadata.Dependencies}} +

{{ctx.Locale.Tr "packages.dependencies"}}

+
+ + + {{range .PackageDescriptor.Metadata.Dependencies}} + + + + {{end}} + +
{{.}}
+
+ {{end}} +{{end}} diff --git a/templates/package/content/generic.tmpl b/templates/package/content/generic.tmpl new file mode 100644 index 0000000..4ebfb91 --- /dev/null +++ b/templates/package/content/generic.tmpl @@ -0,0 +1,18 @@ +{{if eq .PackageDescriptor.Package.Type "generic"}} +

{{ctx.Locale.Tr "packages.installation"}}

+
+
+
+ +

+{{- range .PackageDescriptor.Files -}}
+curl -OJ 
+{{end -}}
+				
+
+
+ +
+
+
+{{end}} diff --git a/templates/package/content/go.tmpl b/templates/package/content/go.tmpl new file mode 100644 index 0000000..5e32ea7 --- /dev/null +++ b/templates/package/content/go.tmpl @@ -0,0 +1,14 @@ +{{if eq .PackageDescriptor.Package.Type "go"}} +

{{ctx.Locale.Tr "packages.installation"}}

+
+
+
+ +
GOPROXY= go install {{$.PackageDescriptor.Package.Name}}@{{$.PackageDescriptor.Version.Version}}
+
+
+ +
+
+
+{{end}} diff --git a/templates/package/content/helm.tmpl b/templates/package/content/helm.tmpl new file mode 100644 index 0000000..9d85555 --- /dev/null +++ b/templates/package/content/helm.tmpl @@ -0,0 +1,57 @@ +{{if eq .PackageDescriptor.Package.Type "helm"}} +

{{ctx.Locale.Tr "packages.installation"}}

+
+
+
+ +
helm repo add {{AppDomain}} 
+helm repo update
+
+
+ +
helm install {{.PackageDescriptor.Package.Name}} {{AppDomain}}/{{.PackageDescriptor.Package.Name}}
+
+
+ +
+
+
+ + {{if .PackageDescriptor.Metadata.Description}} +

{{ctx.Locale.Tr "packages.about"}}

+
+ {{.PackageDescriptor.Metadata.Description}} +
+ {{end}} + + {{if .PackageDescriptor.Metadata.Dependencies}} +

{{ctx.Locale.Tr "packages.dependencies"}}

+
+ + + + + + + + + {{range .PackageDescriptor.Metadata.Dependencies}} + + + + + {{end}} + +
{{ctx.Locale.Tr "packages.dependency.id"}}{{ctx.Locale.Tr "packages.dependency.version"}}
{{.Name}}{{.Version}}
+
+ {{end}} + + {{if .PackageDescriptor.Metadata.Keywords}} +

{{ctx.Locale.Tr "packages.keywords"}}

+
+ {{range .PackageDescriptor.Metadata.Keywords}} + {{.}} + {{end}} +
+ {{end}} +{{end}} diff --git a/templates/package/content/maven.tmpl b/templates/package/content/maven.tmpl new file mode 100644 index 0000000..7f7e3fa --- /dev/null +++ b/templates/package/content/maven.tmpl @@ -0,0 +1,75 @@ +{{if eq .PackageDescriptor.Package.Type "maven"}} +

{{ctx.Locale.Tr "packages.installation"}}

+
+
+
+ +
<repositories>
+	<repository>
+		<id>gitea</id>
+		<url></url>
+	</repository>
+</repositories>
+
+<distributionManagement>
+	<repository>
+		<id>gitea</id>
+		<url></url>
+	</repository>
+
+	<snapshotRepository>
+		<id>gitea</id>
+		<url></url>
+	</snapshotRepository>
+</distributionManagement>
+
+ {{if .PackageDescriptor.Metadata}} +
+ +
<dependency>
+	<groupId>{{.PackageDescriptor.Metadata.GroupID}}</groupId>
+	<artifactId>{{.PackageDescriptor.Metadata.ArtifactID}}</artifactId>
+	<version>{{.PackageDescriptor.Version.Version}}</version>
+</dependency>
+
+
+ +
mvn install
+
+
+ +
mvn dependency:get -DremoteRepositories= -Dartifact={{.PackageDescriptor.Metadata.GroupID}}:{{.PackageDescriptor.Metadata.ArtifactID}}:{{.PackageDescriptor.Version.Version}}
+
+
+ +
+ {{end}} +
+
+ + {{if .PackageDescriptor.Metadata}} + {{if .PackageDescriptor.Metadata.Description}} +

{{ctx.Locale.Tr "packages.about"}}

+
+ {{.PackageDescriptor.Metadata.Description}} +
+ {{end}} + + {{if .PackageDescriptor.Metadata.Dependencies}} +

{{ctx.Locale.Tr "packages.dependencies"}}

+
+
+ {{range .PackageDescriptor.Metadata.Dependencies}} +
+ {{svg "octicon-package-dependencies" 16 ""}} +
+
{{.GroupID}}:{{.ArtifactID}}
+
{{.Version}}
+
+
+ {{end}} +
+
+ {{end}} + {{end}} +{{end}} diff --git a/templates/package/content/npm.tmpl b/templates/package/content/npm.tmpl new file mode 100644 index 0000000..1ffbd19 --- /dev/null +++ b/templates/package/content/npm.tmpl @@ -0,0 +1,65 @@ +{{if eq .PackageDescriptor.Package.Type "npm"}} +

{{ctx.Locale.Tr "packages.installation"}}

+
+
+
+ +
{{if .PackageDescriptor.Metadata.Scope}}{{.PackageDescriptor.Metadata.Scope}}:{{end}}registry=
+
+
+ +
npm install {{.PackageDescriptor.Package.Name}}@{{.PackageDescriptor.Version.Version}}
+
+
+ +
"{{.PackageDescriptor.Package.Name}}": "{{.PackageDescriptor.Version.Version}}"
+
+
+ +
+
+
+ + {{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.Readme}} +

{{ctx.Locale.Tr "packages.about"}}

+
+ {{if .PackageDescriptor.Metadata.Readme}} +
+ {{RenderMarkdownToHtml $.Context .PackageDescriptor.Metadata.Readme}} +
+ {{else if .PackageDescriptor.Metadata.Description}} + {{.PackageDescriptor.Metadata.Description}} + {{end}} +
+ {{end}} + + {{if or .PackageDescriptor.Metadata.Dependencies .PackageDescriptor.Metadata.DevelopmentDependencies .PackageDescriptor.Metadata.PeerDependencies .PackageDescriptor.Metadata.OptionalDependencies}} +

{{ctx.Locale.Tr "packages.dependencies"}}

+
+
+ {{template "package/content/npm_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.Dependencies "title" (ctx.Locale.Tr "packages.npm.dependencies")}} + {{template "package/content/npm_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.DevelopmentDependencies "title" (ctx.Locale.Tr "packages.npm.dependencies.development")}} + {{template "package/content/npm_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.PeerDependencies "title" (ctx.Locale.Tr "packages.npm.dependencies.peer")}} + {{template "package/content/npm_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.OptionalDependencies "title" (ctx.Locale.Tr "packages.npm.dependencies.optional")}} +
+
+ {{end}} + + {{if .PackageDescriptor.Metadata.BundleDependencies}} +

{{ctx.Locale.Tr "packages.npm.dependencies.bundle"}}

+
+ {{range .PackageDescriptor.Metadata.BundleDependencies}} + {{.}} + {{end}} +
+ {{end}} + + {{if .PackageDescriptor.Metadata.Keywords}} +

{{ctx.Locale.Tr "packages.keywords"}}

+
+ {{range .PackageDescriptor.Metadata.Keywords}} + {{.}} + {{end}} +
+ {{end}} +{{end}} diff --git a/templates/package/content/npm_dependencies.tmpl b/templates/package/content/npm_dependencies.tmpl new file mode 100644 index 0000000..dba4575 --- /dev/null +++ b/templates/package/content/npm_dependencies.tmpl @@ -0,0 +1,19 @@ +{{if .dependencies}} +

{{.title}}

+ + + + + + + + + {{range $dependency, $version := .dependencies}} + + + + + {{end}} + +
{{ctx.Locale.Tr "packages.dependency.id"}}{{ctx.Locale.Tr "packages.dependency.version"}}
{{$dependency}}{{$version}}
+{{end}} diff --git a/templates/package/content/nuget.tmpl b/templates/package/content/nuget.tmpl new file mode 100644 index 0000000..ea665c7 --- /dev/null +++ b/templates/package/content/nuget.tmpl @@ -0,0 +1,51 @@ +{{if eq .PackageDescriptor.Package.Type "nuget"}} +

{{ctx.Locale.Tr "packages.installation"}}

+
+
+
+ +
dotnet nuget add source --name {{.PackageDescriptor.Owner.Name}} --username your_username --password your_token 
+
+
+ +
dotnet add package --source {{.PackageDescriptor.Owner.Name}} --version {{.PackageDescriptor.Version.Version}} {{.PackageDescriptor.Package.Name}}
+
+
+ +
+
+
+ + {{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.ReleaseNotes .PackageDescriptor.Metadata.Readme}} +

{{ctx.Locale.Tr "packages.about"}}

+ {{if .PackageDescriptor.Metadata.Description}}
{{RenderMarkdownToHtml $.Context .PackageDescriptor.Metadata.Description}}
{{end}} + {{if .PackageDescriptor.Metadata.Readme}}
{{RenderMarkdownToHtml $.Context .PackageDescriptor.Metadata.Readme}}
{{end}} + {{if .PackageDescriptor.Metadata.ReleaseNotes}}
{{RenderMarkdownToHtml $.Context .PackageDescriptor.Metadata.ReleaseNotes}}
{{end}} + {{end}} + + {{if .PackageDescriptor.Metadata.Dependencies}} +

{{ctx.Locale.Tr "packages.dependencies"}}

+
+ + + + + + + + + + {{range $framework, $dependencies := .PackageDescriptor.Metadata.Dependencies}} + {{range $dependencies}} + + + + + + {{end}} + {{end}} + +
{{ctx.Locale.Tr "packages.dependency.id"}}{{ctx.Locale.Tr "packages.dependency.version"}}{{ctx.Locale.Tr "packages.nuget.dependency.framework"}}
{{.ID}}{{.Version}}{{$framework}}
+
+ {{end}} +{{end}} diff --git a/templates/package/content/pub.tmpl b/templates/package/content/pub.tmpl new file mode 100644 index 0000000..8448b97 --- /dev/null +++ b/templates/package/content/pub.tmpl @@ -0,0 +1,19 @@ +{{if eq .PackageDescriptor.Package.Type "pub"}} +

{{ctx.Locale.Tr "packages.installation"}}

+
+
+
+ +
dart pub add {{.PackageDescriptor.Package.Name}}:{{.PackageDescriptor.Version.Version}} --hosted-url=
+
+
+ +
+
+
+ {{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.Readme}} +

{{ctx.Locale.Tr "packages.about"}}

+ {{if .PackageDescriptor.Metadata.Description}}
{{.PackageDescriptor.Metadata.Description}}
{{end}} + {{if .PackageDescriptor.Metadata.Readme}}
{{RenderMarkdownToHtml $.Context .PackageDescriptor.Metadata.Readme}}
{{end}} + {{end}} +{{end}} diff --git a/templates/package/content/pypi.tmpl b/templates/package/content/pypi.tmpl new file mode 100644 index 0000000..6addac3 --- /dev/null +++ b/templates/package/content/pypi.tmpl @@ -0,0 +1,31 @@ +{{if eq .PackageDescriptor.Package.Type "pypi"}} +

{{ctx.Locale.Tr "packages.installation"}}

+
+
+
+ +
pip install --index-url  {{.PackageDescriptor.Package.Name}}
+
+
+ +
+
+
+ {{if or .PackageDescriptor.Metadata.Description .PackageDescriptor.Metadata.LongDescription .PackageDescriptor.Metadata.Summary}} +

{{ctx.Locale.Tr "packages.about"}}

+
+

{{if .PackageDescriptor.Metadata.Summary}}{{.PackageDescriptor.Metadata.Summary}}{{end}}

+ {{if .PackageDescriptor.Metadata.LongDescription}} + {{RenderMarkdownToHtml $.Context .PackageDescriptor.Metadata.LongDescription}} + {{else if .PackageDescriptor.Metadata.Description}} + {{RenderMarkdownToHtml $.Context .PackageDescriptor.Metadata.Description}} + {{end}} +
+ {{end}} + {{if .PackageDescriptor.Metadata.RequiresPython}} +

{{ctx.Locale.Tr "packages.requirements"}}

+
+ {{ctx.Locale.Tr "packages.pypi.requires"}}: {{.PackageDescriptor.Metadata.RequiresPython}} +
+ {{end}} +{{end}} diff --git a/templates/package/content/rpm.tmpl b/templates/package/content/rpm.tmpl new file mode 100644 index 0000000..f5d5662 --- /dev/null +++ b/templates/package/content/rpm.tmpl @@ -0,0 +1,56 @@ +{{if eq .PackageDescriptor.Package.Type "rpm"}} +

{{ctx.Locale.Tr "packages.installation"}}

+
+
+
+ +
{{- if gt (len .Groups) 1 -}}
+# {{ctx.Locale.Tr "packages.rpm.repository.multiple_groups"}}
+
+{{end -}}
+# {{ctx.Locale.Tr "packages.rpm.distros.redhat"}}
+{{- range $group := .Groups}}
+	{{- if $group}}{{$group = print "/" $group}}{{end}}
+dnf config-manager --add-repo 
+{{- end}}
+
+# {{ctx.Locale.Tr "packages.rpm.distros.suse"}}
+{{- range $group := .Groups}}
+	{{- if $group}}{{$group = print "/" $group}}{{end}}
+zypper addrepo 
+{{- end}}
+
+
+ +
+
# {{ctx.Locale.Tr "packages.rpm.distros.redhat"}}
+dnf install {{$.PackageDescriptor.Package.Name}}
+
+# {{ctx.Locale.Tr "packages.rpm.distros.suse"}}
+zypper install {{$.PackageDescriptor.Package.Name}}
+
+
+
+ +
+
+
+ +

{{ctx.Locale.Tr "packages.rpm.repository"}}

+
+ + + + + + + +
{{ctx.Locale.Tr "packages.rpm.repository.architectures"}}
{{StringUtils.Join .Architectures ", "}}
+
+ + {{if or .PackageDescriptor.Metadata.Summary .PackageDescriptor.Metadata.Description}} +

{{ctx.Locale.Tr "packages.about"}}

+ {{if .PackageDescriptor.Metadata.Summary}}
{{.PackageDescriptor.Metadata.Summary}}
{{end}} + {{if .PackageDescriptor.Metadata.Description}}
{{.PackageDescriptor.Metadata.Description}}
{{end}} + {{end}} +{{end}} diff --git a/templates/package/content/rubygems.tmpl b/templates/package/content/rubygems.tmpl new file mode 100644 index 0000000..009fd70 --- /dev/null +++ b/templates/package/content/rubygems.tmpl @@ -0,0 +1,40 @@ +{{if eq .PackageDescriptor.Package.Type "rubygems"}} +

{{ctx.Locale.Tr "packages.installation"}}

+
+
+
+ +
gem install {{.PackageDescriptor.Package.Name}} --version "{{.PackageDescriptor.Version.Version}}" --source ""
+
+
+ +
source "" do
+	gem "{{.PackageDescriptor.Package.Name}}", "{{.PackageDescriptor.Version.Version}}"
+end
+
+
+ +
+
+
+ {{if .PackageDescriptor.Metadata.Description}} +

{{ctx.Locale.Tr "packages.about"}}

+
{{.PackageDescriptor.Metadata.Description}}
+ {{end}} + {{if or .PackageDescriptor.Metadata.RequiredRubyVersion .PackageDescriptor.Metadata.RequiredRubygemsVersion}} +

{{ctx.Locale.Tr "packages.requirements"}}

+
+ {{if .PackageDescriptor.Metadata.RequiredRubyVersion}}

{{ctx.Locale.Tr "packages.rubygems.required.ruby"}}: {{range $i, $v := .PackageDescriptor.Metadata.RequiredRubyVersion}}{{if gt $i 0}}, {{end}}{{$v.Restriction}}{{$v.Version}}{{end}}

{{end}} + {{if .PackageDescriptor.Metadata.RequiredRubygemsVersion}}

{{ctx.Locale.Tr "packages.rubygems.required.rubygems"}}: {{range $i, $v := .PackageDescriptor.Metadata.RequiredRubygemsVersion}}{{if gt $i 0}}, {{end}}{{$v.Restriction}}{{$v.Version}}{{end}}

{{end}} +
+ {{end}} + {{if or .PackageDescriptor.Metadata.RuntimeDependencies .PackageDescriptor.Metadata.DevelopmentDependencies}} +

{{ctx.Locale.Tr "packages.dependencies"}}

+
+
+ {{template "package/content/rubygems_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.RuntimeDependencies "title" (ctx.Locale.Tr "packages.rubygems.dependencies.runtime")}} + {{template "package/content/rubygems_dependencies" dict "root" $ "dependencies" .PackageDescriptor.Metadata.DevelopmentDependencies "title" (ctx.Locale.Tr "packages.rubygems.dependencies.development")}} +
+
+ {{end}} +{{end}} diff --git a/templates/package/content/rubygems_dependencies.tmpl b/templates/package/content/rubygems_dependencies.tmpl new file mode 100644 index 0000000..2c42dce --- /dev/null +++ b/templates/package/content/rubygems_dependencies.tmpl @@ -0,0 +1,19 @@ +{{if .dependencies}} +

{{.title}}

+ + + + + + + + + {{range .dependencies}} + + + + + {{end}} + +
{{ctx.Locale.Tr "packages.dependency.id"}}{{ctx.Locale.Tr "packages.dependency.version"}}
{{.Name}}{{range $i, $v := .Version}}{{if gt $i 0}}, {{end}}{{$v.Restriction}}{{$v.Version}}{{end}}
+{{end}} diff --git a/templates/package/content/swift.tmpl b/templates/package/content/swift.tmpl new file mode 100644 index 0000000..68db444 --- /dev/null +++ b/templates/package/content/swift.tmpl @@ -0,0 +1,40 @@ +{{if eq .PackageDescriptor.Package.Type "swift"}} +

{{ctx.Locale.Tr "packages.installation"}}

+
+
+
+ +
swift package-registry set 
+
+
+ +
dependencies: [
+	.package(id: "{{.PackageDescriptor.Package.Name}}", from:"{{.PackageDescriptor.Version.Version}}")
+]
+
+
+ +
swift package resolve
+
+
+ +
+
+
+ + {{if .PackageDescriptor.Metadata.Description}} +

{{ctx.Locale.Tr "packages.about"}}

+
+ {{if .PackageDescriptor.Metadata.Description}}{{.PackageDescriptor.Metadata.Description}}{{end}} +
+ {{end}} + + {{if .PackageDescriptor.Metadata.Keywords}} +

{{ctx.Locale.Tr "packages.keywords"}}

+
+ {{range .PackageDescriptor.Metadata.Keywords}} + {{.}} + {{end}} +
+ {{end}} +{{end}} diff --git a/templates/package/content/vagrant.tmpl b/templates/package/content/vagrant.tmpl new file mode 100644 index 0000000..4dc3e62 --- /dev/null +++ b/templates/package/content/vagrant.tmpl @@ -0,0 +1,18 @@ +{{if eq .PackageDescriptor.Package.Type "vagrant"}} +

{{ctx.Locale.Tr "packages.installation"}}

+
+
+
+ +
vagrant box add --box-version {{.PackageDescriptor.Version.Version}} ""
+
+
+ +
+
+
+ {{if .PackageDescriptor.Metadata.Description}} +

{{ctx.Locale.Tr "packages.about"}}

+
{{.PackageDescriptor.Metadata.Description}}
+ {{end}} +{{end}} -- cgit v1.2.3