parent
acc393551b
commit
6e5fd742a6
20
lcr.spec
20
lcr.spec
@ -1,7 +1,7 @@
|
|||||||
%global _version 2.1.3
|
%global _version 2.1.3
|
||||||
%global _release 1
|
%global _release 2
|
||||||
%global _inner_name isula_libutils
|
%global _inner_name isula_libutils
|
||||||
%global enable_lxc 0
|
%global enable_lxc 1
|
||||||
|
|
||||||
Name: lcr
|
Name: lcr
|
||||||
Version: %{_version}
|
Version: %{_version}
|
||||||
@ -24,10 +24,12 @@ Patch0006: 0006-add-unit-test-for-util-function.patch
|
|||||||
%define lxcver_upper 5.0.3
|
%define lxcver_upper 5.0.3
|
||||||
|
|
||||||
BuildRequires: cmake gcc gcc-c++ git
|
BuildRequires: cmake gcc gcc-c++ git
|
||||||
|
BuildRequires: zlib-devel yajl-devel gtest-devel
|
||||||
|
%if 0%{?enable_lxc}
|
||||||
BuildRequires: lxc > %{lxcver_lower} lxc < %{lxcver_upper}
|
BuildRequires: lxc > %{lxcver_lower} lxc < %{lxcver_upper}
|
||||||
BuildRequires: lxc-devel > %{lxcver_lower} lxc-devel < %{lxcver_upper}
|
BuildRequires: lxc-devel > %{lxcver_lower} lxc-devel < %{lxcver_upper}
|
||||||
BuildRequires: zlib-devel yajl-devel gtest-devel
|
|
||||||
Requires: lxc > %{lxcver_lower} lxc < %{lxcver_upper} yajl zlib
|
Requires: lxc > %{lxcver_lower} lxc < %{lxcver_upper} yajl zlib
|
||||||
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Containers are insulated areas inside a system, which have their own namespace
|
Containers are insulated areas inside a system, which have their own namespace
|
||||||
@ -46,6 +48,7 @@ Requires: %{name} = %{version}-%{release}
|
|||||||
%package -n libisula
|
%package -n libisula
|
||||||
Summary: Huawei container json, log and utils C Library
|
Summary: Huawei container json, log and utils C Library
|
||||||
Group: Libraries
|
Group: Libraries
|
||||||
|
Requires: yajl zlib
|
||||||
|
|
||||||
%package -n libisula-devel
|
%package -n libisula-devel
|
||||||
Summary: Huawei container json, log and utils C headers
|
Summary: Huawei container json, log and utils C headers
|
||||||
@ -86,6 +89,7 @@ chmod +x %{buildroot}/%{_libdir}/liblcr.so
|
|||||||
|
|
||||||
install -m 0644 ../src/runtime/lcrcontainer.h %{buildroot}/%{_includedir}/lcr/lcrcontainer.h
|
install -m 0644 ../src/runtime/lcrcontainer.h %{buildroot}/%{_includedir}/lcr/lcrcontainer.h
|
||||||
install -m 0644 ./src/libisula_libutils.so %{buildroot}/%{_libdir}/libisula_libutils.so
|
install -m 0644 ./src/libisula_libutils.so %{buildroot}/%{_libdir}/libisula_libutils.so
|
||||||
|
install -m 0644 ./src/libisulad_shim_libutils.a %{buildroot}/%{_libdir}/libisulad_shim_libutils.a
|
||||||
install -m 0644 ./conf/libisula.pc %{buildroot}/%{_libdir}/pkgconfig/libisula.pc
|
install -m 0644 ./conf/libisula.pc %{buildroot}/%{_libdir}/pkgconfig/libisula.pc
|
||||||
install -d $RPM_BUILD_ROOT/%{_includedir}/%{_inner_name}
|
install -d $RPM_BUILD_ROOT/%{_includedir}/%{_inner_name}
|
||||||
install -m 0644 ../build/json/*.h %{buildroot}/%{_includedir}/%{_inner_name}/
|
install -m 0644 ../build/json/*.h %{buildroot}/%{_includedir}/%{_inner_name}/
|
||||||
@ -94,10 +98,11 @@ install -m 0644 ../src/third_party/*.h %{buildroot}/%{_includedir}/%{_inner_nam
|
|||||||
install -m 0644 ../src/auto_cleanup.h %{buildroot}/%{_includedir}/%{_inner_name}/
|
install -m 0644 ../src/auto_cleanup.h %{buildroot}/%{_includedir}/%{_inner_name}/
|
||||||
#install header files from utils later
|
#install header files from utils later
|
||||||
install -m 0644 ../src/utils/utils_compile.h %{buildroot}/%{_includedir}/lcr/utils_compile.h
|
install -m 0644 ../src/utils/utils_compile.h %{buildroot}/%{_includedir}/lcr/utils_compile.h
|
||||||
|
install -m 0644 ../src/utils/*.h %{buildroot}/%{_includedir}/%{_inner_name}/
|
||||||
|
|
||||||
chmod +x %{buildroot}/%{_libdir}/libisula_libutils.so
|
chmod +x %{buildroot}/%{_libdir}/libisula_libutils.so
|
||||||
|
|
||||||
find %{buildroot} -type f -name '*.la' -exec rm -f {} ';'
|
find %{buildroot} -type f -name '*.la' -exec rm -f {} ';'
|
||||||
find %{buildroot} -name '*.a' -exec rm -f {} ';'
|
|
||||||
find %{buildroot} -name '*.cmake' -exec rm -f {} ';'
|
find %{buildroot} -name '*.cmake' -exec rm -f {} ';'
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
@ -123,11 +128,18 @@ rm -rf %{buildroot}
|
|||||||
|
|
||||||
%files -n libisula-devel
|
%files -n libisula-devel
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
|
%{_libdir}/libisulad_shim_libutils.a
|
||||||
%{_includedir}/%{_inner_name}/*.h
|
%{_includedir}/%{_inner_name}/*.h
|
||||||
%{_includedir}/lcr/lcrcontainer.h
|
%{_includedir}/lcr/lcrcontainer.h
|
||||||
%{_includedir}/lcr/utils_compile.h
|
%{_includedir}/lcr/utils_compile.h
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Nov 15 2023 jikai<jikai11@huawei.com> - 2.1.3-2
|
||||||
|
- Type:enhancement
|
||||||
|
- CVE:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:install headers and libs
|
||||||
|
|
||||||
* Tue Nov 14 2023 jikai<jikai11@huawei.com> - 2.1.3-1
|
* Tue Nov 14 2023 jikai<jikai11@huawei.com> - 2.1.3-1
|
||||||
- Type:enhancement
|
- Type:enhancement
|
||||||
- CVE:NA
|
- CVE:NA
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user