diff --git a/golang-github-hashicorp-hcl.spec b/golang-github-hashicorp-hcl.spec index 77a72ee..ce859e0 100644 --- a/golang-github-hashicorp-hcl.spec +++ b/golang-github-hashicorp-hcl.spec @@ -12,7 +12,7 @@ License: MPLv2.0 URL: %{gourl} Source0: %{gosource} Source1: glide.yaml -Source2: glide.yaml +Source2: glide.lock %description %{summary} @@ -42,13 +42,32 @@ files="$(find . -iname 'test-fixtures' -type d) $(find . -iname 'testdata' -type %check %gochecks -d hcl/ast -d hcl/fmtcmd +%pretrans -p devel +-- Define the path to directory being replaced below. +-- DO NOT add a trailing slash at the end. +path = "/usr/share/gocode/src/github.com/hashicorp/hcl/glide.lock" +st = posix.stat(path) +if st and st.type == "directory" then + status = os.rename(path, path .. ".rpmmoved") + if not status then + suffix = 0 + while not status do + suffix = suffix + 1 + status = os.rename(path .. ".rpmmoved", path .. ".rpmmoved." .. suffix) + end + os.rename(path, path .. ".rpmmoved") + end +end + %files devel -f devel.file-list %license LICENSE %doc README.md +%ghost /usr/share/gocode/src/github.com/hashicorp/hcl/glide.lock.rpmmoved %changelog * Sat Feb 16 2019 Elliott Sales de Andrade - 1.0.0-2 - Fix broken test data packaging +- Fix packaging of glide.lock * Tue Feb 05 2019 Elliott Sales de Andrade - 1.0.0-1 - Update to first tagged version