From 051f246e513b57d3eb952f99861e5735e9922ffa Mon Sep 17 00:00:00 2001 From: Raboneko <119771935+raboneko@users.noreply.github.com> Date: Sat, 1 Mar 2025 00:48:33 -0800 Subject: [PATCH] add: devpod (#2898) (#3613) * add: devpod * Delete anda/langs/go/devpod/devpod.spec Signed-off-by: madomado * anda-srpm-macros Signed-off-by: madomado * bump Signed-off-by: madomado * rm go.sum? Signed-off-by: madomado --------- Signed-off-by: madomado (cherry picked from commit 9e2b7c842a252f0ea140b5c183dac600fb36b1b4) Co-authored-by: madomado --- anda/langs/go/devpod/anda.hcl | 5 + .../devpod/golang-github-loft-sh-devpod.spec | 91 +++++++++++++++++++ 2 files changed, 96 insertions(+) create mode 100644 anda/langs/go/devpod/anda.hcl create mode 100644 anda/langs/go/devpod/golang-github-loft-sh-devpod.spec diff --git a/anda/langs/go/devpod/anda.hcl b/anda/langs/go/devpod/anda.hcl new file mode 100644 index 0000000000..a108997db7 --- /dev/null +++ b/anda/langs/go/devpod/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "golang-github-loft-sh-devpod.spec" + } +} diff --git a/anda/langs/go/devpod/golang-github-loft-sh-devpod.spec b/anda/langs/go/devpod/golang-github-loft-sh-devpod.spec new file mode 100644 index 0000000000..44d3798b83 --- /dev/null +++ b/anda/langs/go/devpod/golang-github-loft-sh-devpod.spec @@ -0,0 +1,91 @@ +# Generated by go2rpm 1.15.0 +%bcond check 0 +%bcond bootstrap 0 + +%dnl %if %{with bootstrap} +%global debug_package %{nil} +%dnl %endif + +%if %{with bootstrap} +%global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^golang\\(.*\\)$ +%endif + +# https://github.com/loft-sh/devpod +%global goipath github.com/loft-sh/devpod +Version: 0.6.9 + +%gometa -f + +%global common_description %{expand: +Codespaces but open-source, client-only and unopinionated: Works with any IDE +and lets you use any cloud, kubernetes or just localhost docker.} + +%global golicenses LICENSE +%global godocs docs examples COMMUNITY.md CONTRIBUTING.md README.md\\\ + SECURITY.md desktop/README.md e2e/README.md\\\ + loadtest/README.md + +Name: devpod +Release: %autorelease +Summary: Codespaces but open-source, client-only and unopinionated: Works with any IDE and lets you use any cloud, kubernetes or just localhost docker +Provides: golang-github-loft-sh-devpod +BuildRequires: anda-srpm-macros + +License: MPL-2.0 +URL: https://devpod.sh +Source: %{gosource} + +%description %{common_description} + +#gopkg + +%prep +%autosetup -n %name-%version +rm go.sum +%go_prep_online + +%dnl %if %{without bootstrap} +%dnl %generate_buildrequires +%dnl %go_generate_buildrequires +%dnl %endif + +%if %{without bootstrap} +%build +%dnl for cmd in cmd/* ; do + %dnl out="%{gobuilddir}/bin/$(basename $cmd)" + %dnl %go_build_online "%{goipath}/$cmd" $out +%dnl done +%go_build_online +%dnl for cmd in hack/pro; do + %dnl out="%{gobuilddir}/bin/$(basename $cmd)" + %dnl %go_build_online "%{goipath}/$cmd" $out +%dnl done +%endif + +%install +#gopkginstall +%if %{without bootstrap} +install -m 0755 -vd %{buildroot}%{_bindir} +%dnl install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ +install -m 0755 -vp build/bin/* %{buildroot}%{_bindir}/ +%endif + +%if %{without bootstrap} +%if %{with check} +%check +%gocheck +%endif +%endif + +%if %{without bootstrap} +%files +%license LICENSE +%doc docs examples COMMUNITY.md CONTRIBUTING.md README.md SECURITY.md +%doc desktop/README.md e2e/README.md loadtest/README.md +%{_bindir}/devpod +%endif + +#gopkgfiles + +%changelog +%autochangelog