split libisula package from lcr
Signed-off-by: zhangxiaoyu <zhangxiaoyu58@huawei.com>
This commit is contained in:
parent
e22b0a3a56
commit
99690fef13
71
0001-add-libisula.pc.patch
Normal file
71
0001-add-libisula.pc.patch
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
From 83b3f2f2b114915c250bdc4500138a8531750192 Mon Sep 17 00:00:00 2001
|
||||||
|
From: zhangxiaoyu <zhangxiaoyu58@huawei.com>
|
||||||
|
Date: Mon, 6 Feb 2023 20:36:17 +0800
|
||||||
|
Subject: [PATCH] add libisula.pc
|
||||||
|
|
||||||
|
Signed-off-by: zhangxiaoyu <zhangxiaoyu58@huawei.com>
|
||||||
|
---
|
||||||
|
CMakeLists.txt | 7 +++++++
|
||||||
|
lcr.pc.in | 2 +-
|
||||||
|
libisula.pc.in | 12 ++++++++++++
|
||||||
|
3 files changed, 20 insertions(+), 1 deletion(-)
|
||||||
|
create mode 100644 libisula.pc.in
|
||||||
|
|
||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index c1acbab..8ee67c1 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -75,6 +75,11 @@ configure_file(
|
||||||
|
"${CMAKE_BINARY_DIR}/conf/lcr.pc"
|
||||||
|
)
|
||||||
|
|
||||||
|
+configure_file(
|
||||||
|
+ "${CMAKE_CURRENT_SOURCE_DIR}/libisula.pc.in"
|
||||||
|
+ "${CMAKE_BINARY_DIR}/conf/libisula.pc"
|
||||||
|
+)
|
||||||
|
+
|
||||||
|
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/third_party)
|
||||||
|
|
||||||
|
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src)
|
||||||
|
@@ -112,6 +117,8 @@ endif()
|
||||||
|
# install all files
|
||||||
|
install(FILES ${CMAKE_BINARY_DIR}/conf/lcr.pc
|
||||||
|
DESTINATION ${LIB_INSTALL_DIR_DEFAULT}/pkgconfig PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ GROUP_WRITE WORLD_READ WORLD_EXECUTE)
|
||||||
|
+install(FILES ${CMAKE_BINARY_DIR}/conf/libisula.pc
|
||||||
|
+ DESTINATION ${LIB_INSTALL_DIR_DEFAULT}/pkgconfig PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ GROUP_WRITE WORLD_READ WORLD_EXECUTE)
|
||||||
|
install(FILES src/lcrcontainer.h
|
||||||
|
DESTINATION include/lcr)
|
||||||
|
|
||||||
|
diff --git a/lcr.pc.in b/lcr.pc.in
|
||||||
|
index e102dbb..419e187 100644
|
||||||
|
--- a/lcr.pc.in
|
||||||
|
+++ b/lcr.pc.in
|
||||||
|
@@ -7,6 +7,6 @@ Name: liblcr
|
||||||
|
Description: light-weighted container runtime library
|
||||||
|
Version: @LCR_VERSION@
|
||||||
|
URL: liblcr
|
||||||
|
-Libs: -L@CMAKE_INSTALL_PREFIX@/lib -llcr -lisula_libutils
|
||||||
|
+Libs: -L@CMAKE_INSTALL_PREFIX@/lib -llcr
|
||||||
|
Cflags: -I@CMAKE_INSTALL_PREFIX@/include
|
||||||
|
|
||||||
|
diff --git a/libisula.pc.in b/libisula.pc.in
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..2738dd3
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/libisula.pc.in
|
||||||
|
@@ -0,0 +1,12 @@
|
||||||
|
+prefix=@CMAKE_INSTALL_PREFIX@
|
||||||
|
+libdir=@CMAKE_INSTALL_PREFIX@/lib
|
||||||
|
+localstatedir=@CMAKE_INSTALL_PREFIX@/var
|
||||||
|
+includedir=@CMAKE_INSTALL_PREFIX@/include
|
||||||
|
+
|
||||||
|
+Name: libisula
|
||||||
|
+Description: light-weighted container json and log libraries
|
||||||
|
+Version: @LCR_VERSION@
|
||||||
|
+URL: libisula
|
||||||
|
+Libs: -L@CMAKE_INSTALL_PREFIX@/lib -lisula_libutils
|
||||||
|
+Cflags: -I@CMAKE_INSTALL_PREFIX@/include
|
||||||
|
+
|
||||||
|
--
|
||||||
|
2.25.1
|
||||||
|
|
||||||
46
lcr.spec
46
lcr.spec
@ -1,5 +1,5 @@
|
|||||||
%global _version 2.1.1
|
%global _version 2.1.1
|
||||||
%global _release 1
|
%global _release 2
|
||||||
%global _inner_name isula_libutils
|
%global _inner_name isula_libutils
|
||||||
|
|
||||||
Name: lcr
|
Name: lcr
|
||||||
@ -12,7 +12,7 @@ Group: Applications/System
|
|||||||
License: LGPLv2.1+
|
License: LGPLv2.1+
|
||||||
BuildRoot: %{_tmppath}/lcr-%{version}
|
BuildRoot: %{_tmppath}/lcr-%{version}
|
||||||
|
|
||||||
|
Patch0001: 0001-add-libisula.pc.patch
|
||||||
|
|
||||||
%define lxcver_lower 4.0.3-2022102400
|
%define lxcver_lower 4.0.3-2022102400
|
||||||
%define lxcver_upper 4.0.3-2022102500
|
%define lxcver_upper 4.0.3-2022102500
|
||||||
@ -43,14 +43,30 @@ This package provides the lightweight container tools and library to control
|
|||||||
lxc-based containers.
|
lxc-based containers.
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Huawei container runtime, json and log C Library
|
Summary: Huawei container runtime headers for developing programs
|
||||||
Group: Libraries
|
Group: Libraries
|
||||||
ExclusiveArch: x86_64 aarch64 sw_64
|
ExclusiveArch: x86_64 aarch64 sw_64
|
||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
|
||||||
%description devel
|
%package -n libisula
|
||||||
the %{name}-libs package contains libraries for running iSula applications.
|
Summary: Huawei container json, log and utils C Library
|
||||||
|
Group: Libraries
|
||||||
|
ExclusiveArch: x86_64 aarch64 sw_64
|
||||||
|
|
||||||
|
%package -n libisula-devel
|
||||||
|
Summary: Huawei container json, log and utils C headers
|
||||||
|
Group: Libraries
|
||||||
|
ExclusiveArch: x86_64 aarch64 sw_64
|
||||||
|
Requires: libisula = %{version}-%{release}
|
||||||
|
|
||||||
|
%description devel
|
||||||
|
the %{name}-devel package contains runtime headers for developing programs.
|
||||||
|
|
||||||
|
%description -n libisula
|
||||||
|
the libisula package contains json, log and utils libraries for running iSula applications.
|
||||||
|
|
||||||
|
%description -n libisula-devel
|
||||||
|
the libisula-devel package contains json, log and utils headers for developing programs.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n lcr-v%{_version} -Sgit -p1
|
%autosetup -n lcr-v%{_version} -Sgit -p1
|
||||||
@ -71,11 +87,11 @@ install -m 0644 ../src/lcrcontainer.h %{buildroot}/%{_includedir}/lcr/lcrcontai
|
|||||||
chmod +x %{buildroot}/%{_libdir}/liblcr.so
|
chmod +x %{buildroot}/%{_libdir}/liblcr.so
|
||||||
|
|
||||||
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 ./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}/
|
||||||
install -m 0644 ../src/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
|
install -m 0644 ../third_party/*.h %{buildroot}/%{_includedir}/%{_inner_name}/
|
||||||
install -m 0644 ../third_party/go_crc64.h %{buildroot}/%{_includedir}/%{_inner_name}/go_crc64.h
|
|
||||||
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 {} ';'
|
||||||
@ -93,15 +109,29 @@ rm -rf %{buildroot}
|
|||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%{_libdir}/*
|
%{_libdir}/liblcr.so
|
||||||
%{_libdir}/pkgconfig/lcr.pc
|
%{_libdir}/pkgconfig/lcr.pc
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%{_includedir}/lcr/lcrcontainer.h
|
%{_includedir}/lcr/lcrcontainer.h
|
||||||
|
|
||||||
|
%files -n libisula
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%{_libdir}/libisula_libutils.so
|
||||||
|
%{_libdir}/pkgconfig/libisula.pc
|
||||||
|
|
||||||
|
%files -n libisula-devel
|
||||||
|
%defattr(-,root,root,-)
|
||||||
%{_includedir}/%{_inner_name}/*.h
|
%{_includedir}/%{_inner_name}/*.h
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Feb 07 2023 zhangxiaoyu<zhangxiaoyu58@huawei.com> - 2.1.1-2
|
||||||
|
- Type:enhancement
|
||||||
|
- CVE:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:split libisula package from lcr
|
||||||
|
|
||||||
* Mon Feb 06 2023 zhangxiaoyu<zhangxiaoyu58@huawei.com> - 2.1.1-1
|
* Mon Feb 06 2023 zhangxiaoyu<zhangxiaoyu58@huawei.com> - 2.1.1-1
|
||||||
- Type:enhancement
|
- Type:enhancement
|
||||||
- CVE:NA
|
- CVE:NA
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user