ha/service-mgmt/sm-db/opensuse/libsm_db1.spec
Abraham Arce f38de3f45f openSUSE: Open Build Service Artifacts
OBS is a generic system to build and distribute binary packages
from sources [0], StarlingX OBS Project:

- Cloud:StarlingX:2.0 [1]

Build Service Management uses Open Build Service (OBS) with the
following base artifacts under Service Management repository:

- Specfiles
- Changelogs
- Rpmlintrcs

The following components are included and succesfully building,
(with their source OBS repository):

- sm        [2]
- sm-common [3]
- sm-db     [4]
- sm-api    [5]
- sm-client [6]
- sm-tools  [7]

The following considerations are taken for Gerrit files:

- Added %changelog directive to all specfiles

The following considerations are taken for OBS _service files:

- Added parameter "extract" to get spec, changes and rpmlintrc files.
- All component version standardized to 1.0.0

[0] openbuildservice.org
[1] https://build.opensuse.org/project/show/Cloud:StarlingX:2.0
[2] https://build.opensuse.org/package/show/home:xe1gyq:branches:Cloud:StarlingX:2.0/sm
[3] https://build.opensuse.org/package/show/home:xe1gyq:branches:Cloud:StarlingX:2.0/sm-common
[4] https://build.opensuse.org/package/show/home:xe1gyq:branches:Cloud:StarlingX:2.0/sm-db
[5] https://build.opensuse.org/package/show/home:xe1gyq:branches:Cloud:StarlingX:2.0/sm-api
[6] https://build.opensuse.org/package/show/home:xe1gyq:branches:Cloud:StarlingX:2.0/sm-client
[7] https://build.opensuse.org/package/show/home:xe1gyq:branches:Cloud:StarlingX:2.0/sm-tools

Story: 2006508
Task: 36495
Task: 36496
Task: 36497
Task: 36498
Task: 36534
Task: 36794

Change-Id: I06a7e132de4892b846d99977ff1bfc5bf240ade4
Co-authored-by: Erich Cordoba <erich.cordoba.malibran@intel.com>
Signed-off-by: Abraham Arce <abraham.arce.moreno@intel.com>
2019-10-09 10:05:20 -05:00

71 lines
1.5 KiB
RPMSpec

Summary: Service Management Databases
Name: libsm_db1
Version: 1.0.0
Release: 5
License: Apache-2.0
Group: System/Base
URL: https://www.starlingx.io
Source0: %{name}-%{version}.tar.gz
BuildRequires: gcc-c++
BuildRequires: sm-common-devel
BuildRequires: glib2-devel
BuildRequires: glibc
BuildRequires: sqlite3-devel
BuildRequires: libuuid-devel
BuildRequires: libsqlite3-0
BuildRequires: sqlite3
Requires: sqlite3
%description
The StarlingX Service Managment Databases
%package devel
Summary: Service Management Databases - Development files
Group: Development/Libraries/Other
Requires: %{name} = %{version}-%{release}
%description devel
Service Managment Databases This package contains symbolic links, header
files, and related items necessary for software development.
%prep
%setup -n %{name}-%{version}
%build
sqlite3 database/sm.db < database/create_sm_db.sql
sqlite3 database/sm.hb.db < database/create_sm_hb_db.sql
VER=%{version}
export SUSE_ASNEEDED=0
MAJOR=`echo $VER | awk -F . '{print $1}'`
make VER=${VER} VER_MJR=$MAJOR
%install
VER=%{version}
MAJOR=`echo $VER | awk -F . '{print $1}'`
make DEST_DIR=$RPM_BUILD_ROOT VER=$VER VER_MJR=$MAJOR install
%post
/sbin/ldconfig
%postun
/sbin/ldconfig
%files
%license LICENSE
%defattr(-,root,root,-)
%dir %{_sharedstatedir}/sm/patches
%{_libdir}/libsm_db.so.1
%{_libdir}/libsm_db.so.1.0.0
%config(noreplace) %{_sharedstatedir}/sm/sm.hb.db
%config(noreplace) %{_sharedstatedir}/sm/sm.db
%{_sharedstatedir}/sm/patches/sm-patch.sql
%files devel
%defattr(-,root,root,-)
%{_libdir}/libsm_db.so
%{_includedir}/*.h
%changelog