diff --git a/cdma.spec b/cdma.spec index b61d2c7888a16130d14ecd6b54bd61afed8f7410..b07c1b84df91e726994824e2fd2128bcdecea084 100644 --- a/cdma.spec +++ b/cdma.spec @@ -1,10 +1,9 @@ -%define debug_package %{nil} Summary: Implementation of CDMA Name: libcdma -Version: 1.0 -Release: 3 +Version: 1.0.1 +Release: 0 License: MIT -%global libcdma_version 1 +%global major_version 1 Source0: libcdma.tar.gz @@ -20,6 +19,7 @@ This implementation provides CDMA sending and reception. %package devel Summary: Implementation of CDMA(UB) - Tools and header files for developers +Requires: %{name}%{?_isa} = %{version}-%{release} %description devel This package is required to develop alternate clients for cdma. @@ -41,28 +41,35 @@ asynchronous events. rm -rf build cmake -S . -B build \ -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_BUILD_TYPE=Release + -DCMAKE_INSTALL_LIBDIR=lib64 \ + -DCMAKE_C_FLAGS="%{optflags}" \ + -DCMAKE_CXX_FLAGS="%{optflags}" \ + -DPROJECT_VERSION=%{version} \ + -DLIB_SOVERSION=%{major_version} -cmake --build build --config Release -- -j$(nproc) +cmake --build build %install -cmake --install build --prefix=%{buildroot}/usr - -cd %{buildroot}%{_libdir} - -cp -a libcdma.so libcdma.so.%{libcdma_version} +mkdir -p %{buildroot}%{_docdir}/ub/%{name}/ +cp -a doc/* %{buildroot}%{_docdir}/ub/%{name}/ +install -m 644 README.md %{buildroot}%{_docdir}/ub/%{name}/ -ln -sf libcdma.so.%{libcdma_version} libcdma.so +cmake --install build --prefix=%{buildroot}/usr %files -%{_libdir}/libcdma.so.%{libcdma_version} +%{_libdir}/libcdma.so.* %files devel %{_includedir}/cdma_u_lib.h %{_includedir}/cdma_abi.h -%{_libdir}/libcdma.so* +%{_libdir}/libcdma.so +%doc %{_docdir}/ub/%{name}/* %changelog +* Tue Dec 9 2025 Zhipeng Lu - 1.0.1-0 +- add version and fix some format and add doc to devel package +- change the compile command and the usage of so + * Fri Nov 21 2025 Zhipeng Lu - 1.0-3 - add cdma_abi.h to devel package diff --git a/libcdma.tar.gz b/libcdma.tar.gz index 65063cc0e365db6eef23e0c7293080b99a7be293..65eba2dcaa90d30a9f0ff0ab299303d9976d366c 100644 Binary files a/libcdma.tar.gz and b/libcdma.tar.gz differ