# # This is a template package spec that will support Go builds following the OpenShift conventions. # It expects a set of standard env vars that define the Git version being built and can also handle # multi-architecture Linux builds. It has stubs for cross building. #debuginfo not supported with Go %global debug_package %{nil} # modifying the Go binaries breaks the DWARF debugging %global __os_install_post %{_rpmconfigdir}/brp-compress # %commit and %os_git_vars are intended to be set by tito custom builders provided # in the .tito/lib directory. The values in this spec file will not be kept up to date. %{!?commit: %global commit 6f75f8047dfab6ca8b979833f7f2a6036deee488 } %global shortcommit %(c=%{commit}; echo ${c:0:7}) # os_git_vars needed to run hack scripts during rpm builds %global os_git_vars OS_GIT_VERSION=4.4.0-202006080017-6f75f80 OS_GIT_MAJOR=4 OS_GIT_MINOR=4 OS_GIT_PATCH=0 OS_GIT_COMMIT=6f75f8047dfab6ca8b979833f7f2a6036deee488 OS_GIT_TREE_STATE=clean %if 0%{?skip_build} %global do_build 0 %else %global do_build 1 %endif %if 0%{?skip_prep} %global do_prep 0 %else %global do_prep 1 %endif %if 0%{?fedora} || 0%{?epel} %global need_redistributable_set 0 %else # Due to library availability, redistributable builds only work on x86_64 %ifarch x86_64 %global need_redistributable_set 1 %else %global need_redistributable_set 0 %endif %endif %{!?make_redistributable: %global make_redistributable %{need_redistributable_set}} # # Customize from here. # %global golang_version 1.10 %{!?version: %global version 0.0.1} %{!?release: %global release 1} %global package_name origin-service-catalog %global product_name Service Catalog %global import_path github.com/openshift/service-catalog Name: atomic-enterprise-service-catalog Version: 4.4.0 Release: 202006080017.git.1.77a5cc9%{?dist} Epoch: 1 Summary: Consume services in Kubernetes using the Open Service Broker API License: ASL 2.0 URL: https://%{import_path} Source0: atomic-enterprise-service-catalog-git-1.77a5cc9.tar.gz BuildRequires: golang >= %{golang_version} # If go_arches not defined fall through to implicit golang archs %if 0%{?go_arches:1} ExclusiveArch: %{go_arches} %else ExclusiveArch: x86_64 aarch64 ppc64le s390x %endif ### AUTO-BUNDLED-GEN-ENTRY-POINT %description [Maintainer] product: OpenShift Container Platform, component: Service Catalog %{summary} %package svcat Summary: A domain-specific CLI tool to make interacting with Service Catalog easier %description svcat [Maintainer] product: OpenShift Container Platform, component: Service Catalog ${summary} %prep %if 0%{do_prep} %setup -q -n atomic-enterprise-service-catalog-git-1.77a5cc9 %endif %build %if 0%{do_build} %if 0%{make_redistributable} # Create Binaries for all internally defined arches %{os_git_vars} make build-cross %else # Create Binaries only for building arch %ifarch x86_64 BUILD_PLATFORM="linux/amd64" %endif %ifarch %{ix86} BUILD_PLATFORM="linux/386" %endif %ifarch ppc64le BUILD_PLATFORM="linux/ppc64le" %endif %ifarch %{arm} aarch64 BUILD_PLATFORM="linux/arm64" %endif %ifarch s390x BUILD_PLATFORM="linux/s390x" %endif OS_ONLY_BUILD_PLATFORMS="${BUILD_PLATFORM}" %{os_git_vars} make build-cross %endif %endif %install PLATFORM="$(go env GOHOSTOS)/$(go env GOHOSTARCH)" install -d %{buildroot}%{_bindir} # Install linux components for bin in service-catalog svcat do echo "+++ INSTALLING ${bin}" install -p -m 755 _output/local/bin/${PLATFORM}/${bin} %{buildroot}%{_bindir}/${bin} done # EXAMPLE: Install tests # install -d %{buildroot}%{_libexecdir}/%{name} # install -p -m 755 _output/local/bin/${PLATFORM}/extended.test %{buildroot}%{_libexecdir}/%{name}/ # EXAMPLE: Install other files # install -p -m 0755 _output/local/bin/${PLATFORM}/sdn-cni-plugin %{buildroot}/opt/cni/bin/openshift-sdn %files %doc README.md %license LICENSE %{_bindir}/service-catalog # EXAMPLE: Managing configuration # %defattr(-,root,root,0700) # %dir %config(noreplace) %{_sysconfdir}/origin # %ghost %dir %config(noreplace) %{_sysconfdir}/origin # %ghost %config(noreplace) %{_sysconfdir}/origin/.config_managed %files svcat %doc README.md %license LICENSE %{_bindir}/svcat %pre %changelog * Mon Nov 06 2017 Anonymous 0.0.1 - Initial example of spec.