From 2d8414db23239d1d8bd588cd893823dc570781d8a1dccdd9f38650096adde4ae Mon Sep 17 00:00:00 2001
From: Michael Vetter <jubalh@iodoru.org>
Date: Sat, 1 Oct 2022 08:02:53 +0000
Subject: [PATCH] Accepting request 1007297 from home:fbonazzi

Add chezmoi build for openSUSE

OBS-URL: https://build.opensuse.org/request/show/1007297
OBS-URL: https://build.opensuse.org/package/show/utilities/chezmoi?expand=0&rev=1
---
 .gitattributes         | 23 +++++++++++
 .gitignore             |  1 +
 _service               | 17 ++++++++
 _servicedata           |  4 ++
 chezmoi-2.24.0.obscpio |  3 ++
 chezmoi.changes        |  9 ++++
 chezmoi.obsinfo        |  4 ++
 chezmoi.spec           | 94 ++++++++++++++++++++++++++++++++++++++++++
 vendor.tar.gz          |  3 ++
 9 files changed, 158 insertions(+)
 create mode 100644 .gitattributes
 create mode 100644 .gitignore
 create mode 100644 _service
 create mode 100644 _servicedata
 create mode 100644 chezmoi-2.24.0.obscpio
 create mode 100644 chezmoi.changes
 create mode 100644 chezmoi.obsinfo
 create mode 100644 chezmoi.spec
 create mode 100644 vendor.tar.gz

diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..9b03811
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,23 @@
+## Default LFS
+*.7z filter=lfs diff=lfs merge=lfs -text
+*.bsp filter=lfs diff=lfs merge=lfs -text
+*.bz2 filter=lfs diff=lfs merge=lfs -text
+*.gem filter=lfs diff=lfs merge=lfs -text
+*.gz filter=lfs diff=lfs merge=lfs -text
+*.jar filter=lfs diff=lfs merge=lfs -text
+*.lz filter=lfs diff=lfs merge=lfs -text
+*.lzma filter=lfs diff=lfs merge=lfs -text
+*.obscpio filter=lfs diff=lfs merge=lfs -text
+*.oxt filter=lfs diff=lfs merge=lfs -text
+*.pdf filter=lfs diff=lfs merge=lfs -text
+*.png filter=lfs diff=lfs merge=lfs -text
+*.rpm filter=lfs diff=lfs merge=lfs -text
+*.tbz filter=lfs diff=lfs merge=lfs -text
+*.tbz2 filter=lfs diff=lfs merge=lfs -text
+*.tgz filter=lfs diff=lfs merge=lfs -text
+*.ttf filter=lfs diff=lfs merge=lfs -text
+*.txz filter=lfs diff=lfs merge=lfs -text
+*.whl filter=lfs diff=lfs merge=lfs -text
+*.xz filter=lfs diff=lfs merge=lfs -text
+*.zip filter=lfs diff=lfs merge=lfs -text
+*.zst filter=lfs diff=lfs merge=lfs -text
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..57affb6
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+.osc
diff --git a/_service b/_service
new file mode 100644
index 0000000..654404e
--- /dev/null
+++ b/_service
@@ -0,0 +1,17 @@
+<services>
+  <service name="obs_scm" mode="manual">
+    <param name="scm">git</param>
+    <param name="url">https://github.com/twpayne/chezmoi.git</param>
+    <param name="revision">v2.24.0</param>
+    <param name="versionformat">@PARENT_TAG@</param>
+    <param name="versionrewrite-pattern">v(.*)</param>
+    <param name="changesgenerate">enable</param>
+  </service>
+  <service name="go_modules" mode="manual"/>
+  <service name="tar" mode="buildtime"/>
+  <service name="recompress" mode="buildtime">
+    <param name="file">*.tar</param>
+    <param name="compression">gz</param>
+  </service>
+  <service name="set_version" mode="buildtime"/>
+</services>
diff --git a/_servicedata b/_servicedata
new file mode 100644
index 0000000..b7454d5
--- /dev/null
+++ b/_servicedata
@@ -0,0 +1,4 @@
+<servicedata>
+<service name="tar_scm">
+                <param name="url">https://github.com/twpayne/chezmoi.git</param>
+              <param name="changesrevision">72d9846a7ae51fd3398727d48815fc2f13a681f9</param></service></servicedata>
\ No newline at end of file
diff --git a/chezmoi-2.24.0.obscpio b/chezmoi-2.24.0.obscpio
new file mode 100644
index 0000000..9987f81
--- /dev/null
+++ b/chezmoi-2.24.0.obscpio
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:bfbf9d6db1f1f58de7e6921a4d4ef5c408afee06d49ddda48db9ee255705a06e
+size 4534284
diff --git a/chezmoi.changes b/chezmoi.changes
new file mode 100644
index 0000000..9a462d2
--- /dev/null
+++ b/chezmoi.changes
@@ -0,0 +1,9 @@
+-------------------------------------------------------------------
+Fri Sep 30 15:27:54 UTC 2022 - Filippo Bonazzi <filippo.bonazzi@suse.com>
+
+- Clean up spec file
+
+-------------------------------------------------------------------
+Thu Sep 29 21:42:17 UTC 2022 - Filippo Bonazzi <filippo.bonazzi@suse.com>
+
+- Initial version 2.24.0
diff --git a/chezmoi.obsinfo b/chezmoi.obsinfo
new file mode 100644
index 0000000..78788f4
--- /dev/null
+++ b/chezmoi.obsinfo
@@ -0,0 +1,4 @@
+name: chezmoi
+version: 2.24.0
+mtime: 1664126290
+commit: 72d9846a7ae51fd3398727d48815fc2f13a681f9
diff --git a/chezmoi.spec b/chezmoi.spec
new file mode 100644
index 0000000..1b1872b
--- /dev/null
+++ b/chezmoi.spec
@@ -0,0 +1,94 @@
+#
+# spec file for package chezmoi
+#
+# Copyright (c) 2022 SUSE LINUX GmbH, Nuernberg, Germany.
+#
+# All modifications and additions to the file contributed by third parties
+# remain the property of their copyright owners, unless otherwise agreed
+# upon. The license for this file, and modifications and additions to the
+# file, is the same license as for the pristine package itself (unless the
+# license for the pristine package is not an Open Source License, in which
+# case the license is the MIT License). An "Open Source License" is a
+# license that conforms to the Open Source Definition (Version 1.9)
+# published by the Open Source Initiative.
+
+# Please submit bugfixes or comments via http://bugs.opensuse.org/
+#
+Name:           chezmoi
+Version:        2.24.0
+Release:        0
+Summary:        Manage your dotfiles across multiple machines, securely
+License:        MIT
+Group:          Development/Tools/Version Control
+Url:            https://chezmoi.io
+Source:         %{name}-%{version}.tar.gz
+Source1:        vendor.tar.gz
+Recommends:     git
+BuildRequires:  golang(API) >= 1.18
+
+%description
+Manage your dotfiles across multiple machines, securely.
+
+%package bash-completion
+Summary:        Bash completion for %{name}
+Requires:       %{name} = %{version}
+Supplements:    (%{name} and bash-completion)
+BuildArch:      noarch
+
+%description bash-completion
+Bash command line completion support for %{name}.
+
+%package fish-completion
+Summary:        Fish completion for %{name}
+Requires:       %{name} = %{version}
+Supplements:    (%{name} and fish)
+BuildArch:      noarch
+
+%description fish-completion
+Fish command line completion support for %{name}.
+
+%package zsh-completion
+Summary:        Zsh completion for %{name}
+Requires:       %{name} = %{version}
+Supplements:    (%{name} and zsh)
+BuildArch:      noarch
+
+%description zsh-completion
+Zsh command line completion support for %{name}.
+
+%prep
+%autosetup -a 1
+
+%build
+go build \
+        -mod=vendor \
+        -buildmode=pie \
+        -tags noupgrade \
+        -ldflags "-X main.version=%version
+                  -X main.builtBy=build.opensuse.org"
+
+%install
+install -D -m 0755 %{name} "%{buildroot}/%{_bindir}/%{name}"
+install -D -m 0644 "completions/%{name}-completion.bash" "%{buildroot}/%{_datadir}/bash-completion/completions/%{name}"
+install -D -m 0644 "completions/%{name}.fish" "%{buildroot}/%{_datadir}/fish/vendor_completions.d/%{name}.fish"
+install -D -m 0644 "completions/%{name}.zsh" "%{buildroot}/%{_datadir}/zsh/site-functions/_%{name}"
+
+%files
+%license LICENSE
+%doc README.md
+%{_bindir}/%{name}
+
+%files bash-completion
+%{_datadir}/bash-completion/completions/%{name}
+
+%files fish-completion
+%dir %{_datadir}/fish
+%dir %{_datadir}/fish/vendor_completions.d
+%{_datadir}/fish/vendor_completions.d/%{name}.fish
+
+%files zsh-completion
+%dir %{_datadir}/zsh
+%dir %{_datadir}/zsh/site-functions
+%{_datadir}/zsh/site-functions/_%{name}
+
+%changelog
diff --git a/vendor.tar.gz b/vendor.tar.gz
new file mode 100644
index 0000000..18bfc27
--- /dev/null
+++ b/vendor.tar.gz
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a73fa44e8de1b40050f83648e6507029a934630cc6024f26c53afea7e9138d8f
+size 6046472