perl-Bootloader/perl-Bootloader.spec

101 lines
3.3 KiB
RPMSpec

#
# spec file for package perl-Bootloader (Version 0.5.9)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: perl-Bootloader
Version: 0.5.9
Release: 1
Requires: perl-base = %{perl_version}
Requires: e2fsprogs
Recommends: perl-gettext
AutoReqProv: on
Group: System/Boot
License: GNU General Public License (GPL)
Summary: Library for Configuring Boot Loaders
Source: perl-Bootloader-%{version}.tar.bz2
Source1: update-bootloader
Source2: bootloader_entry
Source3: boot.readme
BuildRoot: %{_tmppath}/%{name}-%{version}-build
#!BuildIgnore: mdadm e2fsprogs limal-bootloader
%description
Perl modules for configuring various boot loaders.
Authors:
--------
Jiri Srain <jsrain@suse.cz>
Joachim Plack <jplack@suse.de>
Alexander Osthof <aosthof@suse.de>
Josef Reidinger <jreidinger@suse.cz>
%prep
%setup -q
%build
touch Makefile.PL
perl -MExtUtils::MakeMaker -e 'WriteMakefile (NAME => "Bootloader")'
make %{?_smp_mflags}
pod2man %{SOURCE1} | gzip > update-Bootloader.8.gz
%install
make DESTDIR=$RPM_BUILD_ROOT install_vendor
%perl_process_packlist
mkdir -p $RPM_BUILD_ROOT/sbin
install -m 755 %_sourcedir/update-bootloader $RPM_BUILD_ROOT/sbin
install -d -m 755 $RPM_BUILD_ROOT/usr/lib/bootloader
install -m 755 %{SOURCE2} $RPM_BUILD_ROOT/usr/lib/bootloader
install -d -m 755 $RPM_BUILD_ROOT/boot
install -m 644 %{SOURCE3} $RPM_BUILD_ROOT/boot/
install -d -m 755 $RPM_BUILD_ROOT/usr/share/man/man8/
install -m 644 update-Bootloader.8.gz $RPM_BUILD_ROOT/usr/share/man/man8/
#install only needed files for bootloader for specific architecture
%ifarch %ix86 x86_64
rm $RPM_BUILD_ROOT/%{perl_vendorlib}/Bootloader/Core/{ZIPL*,PowerLILO*}
rm $RPM_BUILD_ROOT/%{_mandir}/man?/{*ZIPL*,*PowerLILO*}
sed -i '/ZIPL/D;/PowerLILO/D;' $RPM_BUILD_ROOT/%{perl_vendorarch}/auto/Bootloader/.packlist
%endif
%ifarch ppc ppc64
rm $RPM_BUILD_ROOT/%{perl_vendorlib}/Bootloader/Core/{ZIPL*,LILO*,ELILO*,GRUB*}
sed -i '/ZIPL/D;/ELILO/D;/\/LILO/D;/GRUB/D;' $RPM_BUILD_ROOT/%{perl_vendorarch}/auto/Bootloader/.packlist
%endif
%ifarch s390 s390x
rm $RPM_BUILD_ROOT/%{perl_vendorlib}/Bootloader/Core/{*LILO*,GRUB*}
sed -i '/LILO/D;/GRUB/D;' $RPM_BUILD_ROOT/%{perl_vendorarch}/auto/Bootloader/.packlist
%endif
%ifarch ia32 ia64
rm $RPM_BUILD_ROOT/%{perl_vendorlib}/Bootloader/Core/{LILO*,GRUB*,ZIPL*,PowerLILO*}
sed -i '/ZIPL/D;/PowerLILO/D;/\/LILO/D;/GRUB/D;' $RPM_BUILD_ROOT/%{perl_vendorarch}/auto/Bootloader/.packlist
%endif
%files
%defattr(-, root, root)
%doc COPYING
%doc %{_mandir}/man?/*
%{perl_vendorarch}/auto/Bootloader
%{perl_vendorlib}/Bootloader
/var/adm/perl-modules/perl-Bootloader
/sbin/update-bootloader
/usr/lib/bootloader
/boot/boot.readme
%changelog