metal/mtce-compute/opensuse/mtce-compute.spec
Marcela Rosales b5f12793a1 Update openSUSE OBS artifacts to build MTCE packages
The openSUSE spec files needs to have the path of the source code in
the setup to have the package generation automated through _service
file in OBS.

Change-Id: I2b7c08d5772025c02821dfb9fc944fff0f5b6f90
Story: 2006508
Task: 36812
Signed-off-by: Marcela Rosales <marcela.a.rosales.jimenez@intel.com>
2019-10-01 11:07:10 -05:00

52 lines
1.3 KiB
RPMSpec

%define local_etc_goenabledd %{_sysconfdir}/goenabled.d
Summary: Compute Node Maintenance Package
Name: mtce-compute
Version: 1.0.0
Release: 1
License: Apache-2.0
Group: Development/Tools/Other
URL: https://opendev.org/starlingx/metal
Source0: %{name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: systemd
BuildRequires: systemd-devel
Requires: bash
Requires: systemd
Requires: qemu-kvm
%description
Maintenance support files for compute-only node type
%prep
%autosetup -n %{name}-%{version}/src
%build
%install
make install buildroot=%{buildroot} _sysconfdir=%{_sysconfdir} _unitdir=%{_unitdir} _datarootdir=%{_datarootdir}
%pre
%service_add_pre goenabled-worker.service goenabled-worker.target
%post
%service_add_post goenabled-worker.service goenabled-worker.target
/bin/systemctl enable goenabled-worker.service
%preun
%service_del_preun goenabled-worker.service goenabled-worker.target
%postun
%service_del_postun goenabled-worker.service goenabled-worker.target
%files
%defattr(-,root,root,-)
%dir %{_sysconfdir}/goenabled.d
%dir %{_datarootdir}/licenses/mtce-compute-1.0
%{_sysconfdir}/init.d/goenabledWorker
%{local_etc_goenabledd}/virt-support-goenabled.sh
%{_unitdir}/goenabled-worker.service
%license %{_datarootdir}/licenses/mtce-compute-1.0/LICENSE
%changelog