From 120b75b6a58b1e7ecd189beddc99789c43a141f4 Mon Sep 17 00:00:00 2001 From: Jia Chao Date: Mon, 29 May 2023 16:47:11 +0800 Subject: [PATCH] Fix: BuildDir does not care about architecture, remove arch flag to create the same help on all platform Signed-off-by: Jia Chao --- openjpeg2.spec | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/openjpeg2.spec b/openjpeg2.spec index 5fea55f..87d1f07 100644 --- a/openjpeg2.spec +++ b/openjpeg2.spec @@ -1,6 +1,8 @@ +%global BuildDir %{_vendor}-%{_target_os}%{?_gnu} + Name: openjpeg2 Version: 2.5.0 -Release: 2 +Release: 3 Summary: C-Library for JPEG 2000 License: BSD and MIT URL: https://github.com/uclouvain/openjpeg @@ -47,8 +49,8 @@ Command line tools for JPEG 2000 file manipulation, using OpenJPEG2: find thirdparty/ -mindepth 1 -maxdepth 1 -type d -exec rm -rf {} \; %build -mkdir %{_target_platform} -pushd %{_target_platform} +mkdir %{BuildDir} +pushd %{BuildDir} %cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DOPENJPEG_INSTALL_LIB_DIR=%{_lib} \ %{?optional_components:-DBUILD_MJ2=ON -DBUILD_JPWL=ON -DBUILD_JPIP=ON -DBUILD_JP3D=ON} \ -DBUILD_DOC=ON \ @@ -58,11 +60,11 @@ pushd %{_target_platform} .. popd -%make_build VERBOSE=1 -C %{_target_platform} +%make_build VERBOSE=1 -C %{BuildDir} %install -%make_install -C %{_target_platform} +%make_install -C %{BuildDir} mv %{buildroot}%{_mandir}/man1/opj_compress.1 %{buildroot}%{_mandir}/man1/opj2_compress.1 mv %{buildroot}%{_mandir}/man1/opj_decompress.1 %{buildroot}%{_mandir}/man1/opj2_decompress.1 @@ -87,7 +89,7 @@ mv %{buildroot}%{_mandir}/man1/opj_dump.1 %{buildroot}%{_mandir}/man1/opj2_dump. %files help %defattr(-,root,root) -%doc %{_target_platform}/doc/html +%doc %{BuildDir}/doc/html %doc NEWS.md README.md THANKS.md %{_mandir}/man1/*.1* %{_mandir}/man3/*.3* @@ -98,6 +100,9 @@ mv %{buildroot}%{_mandir}/man1/opj_dump.1 %{buildroot}%{_mandir}/man1/opj2_dump. %{_bindir}/opj2_dump %changelog +* Mon May 29 2023 Jia Chao - 2.5.0-3 +- Fix: builddir contains arch info make help create different noarch pkg. + * Tue Feb 28 2023 zhangpan - 2.5.0-2 - Remove useless buildrequires -- Gitee