2021-11-09 15:17:11 +08:00
|
|
|
%global _version 2.0.6
|
|
|
|
|
%global _release 1
|
2019-09-30 10:35:21 -04:00
|
|
|
Name: clibcni
|
|
|
|
|
Version: %{_version}
|
2019-11-06 19:04:27 +08:00
|
|
|
Release: %{_release}
|
2019-09-30 10:35:21 -04:00
|
|
|
Summary: CNI - the Container Network Interface
|
|
|
|
|
Group: System Environment/Libraries
|
2020-04-27 09:42:35 +08:00
|
|
|
License: Mulan PSL v2
|
2020-07-01 18:00:18 +08:00
|
|
|
URL: https://gitee.com/openeuler/clibcni
|
2020-09-02 11:38:24 +08:00
|
|
|
Source0: https://gitee.com/openeuler/clibcni/repository/archive/v%{version}.tar.gz
|
2019-09-30 10:35:21 -04:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}
|
|
|
|
|
|
2021-05-08 15:03:21 +08:00
|
|
|
|
2021-06-28 17:01:27 +08:00
|
|
|
BuildRequires: gcc git gcc-c++
|
2019-09-30 10:35:21 -04:00
|
|
|
BuildRequires: cmake
|
2021-09-16 07:30:27 +01:00
|
|
|
BuildRequires: lcr-devel yajl-devel gtest-devel
|
2019-09-30 10:35:21 -04:00
|
|
|
|
2020-05-26 19:30:49 +08:00
|
|
|
Requires: lcr
|
2019-09-30 10:35:21 -04:00
|
|
|
|
|
|
|
|
%ifarch x86_64 aarch64
|
|
|
|
|
Provides: lib%{name}.so()(64bit)
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
CNI (Container Network Interface), a Cloud Native Computing Foundation project,
|
|
|
|
|
consists of a specification and libraries for writing plugins to configure
|
|
|
|
|
network interfaces in Linux containers, along with a number of supported
|
|
|
|
|
plugins. CNI concerns itself only with network connectivity of containers and
|
|
|
|
|
removing allocated resources when the container is deleted. Because of this
|
|
|
|
|
focus, CNI has a wide range of support and the specification is simple to implement.
|
|
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
|
Summary: Huawei CNI C Library
|
|
|
|
|
Group: Libraries
|
|
|
|
|
ExclusiveArch: x86_64 aarch64
|
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
|
the %{name}-libs package contains libraries for running %{name} applications.
|
|
|
|
|
|
|
|
|
|
%prep
|
2020-05-26 19:30:49 +08:00
|
|
|
%autosetup -n %{name} -Sgit -p1
|
2019-09-30 10:35:21 -04:00
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
mkdir -p build
|
|
|
|
|
cd build
|
2021-09-16 07:30:27 +01:00
|
|
|
%cmake -DDEBUG=ON -DENABLE_UT=ON -DLIB_INSTALL_DIR=%{_libdir} ../
|
2019-09-30 10:35:21 -04:00
|
|
|
%make_build
|
|
|
|
|
|
2021-09-16 07:30:27 +01:00
|
|
|
pushd tests
|
|
|
|
|
ctest -V
|
|
|
|
|
popd
|
|
|
|
|
|
2019-09-30 10:35:21 -04:00
|
|
|
%install
|
|
|
|
|
rm -rf %{buildroot}
|
|
|
|
|
cd build
|
|
|
|
|
install -d $RPM_BUILD_ROOT/%{_libdir}
|
|
|
|
|
install -m 0644 ./src/libclibcni.so %{buildroot}/%{_libdir}/libclibcni.so
|
2020-09-03 17:22:07 +08:00
|
|
|
chmod +x %{buildroot}/%{_libdir}/libclibcni.so
|
2019-09-30 10:35:21 -04:00
|
|
|
|
|
|
|
|
install -d $RPM_BUILD_ROOT/%{_libdir}/pkgconfig
|
|
|
|
|
install -m 0644 ./conf/clibcni.pc %{buildroot}/%{_libdir}/pkgconfig/clibcni.pc
|
|
|
|
|
|
|
|
|
|
install -d $RPM_BUILD_ROOT/%{_includedir}/clibcni
|
|
|
|
|
install -m 0644 ../src/api.h %{buildroot}/%{_includedir}/clibcni/api.h
|
|
|
|
|
install -m 0644 ../src/types/types.h %{buildroot}/%{_includedir}/clibcni/types.h
|
|
|
|
|
install -m 0644 ../src/version/version.h %{buildroot}/%{_includedir}/clibcni/version.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}/lib%{name}.so*
|
|
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
|
%{_includedir}/%{name}/*.h
|
|
|
|
|
%{_libdir}/pkgconfig/%{name}.pc
|
|
|
|
|
|
|
|
|
|
%changelog
|
2021-11-09 15:17:11 +08:00
|
|
|
* Thu Nov 09 2021 haozi007 <liuhao27@huawei.com> - 2.0.6-1
|
|
|
|
|
- Type: upgrade version
|
|
|
|
|
- ID: NA
|
|
|
|
|
- SUG: NA
|
|
|
|
|
- DESC: upgrade to v2.0.6
|
|
|
|
|
|
2021-06-28 17:01:27 +08:00
|
|
|
* Mon Jun 28 2021 haozi007 <liuhao27@huawei.com> - 2.0.4-20210628.190359.git14c104bc
|
|
|
|
|
- Type: add g++ to build require
|
|
|
|
|
- ID: NA
|
|
|
|
|
- SUG: NA
|
|
|
|
|
- DESC: add g++ to build require
|
|
|
|
|
|
2021-06-28 15:18:55 +08:00
|
|
|
* Mon Jun 28 2021 haozi007 <liuhao27@huawei.com> - 2.0.4-20210628.151504.git61ae9f6b
|
|
|
|
|
- Type: add git to build require
|
|
|
|
|
- ID: NA
|
|
|
|
|
- SUG: NA
|
|
|
|
|
- DESC: add git to build require
|
|
|
|
|
|
2021-05-08 15:03:21 +08:00
|
|
|
* Sat May 8 2021 zhangxiaoyu <zhangxiaoyu58@huawei.com> - 2.0.4-20210508.150021.git73679d5d
|
|
|
|
|
- Type: sync from upstream
|
|
|
|
|
- ID: NA
|
|
|
|
|
- SUG: NA
|
|
|
|
|
- DESC: update from master
|
|
|
|
|
|
2020-12-30 15:28:36 +08:00
|
|
|
* Wed Dec 30 2020 lifeng <lifeng68@huawei.com> - 2.0.4-20201230.152647.gitf9277cd7
|
|
|
|
|
- Type: update version to v2.0.4
|
|
|
|
|
- ID:NA
|
|
|
|
|
- SUG:NA
|
|
|
|
|
|
2020-11-28 14:22:02 +08:00
|
|
|
* Sat Nov 28 2020 haozi007 <liuhao27@huawei.com> - 2.0.3-20201128.142102.git866f22d3
|
|
|
|
|
- Type:bugfix
|
|
|
|
|
- ID:NA
|
|
|
|
|
- SUG:NA
|
|
|
|
|
- DESC: fix parse ipv6 format error
|
|
|
|
|
|
2020-11-12 18:52:02 +08:00
|
|
|
* Thu Nov 12 2020 gaohuatao <gaohuatao@huawei.com> - 2.0.3-20201112.165252.gitc4aadda4
|
2020-09-03 17:22:07 +08:00
|
|
|
- Type:enhancement
|
|
|
|
|
- ID:NA
|
|
|
|
|
- SUG:NA
|
2020-11-12 18:52:02 +08:00
|
|
|
- DESC: update from openeuler master
|
2020-09-03 17:22:07 +08:00
|
|
|
|
2020-11-12 18:52:02 +08:00
|
|
|
* Fri Sep 04 2020 zhangxiaoyu <zhangxiaoyu58@huawei.com> - 2.0.3-20200904.104745.git413e6757
|
2020-09-02 11:38:24 +08:00
|
|
|
- Type:enhancement
|
|
|
|
|
- ID:NA
|
|
|
|
|
- SUG:NA
|
2020-11-12 18:52:02 +08:00
|
|
|
- DESC: upgrade from v2.0.2 to v2.0.3
|