- Don't ship API docs twice (devel and doc subpackages)

- Reworked spec file to build libisoburn1 for RHEL >= 8
This commit is contained in:
Robert Scheck 2020-12-28 05:21:50 +01:00
parent a50e120c62
commit 736b74f0d5

View File

@ -1,21 +1,28 @@
%global pkgname libisoburn
Summary: Library to enable creation and expansion of ISO-9660 filesystems Summary: Library to enable creation and expansion of ISO-9660 filesystems
Name: libisoburn Name: libisoburn
Version: 1.5.2 Version: 1.5.2
Release: 4%{?dist} Release: 5%{?dist}
License: GPLv2+ License: GPLv2+
URL: http://libburnia-project.org/ URL: http://libburnia-project.org/
Source0: http://files.libburnia-project.org/releases/%{name}-%{version}.tar.gz Source0: http://files.libburnia-project.org/releases/%{pkgname}-%{version}.tar.gz
Source1: http://files.libburnia-project.org/releases/%{name}-%{version}.tar.gz.sig Source1: http://files.libburnia-project.org/releases/%{pkgname}-%{version}.tar.gz.sig
Source2: gpgkey-44BC9FD0D688EB007C4DD029E9CBDFC0ABC0A854.gpg Source2: gpgkey-44BC9FD0D688EB007C4DD029E9CBDFC0ABC0A854.gpg
Source3: xorriso_extract_iso_image.desktop Source3: xorriso_extract_iso_image.desktop
Patch0: libisoburn-1.0.8-multilib.patch Patch0: libisoburn-1.0.8-multilib.patch
BuildRequires: gnupg2 BuildRequires: gnupg2
BuildRequires: gcc, gcc-c++, readline-devel, libacl-devel, zlib-devel BuildRequires: gcc, gcc-c++, readline-devel, libacl-devel, zlib-devel
%if 0%{?rhel} >= 6 && 0%{?rhel} <= 8 %if 0%{?rhel} == 7
BuildRequires: libburn1-devel >= %{version}, libisofs1-devel >= %{version}
BuildRequires: autoconf, automake, libtool BuildRequires: autoconf, automake, libtool
BuildRequires: libburn1-devel >= %{version}, libisofs1-devel >= %{version}
%else %else
BuildRequires: libburn-devel >= %{version}, libisofs-devel >= %{version} %if (0%{?rhel} && "%{name}" != "%{pkgname}")
BuildRequires: autoconf, automake, libtool
%global variant 1
%endif
BuildRequires: libburn%{?variant}-devel >= %{version}
BuildRequires: libisofs%{?variant}-devel >= %{version}
%endif %endif
%description %description
@ -29,15 +36,16 @@ libisoburn is not suitable for audio (CD-DA) or any other CD layout
which does not entirely consist of ISO-9660 sessions. which does not entirely consist of ISO-9660 sessions.
%package devel %package devel
Summary: Development files for libisoburn Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}, pkgconfig Requires: %{name}%{?_isa} = %{version}-%{release}, pkgconfig
%description devel %description devel
The libisoburn-devel package contains libraries and header files for The %{name}-devel package contains libraries and header files for
developing applications that use libisoburn. developing applications that use %{name}.
%if 0%{!?_without_doc:1}
%package doc %package doc
Summary: Documentation files for libisoburn Summary: Documentation files for %{name}
BuildArch: noarch BuildArch: noarch
BuildRequires: doxygen, graphviz BuildRequires: doxygen, graphviz
@ -45,13 +53,14 @@ BuildRequires: doxygen, graphviz
Libisoburn is a front-end for libraries libburn and libisofs which Libisoburn is a front-end for libraries libburn and libisofs which
enables creation and expansion of ISO-9660 filesystems on all CD/ enables creation and expansion of ISO-9660 filesystems on all CD/
DVD/BD media supported by libburn. And this package contains the API DVD/BD media supported by libburn. And this package contains the API
documentation for developing applications that use libisoburn. documentation for developing applications that use %{name}.
%endif
%package -n xorriso %package -n xorriso%{?variant}
Summary: ISO-9660 and Rock Ridge image manipulation tool Summary: ISO-9660 and Rock Ridge image manipulation tool
URL: http://scdbackup.sourceforge.net/xorriso_eng.html URL: http://scdbackup.sourceforge.net/xorriso_eng.html
Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release}
%if 0%{?rhel} == 7 || 0%{?fedora} %if 0%{!?_without_kde:1} && (0%{?fedora} || 0%{?rhel} == 7 || (0%{?rhel} && "%{name}" != "%{pkgname}"))
Requires: kde-filesystem >= 4 Requires: kde-filesystem >= 4
Requires: kf5-filesystem >= 5 Requires: kf5-filesystem >= 5
%endif %endif
@ -62,7 +71,7 @@ Requires(preun): /sbin/install-info
Requires(post): %{_sbindir}/alternatives, coreutils Requires(post): %{_sbindir}/alternatives, coreutils
Requires(preun): %{_sbindir}/alternatives Requires(preun): %{_sbindir}/alternatives
%description -n xorriso %description -n xorriso%{?variant}
Xorriso is a program which copies file objects from POSIX compliant Xorriso is a program which copies file objects from POSIX compliant
filesystems into Rock Ridge enhanced ISO-9660 filesystems and allows filesystems into Rock Ridge enhanced ISO-9660 filesystems and allows
session-wise manipulation of such filesystems. It can load management session-wise manipulation of such filesystems. It can load management
@ -77,22 +86,36 @@ supported media: CD-R, CD-RW, DVD-R, DVD-RW, DVD+R, DVD+R DL, DVD+RW,
DVD-RAM, BD-R and BD-RE. DVD-RAM, BD-R and BD-RE.
%prep %prep
gpgv2 --keyring %{SOURCE2} %{SOURCE1} %{SOURCE0} %{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
%setup -q %setup -q -n %{pkgname}-%{version}
%patch0 -p1 -b .multilib %patch0 -p1 -b .multilib
# Use libisofs1 and libburn1 on RHEL >= 6 # Use libisofs1 and libburn1 on EPEL
%if 0%{?rhel} >= 6 && 0%{?rhel} <= 8 %if 0%{?rhel} == 7 || (0%{?rhel} && "%{name}" != "%{pkgname}")
sed -e 's@\(libisofs\|libburn\)-1.pc@\11-1.pc@g' -i configure.ac sed -e 's@\(libisofs\|libburn\)-1.pc@\11-1.pc@g' -i configure.ac
sed -e 's@\(libisofs\|libburn\)/@\11/@g' -i configure.ac */*.[hc] */*/*.cpp sed -e 's@\(libisofs\|libburn\)/@\11/@g' -i configure.ac */*.[hc] */*/*.cpp
sed -e 's@\(lisofs\|lburn\)@\11@g' -i Makefile.am sed -e 's@\(lisofs\|lburn\)@\11@g' -i Makefile.am
touch NEWS; autoreconf --force --install touch NEWS; autoreconf --force --install
# Rename from libisoburn to libisoburn1 for EPEL >= 8
%if 0%{?rhel} >= 8
sed -e 's@libisoburn_libisoburn@libisoburn_libisoburn1@g' \
-e 's@libisoburn/libisoburn.la@libisoburn/libisoburn1.la@g' \
-e 's@(includedir)/libisoburn@(includedir)/libisoburn1@g' \
-e 's@libisoburn-1.pc@libisoburn1-1.pc@g' \
-e 's@ln -s xorriso@ln -s xorriso%{?variant}@g' -i Makefile.am
sed -e 's@libisoburn-1.pc@libisoburn1-1.pc@g' -i configure.ac
sed -e 's@isoburn@isoburn1@g' libisoburn-1.pc.in > libisoburn1-1.pc.in
libtoolize --force
autoreconf --force --install
%endif
%endif %endif
%build %build
%configure --disable-static %configure --disable-static
%make_build %make_build
doxygen doc/doxygen.conf %{!?_without_doc:doxygen doc/doxygen.conf}
%install %install
%make_install %make_install
@ -103,14 +126,33 @@ 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}
%if 0%{?rhel} == 7 || 0%{?fedora}
# Install the KDE service menu handler # Install the KDE service menu handler
%if 0%{!?_without_kde:1} && (0%{?fedora} || 0%{?rhel} == 7 || (0%{?rhel} && "%{name}" != "%{pkgname}"))
install -D -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/kde4/services/ServiceMenus/xorriso_extract_iso_image.desktop install -D -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/kde4/services/ServiceMenus/xorriso_extract_iso_image.desktop
install -D -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/kservices5/ServiceMenus/xorriso_extract_iso_image.desktop install -D -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/kservices5/ServiceMenus/xorriso_extract_iso_image.desktop
%endif %endif
# RHEL ships a xorriso package already
%if 0%{?rhel} && "%{name}" != "%{pkgname}"
mv -f $RPM_BUILD_ROOT%{_bindir}/osirrox{,%{?variant}}
mv -f $RPM_BUILD_ROOT%{_bindir}/xorrecord{,%{?variant}}
mv -f $RPM_BUILD_ROOT%{_bindir}/xorriso{,%{?variant}}
mv -f $RPM_BUILD_ROOT%{_bindir}/xorrisofs{,%{?variant}}
mv -f $RPM_BUILD_ROOT%{_mandir}/man1/xorrecord{,%{?variant}}.1
mv -f $RPM_BUILD_ROOT%{_mandir}/man1/xorriso{,%{?variant}}.1
mv -f $RPM_BUILD_ROOT%{_mandir}/man1/xorrisofs{,%{?variant}}.1
mv -f $RPM_BUILD_ROOT%{_infodir}/xorrecord{,%{?variant}}.info
mv -f $RPM_BUILD_ROOT%{_infodir}/xorriso{,%{?variant}}.info
mv -f $RPM_BUILD_ROOT%{_infodir}/xorrisofs{,%{?variant}}.info
%if 0%{!?_without_kde:1}
sed -e 's@ xorriso @ xorriso%{?variant} @g' \
-i $RPM_BUILD_ROOT%{_datadir}/{kde4/services,kservices5}/ServiceMenus/xorriso_extract_iso_image.desktop
touch -c -r %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/{kde4/services,kservices5}/ServiceMenus/xorriso_extract_iso_image.desktop
%endif
%endif
# Symlink xorriso as mkisofs (like in cdrkit) # Symlink xorriso as mkisofs (like in cdrkit)
ln -sf xorriso $RPM_BUILD_ROOT%{_bindir}/mkisofs ln -sf xorriso%{?variant} $RPM_BUILD_ROOT%{_bindir}/mkisofs
# Some file cleanups # Some file cleanups
rm -f $RPM_BUILD_ROOT%{_infodir}/dir rm -f $RPM_BUILD_ROOT%{_infodir}/dir
@ -125,30 +167,30 @@ cd releng
%ldconfig_scriptlets %ldconfig_scriptlets
%post -n xorriso %post -n xorriso%{?variant}
%if 0%{?rhel} && 0%{?rhel} <= 7 %if 0%{?rhel} == 7
/sbin/install-info %{_infodir}/xorrecord.info.gz %{_infodir}/dir || : /sbin/install-info %{_infodir}/xorrecord.info.gz %{_infodir}/dir || :
/sbin/install-info %{_infodir}/xorriso.info.gz %{_infodir}/dir || : /sbin/install-info %{_infodir}/xorriso.info.gz %{_infodir}/dir || :
/sbin/install-info %{_infodir}/xorrisofs.info.gz %{_infodir}/dir || : /sbin/install-info %{_infodir}/xorrisofs.info.gz %{_infodir}/dir || :
%endif %endif
link=`readlink %{_bindir}/mkisofs` link=`readlink %{_bindir}/mkisofs`
if [ "$link" == "xorriso" ]; then if [ "$link" == "xorriso%{?variant}" ]; then
rm -f %{_bindir}/mkisofs rm -f %{_bindir}/mkisofs
fi fi
%{_sbindir}/alternatives --install %{_bindir}/mkisofs mkisofs %{_bindir}/xorriso 50 \ %{_sbindir}/alternatives --install %{_bindir}/mkisofs mkisofs %{_bindir}/xorriso%{?variant} 50 \
--slave %{_mandir}/man1/mkisofs.1.gz mkisofs-mkisofsman %{_mandir}/man1/xorrisofs.1.gz --slave %{_mandir}/man1/mkisofs.1.gz mkisofs-mkisofsman %{_mandir}/man1/xorrisofs%{?variant}.1.gz
%preun -n xorriso %preun -n xorriso%{?variant}
if [ $1 = 0 ]; then if [ $1 = 0 ]; then
%if 0%{?rhel} && 0%{?rhel} <= 7 %if 0%{?rhel} == 7
/sbin/install-info --delete %{_infodir}/xorrecord.info.gz %{_infodir}/dir || : /sbin/install-info --delete %{_infodir}/xorrecord.info.gz %{_infodir}/dir || :
/sbin/install-info --delete %{_infodir}/xorriso.info.gz %{_infodir}/dir || : /sbin/install-info --delete %{_infodir}/xorriso.info.gz %{_infodir}/dir || :
/sbin/install-info --delete %{_infodir}/xorrisofs.info.gz %{_infodir}/dir || : /sbin/install-info --delete %{_infodir}/xorrisofs.info.gz %{_infodir}/dir || :
%endif %endif
%{_sbindir}/alternatives --remove mkisofs %{_bindir}/xorriso %{_sbindir}/alternatives --remove mkisofs %{_bindir}/xorriso%{?variant}
fi fi
%files %files
@ -157,32 +199,37 @@ fi
%{_libdir}/%{name}*.so.* %{_libdir}/%{name}*.so.*
%files devel %files devel
%doc doc/html
%{_includedir}/%{name} %{_includedir}/%{name}
%{_libdir}/%{name}.so %{_libdir}/%{name}.so
%{_libdir}/pkgconfig/%{name}*.pc %{_libdir}/pkgconfig/%{name}*.pc
%if 0%{!?_without_doc:1}
%files doc %files doc
%doc doc/html/ %doc doc/html/
%endif
%files -n xorriso %files -n xorriso%{?variant}
%ghost %{_bindir}/mkisofs %ghost %{_bindir}/mkisofs
%{_bindir}/osirrox %{_bindir}/osirrox%{?variant}
%{_bindir}/xorrecord %{_bindir}/xorrecord%{?variant}
%{_bindir}/xorriso %{_bindir}/xorriso%{?variant}
%{_bindir}/xorrisofs %{_bindir}/xorrisofs%{?variant}
%{_mandir}/man1/xorrecord.1* %{_mandir}/man1/xorrecord%{?variant}.1*
%{_mandir}/man1/xorriso.1* %{_mandir}/man1/xorriso%{?variant}.1*
%{_mandir}/man1/xorrisofs.1* %{_mandir}/man1/xorrisofs%{?variant}.1*
%{_infodir}/xorrecord.info* %{_infodir}/xorrecord%{?variant}.info*
%{_infodir}/xorriso.info* %{_infodir}/xorriso%{?variant}.info*
%{_infodir}/xorrisofs.info* %{_infodir}/xorrisofs%{?variant}.info*
%if 0%{?rhel} == 7 || 0%{?fedora} %if 0%{!?_without_kde:1} && (0%{?fedora} || 0%{?rhel} == 7 || (0%{?rhel} && "%{name}" != "%{pkgname}"))
%{_datadir}/kde4/services/ServiceMenus/xorriso_extract_iso_image.desktop %{_datadir}/kde4/services/ServiceMenus/xorriso_extract_iso_image.desktop
%{_datadir}/kservices5/ServiceMenus/xorriso_extract_iso_image.desktop %{_datadir}/kservices5/ServiceMenus/xorriso_extract_iso_image.desktop
%endif %endif
%changelog %changelog
* Mon Dec 28 2020 Robert Scheck <robert@fedoraproject.org> 1.5.2-5
- Don't ship API docs twice (devel and doc subpackages)
- Reworked spec file to build libisoburn1 for RHEL >= 8
* Mon Sep 28 2020 Troy Dawson <tdawson@redhat.com> - 1.5.2-4 * Mon Sep 28 2020 Troy Dawson <tdawson@redhat.com> - 1.5.2-4
- No kde or kf5 filesystem for RHEL 8 or above. - No kde or kf5 filesystem for RHEL 8 or above.