Add spec & change files for openSUSE
These will be used with the Open Build Service (OBS) an _service will be used to automagically generate the tarball. 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: 36650 Task: 36651 Task: 36652 Task: 36653 Change-Id: Ie59e8403a6f3173a678f5fd1cd5cf03df4a7e961 Signed-off-by: Saul Wold <sgw@linux.intel.com>
This commit is contained in:
4
storageconfig/opensuse/storageconfig.changes
Normal file
4
storageconfig/opensuse/storageconfig.changes
Normal file
@@ -0,0 +1,4 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 13 08:14:42 UTC 2019 - xe1gyq@gmail.com
|
||||
|
||||
- 1.0 Initial Commit
|
||||
67
storageconfig/opensuse/storageconfig.spec
Normal file
67
storageconfig/opensuse/storageconfig.spec
Normal file
@@ -0,0 +1,67 @@
|
||||
%define local_etc_initd /etc/init.d/
|
||||
%define local_etc_goenabledd /etc/goenabled.d/
|
||||
%define debug_package %{nil}
|
||||
|
||||
Name: storageconfig
|
||||
Version: 1.0
|
||||
Release: 1
|
||||
License: Apache-2.0
|
||||
Summary: Initial Storage Node Configuration
|
||||
Url: https://opendev.org/starlingx/config
|
||||
Group: Development/Tools/Other
|
||||
Source: %{name}-%{version}.tar.gz
|
||||
|
||||
BuildRequires: systemd-devel
|
||||
Requires: systemd
|
||||
BuildRequires: insserv-compat
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
||||
StarlingX initial storage node configuration
|
||||
|
||||
%prep
|
||||
%setup -n %{name}-%{version}/%{name}
|
||||
|
||||
%build
|
||||
|
||||
%install
|
||||
make install \
|
||||
INITDDIR=%{buildroot}%{local_etc_initd} \
|
||||
GOENABLEDDIR=%{buildroot}%{local_etc_goenabledd} \
|
||||
SYSTEMDDIR=%{buildroot}%{_unitdir}
|
||||
|
||||
install -dD -m 0755 %{buildroot}%{_sbindir}
|
||||
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcstorageconfig
|
||||
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rcstorage_config
|
||||
|
||||
%pre
|
||||
%service_add_pre storageconfig.service
|
||||
|
||||
%post
|
||||
%service_add_post storageconfig.service
|
||||
|
||||
%preun
|
||||
%stop_on_removal
|
||||
%service_del_preun storageconfig.service
|
||||
|
||||
%postun
|
||||
%restart_on_update
|
||||
%insserv_cleanup
|
||||
%service_del_postun storageconfig.service
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc LICENSE
|
||||
%dir %{local_etc_initd}/
|
||||
%dir %{local_etc_goenabledd}/
|
||||
%{local_etc_initd}/*
|
||||
%{local_etc_goenabledd}/*
|
||||
%{_sbindir}/rcstorageconfig
|
||||
%{_sbindir}/rcstorage_config
|
||||
%{_unitdir}/*
|
||||
|
||||
%changelog
|
||||
Reference in New Issue
Block a user