mirror of
https://abf.rosa.ru/djam/bzip2.git
synced 2025-02-23 10:52:54 +00:00
1) Move from /usr/lib(64) to /lib(64) because we have binaries in /sbin and /bin which load libbz2.so.* + compatibility symlinks from old locations
2) Symlinks for compatibility with Ubuntu/Debian and logics (e.g. wps-office, built on Ubuntu, want libbz2.so.1.0 and we did not have it, https://bugzilla.rosalinux.ru/show_bug.cgi?id=9286)
This commit is contained in:
parent
9749726856
commit
6ae50f94b6
1 changed files with 37 additions and 3 deletions
40
bzip2.spec
40
bzip2.spec
|
@ -7,7 +7,7 @@
|
||||||
Summary: Extremely powerful file compression utility
|
Summary: Extremely powerful file compression utility
|
||||||
Name: bzip2
|
Name: bzip2
|
||||||
Version: 1.0.6
|
Version: 1.0.6
|
||||||
Release: 13
|
Release: 14
|
||||||
License: BSD
|
License: BSD
|
||||||
Group: Archiving/Compression
|
Group: Archiving/Compression
|
||||||
Url: http://www.bzip.org/index.html
|
Url: http://www.bzip.org/index.html
|
||||||
|
@ -53,7 +53,8 @@ bzip2 library (aka libz2).
|
||||||
|
|
||||||
%files -n %{libname}
|
%files -n %{libname}
|
||||||
%doc LICENSE
|
%doc LICENSE
|
||||||
%{_libdir}/libbz2.so.%{major}*
|
/%{_lib}/libbz2.so.*
|
||||||
|
%{_libdir}/libbz2.so.*
|
||||||
|
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -74,6 +75,7 @@ will use the bzip2 library (aka libz2).
|
||||||
%if %{with pdf}
|
%if %{with pdf}
|
||||||
%doc manual.pdf
|
%doc manual.pdf
|
||||||
%endif
|
%endif
|
||||||
|
/%{_lib}/libbz2.so
|
||||||
%{_libdir}/libbz2.so
|
%{_libdir}/libbz2.so
|
||||||
%{_includedir}/*.h
|
%{_includedir}/*.h
|
||||||
|
|
||||||
|
@ -115,5 +117,37 @@ chmod 755 %{buildroot}%{_bindir}/bzless
|
||||||
install -m 644 %{SOURCE3} %{buildroot}%{_mandir}/man1/
|
install -m 644 %{SOURCE3} %{buildroot}%{_mandir}/man1/
|
||||||
|
|
||||||
# cleanup
|
# cleanup
|
||||||
rm -f %{buildroot}%{_libdir}/*.a
|
rm -f %{buildroot}%{_lib}/*.a
|
||||||
|
|
||||||
|
# use e.g. /lib64 instead of /usr/lib64, because we have some binaries in /sbin and /bin, linked with libbz2.so.*
|
||||||
|
mkdir -p %{buildroot}/%{_lib}
|
||||||
|
mv -v %{buildroot}/%{_libdir}/* %{buildroot}/%{_lib}/
|
||||||
|
|
||||||
|
# Compatibility with Debian, Ubuntu and logics
|
||||||
|
# https://bugzilla.rosalinux.ru/show_bug.cgi?id=9286
|
||||||
|
# https://stackoverflow.com/a/10586169
|
||||||
|
# bashisms :(
|
||||||
|
IFS='.' read -r -a array <<< %{version}
|
||||||
|
buildroot_lib="%{buildroot}/%{_lib}"
|
||||||
|
cur_name="libbz2.so" #cur_name - current name
|
||||||
|
for index in "${!array[@]}"
|
||||||
|
do
|
||||||
|
#echo "$index ${array[index]}"
|
||||||
|
if [ "$index" != '0' ]
|
||||||
|
then
|
||||||
|
cur_name="${cur_name}.${array[index]}"
|
||||||
|
[ ! -f "${buildroot_lib}/${cur_name}" ] && \
|
||||||
|
ln -sr "${buildroot_lib}/${cur_name_major}" "${buildroot_lib}/${cur_name}"
|
||||||
|
else
|
||||||
|
cur_name_major="${cur_name}.${array[index]}"
|
||||||
|
[ -f "${buildroot_lib}/${cur_name_major}" ] || exit 1
|
||||||
|
cur_name="${cur_name_major}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Compatibility symlinks after moving from /usr/lib(64) to /lib(64) in rosa2016.1 on the fly
|
||||||
|
%if %{mdvver} >= 201800
|
||||||
|
echo "Remove compatibility symlinks in Rosa 2018/2019!"
|
||||||
|
exit 1
|
||||||
|
%endif
|
||||||
|
for i in $(/bin/ls %{buildroot}/%{_lib}); do ln -sr "%{buildroot}/%{_lib}/${i}" "%{buildroot}/%{_libdir}/${i}"; done
|
||||||
|
|
Loading…
Add table
Reference in a new issue