diff --git a/pkg/gen/funcs.go b/pkg/gen/funcs.go index 6906a94..c0b6c51 100644 --- a/pkg/gen/funcs.go +++ b/pkg/gen/funcs.go @@ -1,8 +1,12 @@ package gen -import "text/template" +import ( + "strings" + "text/template" +) var funcs = template.FuncMap{ + "tolower": strings.ToLower, "firstchar": func(s string) string { return s[:1] }, diff --git a/pkg/gen/tmpls/pip.tmpl.sh b/pkg/gen/tmpls/pip.tmpl.sh index f5167b9..c92d144 100644 --- a/pkg/gen/tmpls/pip.tmpl.sh +++ b/pkg/gen/tmpls/pip.tmpl.sh @@ -1,4 +1,4 @@ -name='{{.name}}' +name='{{.name | tolower}}' version='{{.version}}' release='1' desc='{{.description}}' @@ -6,8 +6,8 @@ homepage='https://example.com' maintainer='Example ' architectures=('all') license=('custom:Unknown') -provides=('{{.name}}') -conflicts=('{{.name}}') +provides=('{{.name | tolower}}') +conflicts=('{{.name | tolower}}') deps=("python3") deps_arch=("python")