mirror of
https://abf.rosa.ru/djam/bzip2.git
synced 2025-02-23 19:02:54 +00:00
Add provides
Emulate provides for AutoReq of RPM on binaries built on Debian/Ubuntu
Removed code in bash does nothing after commit ef2c071c9
("fix wine stack")
This commit is contained in:
parent
ef2c071c97
commit
474b81b28e
1 changed files with 9 additions and 24 deletions
33
bzip2.spec
33
bzip2.spec
|
@ -7,7 +7,7 @@
|
|||
Summary: Extremely powerful file compression utility
|
||||
Name: bzip2
|
||||
Version: 1.0.8
|
||||
Release: 2
|
||||
Release: 3
|
||||
License: BSD
|
||||
Group: Archiving/Compression
|
||||
Url: http://www.bzip.org/index.html
|
||||
|
@ -49,6 +49,12 @@ but they are not identical.
|
|||
%package -n %{libname}
|
||||
Summary: Libraries for developing apps which will use bzip2
|
||||
Group: System/Libraries
|
||||
# manual provides for symlinks
|
||||
# because soname is different on Debian/Ubuntu
|
||||
# and we need compatibility with binaries built where
|
||||
# https://bugzilla.rosalinux.ru/show_bug.cgi?id=9286
|
||||
Provides: libbz2.so.1.0%{_arch_tag_suffix}
|
||||
Provides: libbz2.so.%{version}%{_arch_tag_suffix}
|
||||
|
||||
%description -n %{libname}
|
||||
Library of bzip2 functions, for developing apps which will use the
|
||||
|
@ -57,7 +63,8 @@ bzip2 library (aka libz2).
|
|||
%files -n %{libname}
|
||||
%doc LICENSE
|
||||
%{_libdir}/libbz2.so.%{major}
|
||||
%{_libdir}/libbz2.so.%{major}.*
|
||||
%{_libdir}/libbz2.so.%{major}.0
|
||||
%{_libdir}/libbz2.so.%{version}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
|
@ -119,25 +126,3 @@ cat > %{buildroot}%{_bindir}/bzless <<EOF
|
|||
%{_bindir}/bunzip2 -c "\$@" | %{_bindir}/less
|
||||
EOF
|
||||
chmod 755 %{buildroot}%{_bindir}/bzless
|
||||
|
||||
# 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}/%{_libdir}"
|
||||
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
|
||||
|
|
Loading…
Add table
Reference in a new issue