Spec cleanup

This commit is contained in:
Andrey Bondrov 2017-01-21 21:39:51 +10:00
parent b7c8c0e6d4
commit c508ecebcf

View file

@ -1,98 +1,58 @@
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "import distutils.sysconfig as d; print d.get_python_lib()")}
%define debug_package %{nil} %define debug_package %{nil}
Summary: Tools for building live CDs Summary: Tools for building live CDs
Name: livecd-tools Name: livecd-tools
Version: 21.1 Version: 21.1
Release: 27 Release: 28
Epoch: 1 Epoch: 1
License: GPLv2 License: GPLv2+
Group: System/Base Group: System/Base
URL: http://git.fedorahosted.org/git/livecd Url: http://git.fedorahosted.org/git/livecd
Source0: http://fedorahosted.org/releases/l/i/livecd/%{name}-%{version}.tar.bz2 Source0: http://fedorahosted.org/releases/l/i/livecd/%{name}-%{version}.tar.bz2
Source1: arch.py Source1: arch.py
Source3: rosa-image-fix-x86.pl Source3: rosa-image-fix-x86.pl
Patch0: livecd-tools-21.1.urpmi.patch Patch0: livecd-tools-21.1.urpmi.patch
Patch1: livecd-tools-21.1.split.install.patch Patch1: livecd-tools-21.1.split.install.patch
Patch2: livecd-tools-21.1.efi.fixes.patch Patch2: livecd-tools-21.1.efi.fixes.patch
Patch3: livecd-tools-21.1.hack.patch Patch3: livecd-tools-21.1.hack.patch
Patch4: livecd-tools-21.1.hack2.patch Patch4: livecd-tools-21.1.hack2.patch
Patch5: livecd-tools-21.1.hack3.patch Patch5: livecd-tools-21.1.hack3.patch
Patch7: livecd-tools-21.1.no.mac.img.patch Patch7: livecd-tools-21.1.no.mac.img.patch
Patch8: livecd-tools-21.1.isolinux.plymouth.fixes.patch Patch8: livecd-tools-21.1.isolinux.plymouth.fixes.patch
Patch9: livecd-tools-21.1.efi.grub.cfg.patch Patch9: livecd-tools-21.1.efi.grub.cfg.patch
Patch10: livecd-tools-21.1.pkg.installation.fix.patch Patch10: livecd-tools-21.1.pkg.installation.fix.patch
Patch11: livecd-tools-21.1.drop.initramfs.patch Patch11: livecd-tools-21.1.drop.initramfs.patch
Patch12: livecd-tools-21.1.efi.no.dm.luks.patch Patch12: livecd-tools-21.1.efi.no.dm.luks.patch
Patch13: livecd-tools-21.1.basic.graphics.mode.fixed.patch Patch13: livecd-tools-21.1.basic.graphics.mode.fixed.patch
Patch14: livecd-tools-21.1.shim.efi.renamed.patch Patch14: livecd-tools-21.1.shim.efi.renamed.patch
Patch15: livecd-tools-21.1.secureboot.unsigned.kernel.patch Patch15: livecd-tools-21.1.secureboot.unsigned.kernel.patch
Patch17: livecd-tools-21.1.efi.grub.cfg.echo.patch Patch17: livecd-tools-21.1.efi.grub.cfg.echo.patch
Patch18: livecd-tools-21.1.fixed.boot.menu.os.name.patch Patch18: livecd-tools-21.1.fixed.boot.menu.os.name.patch
Patch19: livecd-tools-21.1.support.efi32.patch Patch19: livecd-tools-21.1.support.efi32.patch
Patch20: livecd-tools-21.1.verify.signatures.patch Patch20: livecd-tools-21.1.verify.signatures.patch
Patch21: livecd-tools-21.1.use.add_drivers.patch Patch21: livecd-tools-21.1.use.add_drivers.patch
Requires: python-imgcreate = %{epoch}:%{version}-%{release} Requires: python-imgcreate = %{EVRD}
Requires: mkisofs Requires: dosfstools
Requires: isomd5sum Requires: dumpet
Requires: parted Requires: e2fsprogs
Requires: pyparted Requires: mkisofs
Requires: util-linux Requires: isomd5sum
Requires: dosfstools Requires: lorax >= 18.3
Requires: e2fsprogs Requires: parted
Requires: lorax >= 18.3 Requires: pyparted
Obsoletes: livecd-iso-to-disk Requires: util-linux
%ifarch %{ix86} x86_64 %ifarch %{ix86} x86_64
Requires: syslinux Requires: syslinux
%endif %endif
Requires: dumpet
BuildRequires: perl
BuildRequires: python
%description
%description
Tools for generating live CDs on Fedora based systems including Tools for generating live CDs on Fedora based systems including
derived distributions such as RHEL, CentOS and others. See derived distributions such as RHEL, CentOS and others. See
http://fedoraproject.org/wiki/FedoraLiveCD for more details. http://fedoraproject.org/wiki/FedoraLiveCD for more details.
%package -n python-imgcreate
Summary: Python modules for building system images
Group: System/Base
Requires: util-linux
Requires: coreutils
Requires: e2fsprogs
Requires: squashfs-tools
Requires: pykickstart >= 0.96
Requires: dosfstools >= 2.11-8
#Requires: system-config-keyboard >= 1.3.0
Requires: python-urlgrabber
Requires: python-selinux
Requires: dbus-python
#Requires: policycoreutils
%description -n python-imgcreate
Python modules that can be used for building images for things
like live image or appliances.
%prep
%setup -q
%apply_patches
%build
make
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
%__install -m 0644 %{SOURCE1} %{buildroot}%{python_sitelib}/imgcreate/
%__install -m 0755 %{SOURCE3} %{buildroot}%{_bindir}/
%files %files
%defattr(-,root,root,-)
%doc config/livecd-fedora-minimal.ks %doc config/livecd-fedora-minimal.ks
%{_mandir}/man*/* %{_mandir}/man*/*
%{_bindir}/livecd-creator %{_bindir}/livecd-creator
@ -104,11 +64,42 @@ make install DESTDIR=$RPM_BUILD_ROOT
%{_bindir}/mkbiarch %{_bindir}/mkbiarch
%{_bindir}/rosa-image-fix-x86.pl %{_bindir}/rosa-image-fix-x86.pl
#----------------------------------------------------------------------------
%package -n python-imgcreate
Summary: Python modules for building system images
Group: System/Base
Requires: coreutils
Requires: dosfstools >= 2.11-8
Requires: e2fsprogs
Requires: pykickstart >= 0.96
Requires: python-dbus
Requires: python-selinux
Requires: python-urlgrabber
Requires: squashfs-tools
Requires: util-linux
%description -n python-imgcreate
Python modules that can be used for building images for things
like live image or appliances.
%files -n python-imgcreate %files -n python-imgcreate
%defattr(-,root,root,-)
%dir %{python_sitelib}/imgcreate %dir %{python_sitelib}/imgcreate
%{python_sitelib}/imgcreate/*.py %{python_sitelib}/imgcreate/*.py
%{python_sitelib}/imgcreate/*.pyo %{python_sitelib}/imgcreate/*.pyo
%{python_sitelib}/imgcreate/*.pyc %{python_sitelib}/imgcreate/*.pyc
%changelog #----------------------------------------------------------------------------
%prep
%setup -q
%apply_patches
%build
make
%install
%makeinstall_std
install -m 0644 %{SOURCE1} %{buildroot}%{python_sitelib}/imgcreate/
install -m 0755 %{SOURCE3} %{buildroot}%{_bindir}/