# This RPM spec file exists primarily to enable CI/CD pipelines and automatic # testing of built RPMs. This RPM can be used as a suitable baseline for a # proper distribution package, but changes should be made to suit the needs of # the package. %define debug_package %{nil} Name: rhc Version: 0.2.99 Release: 0.0.git.06fa935 Summary: Client for registering Red Hat Enterprise Linux systems License: GPLv3 URL: https://github.com/redhatinsights/rhc Source0: %{name}-%{version}-%{release}.tar.gz Source1: https://github.com/marusak/yggdrasil/archive/refs/heads/main.tar.gz ExclusiveArch: %{go_arches} Requires: insights-client BuildRequires: git BuildRequires: golang BuildRequires: dbus-devel BuildRequires: systemd-devel %description rhc is a client that registers a system with RHSM and activates the Red Hat yggd MQTT client. %prep %setup -n %{name}-%{version}-%{release} -a 0 %setup -n %{name}-%{version}-%{release} -a 1 %build cd yggdrasil-main make PREFIX=%{_prefix} \ SYSCONFDIR=%{_sysconfdir} \ LOCALSTATEDIR=%{_localstatedir} \ SHORTNAME=rhc \ LONGNAME=rhc \ PKGNAME=rhc \ BRANDNAME=rhc \ TOPICPREFIX=redhat/insights \ VERSION=%{version} \ DATAHOST=cert.cloud.redhat.com \ 'PROVIDER=Red Hat' cd .. make PREFIX=%{_prefix} \ SYSCONFDIR=%{_sysconfdir} \ LOCALSTATEDIR=%{_localstatedir} \ SHORTNAME=rhc \ LONGNAME=rhc \ PKGNAME=rhc \ BRANDNAME=rhc \ TOPICPREFIX=redhat/insights \ VERSION=%{version} \ DATAHOST=cert.cloud.redhat.com \ 'PROVIDER=Red Hat' %install cd yggdrasil-main make PREFIX=%{_prefix} \ SYSCONFDIR=%{_sysconfdir} \ LOCALSTATEDIR=%{_localstatedir} \ DESTDIR=%{buildroot} \ SHORTNAME=rhc \ LONGNAME=rhc \ PKGNAME=rhc \ BRANDNAME=rhc \ TOPICPREFIX=redhat/insights \ VERSION=%{version} \ DATAHOST=cert.cloud.redhat.com \ 'PROVIDER=Red Hat' \ install cd .. make PREFIX=%{_prefix} \ SYSCONFDIR=%{_sysconfdir} \ LOCALSTATEDIR=%{_localstatedir} \ DESTDIR=%{buildroot} \ SHORTNAME=rhc \ LONGNAME=rhc \ PKGNAME=rhc \ BRANDNAME=rhc \ TOPICPREFIX=redhat/insights \ VERSION=%{version} \ DATAHOST=cert.cloud.redhat.com \ 'PROVIDER=Red Hat' \ install %files %doc README.md %{_bindir}/rhc %{_sbindir}/rhcd %config(noreplace) %{_sysconfdir}/rhc/config.toml %{_unitdir}/rhcd.service %{_datadir}/bash-completion/completions/* %{_mandir}/man1/* %{_prefix}/share/pkgconfig/rhc.pc %{_libexecdir}/rhc %changelog