114 lines
3.3 KiB
RPMSpec
114 lines
3.3 KiB
RPMSpec
%global _version 2.0.2
|
|
%global _release 20200628.162917.gitafc142aa
|
|
%global _inner_name isula_libutils
|
|
|
|
Name: lcr
|
|
Version: %{_version}
|
|
Release: %{_release}
|
|
URL: https://gitee.com/openeuler/lcr
|
|
Source: lcr-%{version}.tar.gz
|
|
Summary: Lightweight Container Runtime
|
|
Group: Applications/System
|
|
License: LGPLv2.1+
|
|
BuildRoot: %{_tmppath}/lcr-%{version}
|
|
|
|
Patch9000: 0001-fix-wrong-license.patch
|
|
Patch9001: 0002-support-import-rootfs-to-be-image.patch
|
|
Patch9002: 0003-support-calico.patch
|
|
Patch9003: 0004-improve-check-driver-of-log.patch
|
|
Patch9004: 0005-improve-llt-framework.patch
|
|
Patch9005: 0006-fix-log-test-error.patch
|
|
Patch9006: 0007-improve-html-show-result.patch
|
|
Patch9007: 0008-change-tests-name.patch
|
|
Patch9008: 0009-Pull-Request-49-change-name-of-testcases.patch
|
|
Patch9009: 0010-change-tests-name.patch
|
|
Patch9010: 0011-support-fuzz-test.patch
|
|
|
|
BuildRequires: cmake
|
|
BuildRequires: lxc
|
|
BuildRequires: lxc-devel
|
|
BuildRequires: zlib-devel yajl-devel gtest-devel gmock-devel
|
|
Requires: lxc yajl zlib
|
|
ExclusiveArch: x86_64 aarch64
|
|
|
|
%ifarch x86_64
|
|
Provides: liblcr.so()(64bit)
|
|
Provides: libisula_libutils.so()(64bit)
|
|
%endif
|
|
|
|
%ifarch aarch64
|
|
Provides: liblcr.so()(64bit)
|
|
Provides: libisula_libutils.so()(64bit)
|
|
%endif
|
|
|
|
%description
|
|
Containers are insulated areas inside a system, which have their own namespace
|
|
for filesystem, network, PID, IPC, CPU and memory allocation and which can be
|
|
created using the Control Group and Namespace features included in the Linux
|
|
kernel.
|
|
|
|
This package provides the lightweight container tools and library to control
|
|
lxc-based containers.
|
|
|
|
%package devel
|
|
Summary: Huawei container runtime, json and log C Library
|
|
Group: Libraries
|
|
ExclusiveArch: x86_64 aarch64
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
%description devel
|
|
the %{name}-libs package contains libraries for running iSula applications.
|
|
|
|
%global debug_package %{nil}
|
|
|
|
%prep
|
|
%autosetup -n lcr -Sgit -p1
|
|
|
|
%build
|
|
mkdir -p build
|
|
cd build
|
|
%cmake -DDEBUG=OFF -DLIB_INSTALL_DIR=%{_libdir} ../
|
|
%make_build
|
|
|
|
%install
|
|
rm -rf %{buildroot}
|
|
cd build
|
|
mkdir -p %{buildroot}/{%{_libdir},%{_libdir}/pkgconfig,%{_includedir}/lcr,%{_bindir}}
|
|
install -m 0644 ./src/liblcr.so %{buildroot}/%{_libdir}/liblcr.so
|
|
install -m 0644 ./conf/lcr.pc %{buildroot}/%{_libdir}/pkgconfig/lcr.pc
|
|
install -m 0644 ../src/lcrcontainer.h %{buildroot}/%{_includedir}/lcr/lcrcontainer.h
|
|
|
|
install -m 0644 ./src/libisula_libutils.so %{buildroot}/%{_libdir}/libisula_libutils.so
|
|
install -d $RPM_BUILD_ROOT/%{_includedir}/%{_inner_name}
|
|
install -m 0644 ../build/json/*.h %{buildroot}/%{_includedir}/%{_inner_name}/
|
|
install -m 0644 ../src/json/*.h %{buildroot}/%{_includedir}/%{_inner_name}/
|
|
install -m 0644 ../third_party/log.h %{buildroot}/%{_includedir}/%{_inner_name}/log.h
|
|
|
|
find %{buildroot} -type f -name '*.la' -exec rm -f {} ';'
|
|
find %{buildroot} -name '*.a' -exec rm -f {} ';'
|
|
find %{buildroot} -name '*.cmake' -exec rm -f {} ';'
|
|
|
|
%clean
|
|
rm -rf %{buildroot}
|
|
|
|
%pre
|
|
|
|
%post -p /sbin/ldconfig
|
|
|
|
%postun -p /sbin/ldconfig
|
|
|
|
%files
|
|
%defattr(-,root,root,-)
|
|
%{_libdir}/*
|
|
%{_libdir}/pkgconfig/lcr.pc
|
|
|
|
%files devel
|
|
%defattr(-,root,root,-)
|
|
%{_includedir}/lcr/lcrcontainer.h
|
|
%{_includedir}/%{_inner_name}/*.h
|
|
|
|
|
|
%changelog
|
|
* Fri Apr 14 2017 Hui Wang <hw.huiwang@huawei.com> - 0.0.1
|
|
- Initial RPM release
|