Fix cdrecord & wodim alternatives

This commit is contained in:
Jiri Kucera 2022-02-10 23:46:58 +01:00 committed by Stepan Oksanichenko
parent e048682211
commit 95d9a52eaf
2 changed files with 27 additions and 14 deletions

3
.libburn.metadata Normal file
View File

@ -0,0 +1,3 @@
896ddcb0c8d6e8b60a82642331350d7fde7ab737 gpgkey-44BC9FD0D688EB007C4DD029E9CBDFC0ABC0A854.gpg
f1f6b91c18bcf0df1c38a0665657b10f1a76de58 libburn-1.5.4.tar.gz
cdcc16b4041b3796428bbde7883d54f1d915b41c libburn-1.5.4.tar.gz.sig

View File

@ -3,15 +3,16 @@
Summary: Library for reading, mastering and writing optical discs Summary: Library for reading, mastering and writing optical discs
Name: libburn Name: libburn
Version: 1.5.4 Version: 1.5.4
Release: 3%{?dist} Release: 4%{?dist}
License: GPLv2+ License: GPLv2+
URL: http://libburnia-project.org/ URL: https://libburnia-project.org/
Source0: http://files.libburnia-project.org/releases/%{pkgname}-%{version}.tar.gz Source0: https://files.libburnia-project.org/releases/%{pkgname}-%{version}.tar.gz
Source1: http://files.libburnia-project.org/releases/%{pkgname}-%{version}.tar.gz.sig Source1: https://files.libburnia-project.org/releases/%{pkgname}-%{version}.tar.gz.sig
Source2: gpgkey-44BC9FD0D688EB007C4DD029E9CBDFC0ABC0A854.gpg Source2: gpgkey-44BC9FD0D688EB007C4DD029E9CBDFC0ABC0A854.gpg
Patch0: libburn-0.6.16-multilib.patch Patch0: libburn-0.6.16-multilib.patch
BuildRequires: gnupg2 BuildRequires: gnupg2
BuildRequires: gcc, make, intltool, gettext BuildRequires: gcc, make, intltool, gettext
BuildRequires: chrpath
%if 0%{?rhel} && "%{name}" != "%{pkgname}" %if 0%{?rhel} && "%{name}" != "%{pkgname}"
BuildRequires: autoconf, automake, libtool, pkgconfig BuildRequires: autoconf, automake, libtool, pkgconfig
%global variant 1 %global variant 1
@ -52,6 +53,8 @@ Summary: Limited cdrecord compatibility wrapper to ease migration to %{n
Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release}
Requires(post): %{_sbindir}/alternatives, coreutils Requires(post): %{_sbindir}/alternatives, coreutils
Requires(preun): %{_sbindir}/alternatives Requires(preun): %{_sbindir}/alternatives
Provides: cdrecord
Provides: wodim
%description -n cdrskin%{?variant} %description -n cdrskin%{?variant}
A limited cdrecord compatibility wrapper which allows to use some %{name} A limited cdrecord compatibility wrapper which allows to use some %{name}
@ -89,28 +92,28 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}.la
# Clean up for later usage in documentation # Clean up for later usage in documentation
rm -rf $RPM_BUILD_ROOT%{_defaultdocdir} rm -rf $RPM_BUILD_ROOT%{_defaultdocdir}
chrpath -d $RPM_BUILD_ROOT%{_bindir}/cdrskin
# RHEL ships a cdrskin package already # RHEL ships a cdrskin package already
%if 0%{?rhel} && "%{name}" != "%{pkgname}" %if 0%{?rhel} && "%{name}" != "%{pkgname}"
mv -f $RPM_BUILD_ROOT%{_bindir}/cdrskin{,%{?variant}} mv -f $RPM_BUILD_ROOT%{_bindir}/cdrskin{,%{?variant}}
mv -f $RPM_BUILD_ROOT%{_mandir}/man1/cdrskin{,%{?variant}}.1 mv -f $RPM_BUILD_ROOT%{_mandir}/man1/cdrskin{,%{?variant}}.1
%endif %endif
# Symlink cdrskin as cdrecord (like in cdrkit) # Prepare alternatives handling for cdrecord, wodim -> cdrskin
ln -sf cdrskin%{?variant} $RPM_BUILD_ROOT%{_bindir}/cdrecord touch $RPM_BUILD_ROOT{%{_bindir}/cdrecord,%{_mandir}/man1/cdrecord.1.gz}
touch $RPM_BUILD_ROOT{%{_bindir}/wodim,%{_mandir}/man1/wodim.1.gz}
%ldconfig_scriptlets %ldconfig_scriptlets
%post -n cdrskin%{?variant} %post -n cdrskin%{?variant}
link=`readlink %{_bindir}/cdrecord` %{_sbindir}/alternatives --install %{_bindir}/cdrecord cdrecord %{_bindir}/cdrskin%{?variant} 60 \
if [ "$link" == "cdrskin%{?variant}" ]; then --slave %{_mandir}/man1/cdrecord.1.gz cdrecord-cdrecordman %{_mandir}/man1/cdrskin%{?variant}.1.gz \
rm -f %{_bindir}/cdrecord --slave %{_bindir}/wodim cdrecord-wodim %{_bindir}/cdrskin%{?variant} \
fi --slave %{_mandir}/man1/wodim.1.gz cdrecord-wodimman %{_mandir}/man1/cdrskin%{?variant}.1.gz
%{_sbindir}/alternatives --install %{_bindir}/cdrecord cdrecord %{_bindir}/cdrskin%{?variant} 50 \
--slave %{_mandir}/man1/cdrecord.1.gz cdrecord-cdrecordman %{_mandir}/man1/cdrskin%{?variant}.1.gz
%preun -n cdrskin%{?variant} %preun -n cdrskin%{?variant}
if [ $1 = 0 ]; then if [ $1 -eq 0 ]; then
%{_sbindir}/alternatives --remove cdrecord %{_bindir}/cdrskin%{?variant} %{_sbindir}/alternatives --remove cdrecord %{_bindir}/cdrskin%{?variant}
fi fi
@ -131,10 +134,17 @@ fi
%files -n cdrskin%{?variant} %files -n cdrskin%{?variant}
%ghost %{_bindir}/cdrecord %ghost %{_bindir}/cdrecord
%ghost %{_bindir}/wodim
%{_bindir}/cdrskin%{?variant} %{_bindir}/cdrskin%{?variant}
%ghost %{_mandir}/man1/cdrecord.1*
%ghost %{_mandir}/man1/wodim.1*
%{_mandir}/man1/cdrskin%{?variant}.1* %{_mandir}/man1/cdrskin%{?variant}.1*
%changelog %changelog
* Tue Feb 08 2022 Jiri Kucera <jkucera@redhat.com> - 1.5.4-4
- Fix cdrecord & wodim alternatives
Related: #2015861
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1.5.4-3 * Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1.5.4-3
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688 Related: rhbz#1991688