%define debug_package %{nil} Name: xe-guest-utilities Version: v7.10.0 Release: 1%{?dist} Summary: This is the golang guest utilites for XenServer Group: Xen License: BSD 2-Clause "Simplified" License URL: https://github.com/xenserver/xe-guest-utilities Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz Source1: proc-xen.mount Source2: xe-linux-distribution.service BuildRequires: golang make Obsoletes: xengmond Patch1: version.patch Patch2: systemd.patch %description %package xenstore Summary: Linux XenStore utilities Group: Xen %description xenstore Utilities for interacting with XenStore from with a Xen virtual machine %prep %setup -q -n %{name}-7.10.0 %patch1 -p1 %patch2 -p1 %build make build %install rm -rf %{buildroot} mkdir -p %{buildroot}/usr/sbin/ mkdir -p %{buildroot}/usr/bin/ mkdir -p %{buildroot}/usr/share/doc/%{name}-%{version}/examples/ mkdir -p %{buildroot}/etc/systemd/system mkdir -p %{buildroot}/etc/udev/rules.d install -m 755 build/stage/usr/sbin/xe-linux-distribution %{buildroot}/usr/sbin/xe-linux-distribution chmod 755 %{buildroot}/usr/sbin/xe-linux-distribution install -m 755 build/stage/usr/sbin/xe-daemon %{buildroot}/usr/sbin/xe-daemon cp %{SOURCE2} %{buildroot}/etc/systemd/system/xe-linux-distribution.service cp build/stage/etc/udev/rules.d/z10_xen-vcpu-hotplug.rules %{buildroot}/etc/udev/rules.d/10-xen-vcpu-hotplug.rules install -m 755 build/stage/usr/bin/xenstore %{buildroot}/usr/bin/xenstore ln -s /usr/bin/xenstore %{buildroot}/usr/bin/xenstore-read ln -s /usr/bin/xenstore %{buildroot}/usr/bin/xenstore-write ln -s /usr/bin/xenstore %{buildroot}/usr/bin/xenstore-exists ln -s /usr/bin/xenstore %{buildroot}/usr/bin/xenstore-rm cp %{SOURCE1} %{buildroot}/etc/systemd/system/ %files %defattr(-,root,root,-) /usr/sbin/xe-linux-distribution /etc/systemd/system/xe-linux-distribution.service /etc/systemd/system/proc-xen.mount /usr/sbin/xe-daemon /etc/udev/rules.d/10-xen-vcpu-hotplug.rules %files xenstore %defattr(-,root,root,-) /usr/bin/xenstore-* /usr/bin/xenstore %changelog