mirror of
https://github.com/goreleaser/nfpm
synced 2024-06-02 06:36:19 +02:00
rpm: bindir
This commit is contained in:
parent
74f4bdaa15
commit
6a25e65a17
1
pkg.go
1
pkg.go
|
@ -51,6 +51,7 @@ type Info struct {
|
|||
Vendor string `yaml:"vendor,omitempty"`
|
||||
Homepage string `yaml:"homepage,omitempty"`
|
||||
License string `yaml:"license,omitempty"`
|
||||
Bindir string `yaml:"bindir,omitempty"`
|
||||
Files map[string]string `yaml:"files,omitempty"`
|
||||
ConfigFiles map[string]string `yaml:"config_files,omitempty"`
|
||||
}
|
||||
|
|
|
@ -175,6 +175,7 @@ const specTemplate = `
|
|||
%define debug_package %{nil}
|
||||
%define __os_install_post %{_dbpath}/brp-compress
|
||||
%define _arch {{.Arch}}
|
||||
%define _bindir {{.Bindir}}
|
||||
|
||||
Name: {{ .Name }}
|
||||
Summary: {{ first_line .Description }}
|
||||
|
@ -226,12 +227,12 @@ rm -rf %{buildroot}
|
|||
{{ range $index, $element := .Files }}
|
||||
{{ . }}
|
||||
{{ end }}
|
||||
# %{_bindir}/*
|
||||
%{_bindir}/*
|
||||
{{ range $index, $element := .ConfigFiles }}
|
||||
{{ . }}
|
||||
{{ end }}
|
||||
{{ range $index, $element := .ConfigFiles }}
|
||||
#%config(noreplace) {{ . }}
|
||||
%config(noreplace) {{ . }}
|
||||
{{ end }}
|
||||
|
||||
%changelog
|
||||
|
|
|
@ -27,6 +27,7 @@ func TestRPM(t *testing.T) {
|
|||
Homepage: "http://carlosbecker.com",
|
||||
Vendor: "nope",
|
||||
License: "MIT",
|
||||
Bindir: "/usr/local/bin",
|
||||
Files: map[string]string{
|
||||
"../testdata/fake": "/usr/local/bin/fake",
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue