Fix: BuildDir does not care about architecture, remove arch flag to create the same help on all platform

Signed-off-by: Jia Chao <jiac13@chinaunicom.cn>
This commit is contained in:
Jia Chao 2023-05-29 16:47:11 +08:00
parent 32991ac581
commit 120b75b6a5

View File

@ -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 <jiachao2130@126.com> - 2.5.0-3
- Fix: builddir contains arch info make help create different noarch pkg.
* Tue Feb 28 2023 zhangpan <zhangpan103@h-partners.com> - 2.5.0-2
- Remove useless buildrequires