livecd-tools/livecd-tools.spec
2020-05-28 21:08:42 +03:00

164 lines
4.5 KiB
RPMSpec

# NOTE: This package is fully arched due to dependency sensitivity.
# Please do not remove archfulness on Requires/Provides.
%define debug_package %{nil}
%global min_dnf_ver 4.0
%global min_pykickstart_ver 2.25
Name: livecd-tools
Summary: Tools for building live CDs
Epoch: 1
Version: 27.1
Release: 15
License: GPLv2
Group: System/Base
URL: https://github.com/livecd-tools/livecd-tools
Source0: https://releases.pagure.org/%{name}/%{name}-%{version}.tar.gz
# https://github.com/livecd-tools/livecd-tools/issues/156
Patch1: 0001-Add-ability-to-prevent-SELinux-relabelling-from-host.patch
# Keep it in sync with grub2 and shim(-signed) packaging
Patch2: 0002-Adapt-Grub-and-Shim-paths-for-ROSA.patch
# add "anaconda" and "livenet" dracut modules to LiveCD
Patch3: 0003-Add-livenet-and-anaconda-initrd-modules.patch
# ROSA theme
Patch4: 0004-Port-ROSA-theme.patch
Patch5: 0005-Add-start-up-in-basic-graphics-mode-without-plymouth.patch
Patch6: 0006-Port-ROSA-syslinux-theme.patch
# For PowerPC (for future)
Patch7: 0007-ppc64-Assume-dracut-is-always-used.patch
# Fix copying ROSA Grub2 theme for UEFI
Patch8: 0008-Copy-all-files-that-match-a-glob.patch
BuildRequires: python3-devel
# pod2man comes from perl
BuildRequires: perl
Requires: python3-imgcreate%{?_isa} = %{EVRD}
%ifarch %{ix86} x86_64
Requires: livecd-iso-to-mediums = %{EVRD}
%endif
%description
Tools for generating live CDs on Fedora based systems including
derived distributions such as RHEL, CentOS and others. See
http://fedoraproject.org/wiki/FedoraLiveCD for more details.
%package -n python-imgcreate-sysdeps
Summary: Common system dependencies for python-imgcreate
Group: System/Base
Requires: coreutils
Requires: xorriso
Requires: isomd5sum
Requires: parted
Requires: util-linux
Requires: dosfstools
Requires: e2fsprogs
%ifarch %{ix86} x86_64 aarch64
Requires: mkefiboot
%endif
Requires: rsync
%ifarch %{ix86} x86_64 ppc ppc64
Requires: hfsplus-tools
%endif
%ifarch %{ix86} x86_64
Requires: syslinux
%endif
%ifarch ppc
Requires: yaboot
%endif
Requires: dumpet
Requires: sssd-client
Requires: cryptsetup
Requires: squashfs-tools
Requires: policycoreutils
# Python 2 bindings have been dropped
Obsoletes: python-imgcreate < %{EVRD}
Obsoletes: python2-imgcreate < %{EVRD}
%description -n python-imgcreate-sysdeps
This package describes the common system dependencies for
python-imgcreate.
%package -n python3-imgcreate
Summary: Python 3 modules for building system images
Group: Development/Python
%{?python_provide:%python_provide python3-imgcreate}
Requires: python-imgcreate-sysdeps%{?_isa} = %{EVRD}
Requires: python3-parted
Requires: python3-dnf >= %{min_dnf_ver}
Requires: python3-kickstart >= %{min_pykickstart_ver}
Requires: python3-six
Requires: python3-libselinux
Requires: python3-dbus
%description -n python3-imgcreate
Python 3 modules that can be used for building images for things
like live image or appliances.
%ifarch %{ix86} x86_64
%package -n livecd-iso-to-mediums
Summary: Tools for installing ISOs to different mediums
Group: System/Base
Requires: python-imgcreate-sysdeps%{?_isa} = %{EVRD}
Requires: syslinux-extlinux
Requires: syslinux-tftpboot
%description -n livecd-iso-to-mediums
Tools for installing Live CD ISOs to different mediums
(e.g. USB sticks, hard drives, PXE boot, etc.)
%endif
%prep
%autosetup -p1
%build
# Nothing to do
%install
%make_install PYTHON=python3
# Delete installed docs, we'll grab them later
rm -rf %{buildroot}%{_datadir}/doc/%{name}
%ifnarch %{ix86} x86_64
# livecd-iso-to-mediums doesn't work without syslinux
rm -rfv %{buildroot}%{_bindir}/livecd-iso-to-*
rm -rfv %{buildroot}%{_mandir}/man8/livecd-iso-to-*
%endif
%files
%license COPYING
%doc AUTHORS README HACKING
%doc config/livecd-fedora-minimal.ks
%doc config/livecd-mageia-minimal-*.ks
%{_bindir}/livecd-creator
%{_bindir}/image-creator
%{_bindir}/liveimage-mount
%{_bindir}/editliveos
%{_bindir}/mkbiarch
%{_mandir}/man8/livecd-creator.8*
%{_mandir}/man8/mkbiarch.8*
%files -n python-imgcreate-sysdeps
# No files because empty metapackage
%files -n python3-imgcreate
%license COPYING
%doc API
%{python3_sitelib}/imgcreate
%ifarch %{ix86} x86_64
%files -n livecd-iso-to-mediums
%license COPYING
%{_bindir}/livecd-iso-to-disk
%{_mandir}/man8/livecd-iso-to-disk.8*
%{_bindir}/livecd-iso-to-pxeboot
%endif