openSUSE: Open Build Service Artifacts

Build Service Management using Open Build Service (OBS) with the following
base artifacts:
- Specfile
- Changelog

OBS is a generic system to build and distribute binary packages from
sources [0], StarlingX OBS Project:
- Cloud:starlingx:2.0 [1]

[0] openbuildservice.org
[1] https://build.opensuse.org/project/show/Cloud:StarlingX:2.0

Story: 2006508
Task: 36549
Task: 36550

Change-Id: Ie42be9038b8ddb2257a2b97c26404b82e428a680
Signed-off-by: Hayde Martinez <hayde.martinez.landa@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
This commit is contained in:
Hayde Martinez
2019-09-09 15:46:29 -05:00
committed by Saul Wold
parent 960947c23f
commit 0bf8acbee6
4 changed files with 164 additions and 0 deletions

View File

@@ -0,0 +1,79 @@
Summary: Worker config package
Name: workerconfig
Version: 1.0
Release: %{tis_patch_ver}%{?_tis_dist}
License: Apache-2.0
Group: System/Packages
URL: https://opendev.org/starlingx/config/
Source0: %{name}-%{version}.tar.gz
BuildArch: noarch
%define debug_package %{nil}
BuildRequires: systemd
Requires: pkgconfig(systemd)
%description
Initial worker node configuration package for StarlingX project.
%package -n workerconfig-standalone
Summary: The worker config standalone package
Group: System/Packages
%description -n workerconfig-standalone
Initial worker node configuration for StarlingX project.
%package -n workerconfig-subfunction
Summary: The worker config subfunction package
Group: System/Packages
%description -n workerconfig-subfunction
Initial worker node configuration for StarlingX project.
%define initddir %{_sysconfdir}/init.d/
%define goenableddir %{_sysconfdir}/goenabled.d/
%define systemddir %{_sysconfdir}/systemd/system/
%prep
%setup -n %{name}-%{version}/%{name}
%build
%install
make install INITDDIR=%{buildroot}%{initddir} GOENABLEDDIR=%{buildroot}%{goenableddir} SYSTEMDDIR=%{buildroot}%{systemddir}
%post -n workerconfig-standalone
cp $D%{systemddir}/config/workerconfig-standalone.service $D%{systemddir}/workerconfig.service
systemctl enable workerconfig.service
%post -n workerconfig-subfunction
cp $D%{systemddir}/config/workerconfig-combined.service $D%{systemddir}/workerconfig.service
systemctl enable workerconfig.service
%clean
%files
%defattr(-,root,root,-)
%doc LICENSE
%{initddir}/*
%files -n workerconfig-standalone
%defattr(-,root,root,-)
%dir %{systemddir}/config
%{systemddir}/config/workerconfig-standalone.service
%{goenableddir}/*
%dir %{_sysconfdir}/goenabled.d
%dir %{_sysconfdir}/systemd
%dir %{_sysconfdir}/systemd/system
%config %{systemddir}/config/workerconfig-standalone.service
%files -n workerconfig-subfunction
%defattr(-,root,root,-)
%dir %{systemddir}/config
%{systemddir}/config/workerconfig-combined.service
%dir %{_sysconfdir}/systemd
%dir %{_sysconfdir}/systemd/system
%config %{systemddir}/config/workerconfig-combined.service
%changelog