2011-07-12 15:23:33 +02:00
|
|
|
#
|
2011-07-29 16:52:27 +02:00
|
|
|
# spec file for package os-prober
|
|
|
|
#
|
2013-01-05 15:42:18 +01:00
|
|
|
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2011-07-29 16:52:27 +02:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2011-07-12 15:23:33 +02:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2011-12-08 13:25:14 +01:00
|
|
|
|
2011-07-12 15:23:33 +02:00
|
|
|
Name: os-prober
|
2011-12-08 13:25:14 +01:00
|
|
|
Version: 1.49
|
2011-12-08 13:21:20 +01:00
|
|
|
Release: 0
|
2011-07-12 15:23:33 +02:00
|
|
|
Summary: Probes disks on the system for installed operating systems
|
2011-12-08 13:21:20 +01:00
|
|
|
License: GPL-2.0+
|
|
|
|
Group: System/Boot
|
2011-07-12 15:23:33 +02:00
|
|
|
|
|
|
|
Url: http://kitenet.net/~joey/code/os-prober/
|
|
|
|
Source0: http://ftp.de.debian.org/debian/pool/main/o/os-prober/%{name}_%{version}.tar.gz
|
2011-12-19 12:15:34 +01:00
|
|
|
Source1: COPYING-note.txt
|
2013-01-05 15:42:18 +01:00
|
|
|
Source2: 05efi
|
|
|
|
Source3: efi-20microsoft
|
|
|
|
Source4: efi-10elilo
|
2011-07-12 15:23:33 +02:00
|
|
|
# move newns binary outside of os-prober subdirectory, so that debuginfo
|
|
|
|
# can be automatically generated for it
|
|
|
|
Patch0: os-prober-newnsdirfix.patch
|
|
|
|
# PATCH-FIX-OPENSUSE: Fix spelling of SUSE aj@suse.de
|
|
|
|
Patch1: os-prober-SUSE.patch
|
2013-01-05 15:42:18 +01:00
|
|
|
# PATCH-FIX-OPENSUSE: Skip legacy Microsoft bootloader on UEFI [bnc#775610]
|
|
|
|
Patch2: os-prober-skip-MS-legacy-on-UEFI.patch
|
2011-07-12 15:23:33 +02:00
|
|
|
|
|
|
|
Requires: /bin/grep
|
|
|
|
Requires: /bin/sed
|
|
|
|
Requires: /sbin/modprobe
|
|
|
|
Requires: coreutils
|
|
|
|
Requires: dmraid
|
|
|
|
Requires: lvm2
|
|
|
|
Requires: udev
|
|
|
|
Requires: util-linux
|
|
|
|
|
|
|
|
%description
|
|
|
|
This package detects other OSes available on a system and outputs the results
|
|
|
|
in a generic machine-readable format. Support for new OSes and Linux
|
|
|
|
distributions can be added easily.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n %{name}
|
2011-12-19 12:15:34 +01:00
|
|
|
cp %SOURCE1 .
|
2011-07-12 15:23:33 +02:00
|
|
|
%patch0 -p1
|
|
|
|
%patch1 -p1
|
2013-01-05 15:42:18 +01:00
|
|
|
%patch2 -p1
|
2011-07-12 15:23:33 +02:00
|
|
|
|
|
|
|
%build
|
2011-10-04 10:44:54 +02:00
|
|
|
make %{?_smp_mflags} CC="%__cc" CFLAGS="%{optflags}"
|
2011-07-12 15:23:33 +02:00
|
|
|
|
|
|
|
%install
|
|
|
|
install -m 0755 -d %{buildroot}%{_bindir}
|
|
|
|
install -m 0755 -d %{buildroot}%{_localstatedir}/lib/%{name}
|
|
|
|
|
|
|
|
install -m 0755 -p os-prober linux-boot-prober %{buildroot}%{_bindir}
|
|
|
|
install -m 0755 -Dp newns %{buildroot}%{_libexecdir}/newns
|
|
|
|
install -m 0644 -Dp common.sh %{buildroot}%{_datadir}/%{name}/common.sh
|
|
|
|
|
|
|
|
%ifarch m68k
|
|
|
|
ARCH=m68k
|
|
|
|
%endif
|
|
|
|
%ifarch ppc ppc64
|
|
|
|
ARCH=powerpc
|
|
|
|
%endif
|
|
|
|
%ifarch sparc sparc64
|
|
|
|
ARCH=sparc
|
|
|
|
%endif
|
|
|
|
%ifarch %{ix86} x86_64
|
|
|
|
ARCH=x86
|
|
|
|
%endif
|
|
|
|
|
|
|
|
for probes in os-probes os-probes/mounted os-probes/init \
|
|
|
|
linux-boot-probes linux-boot-probes/mounted; do
|
|
|
|
install -m 755 -d %{buildroot}%{_libexecdir}/$probes
|
|
|
|
cp -a $probes/common/* %{buildroot}%{_libexecdir}/$probes
|
|
|
|
if [ -e "$probes/$ARCH" ]; then
|
|
|
|
cp -a $probes/$ARCH/* %{buildroot}%{_libexecdir}/$probes
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
if [ "$ARCH" = x86 ]; then
|
|
|
|
install -m 755 -p os-probes/mounted/powerpc/20macosx \
|
|
|
|
%{buildroot}%{_libexecdir}/os-probes/mounted
|
2013-01-05 15:42:18 +01:00
|
|
|
install -m 755 -p %SOURCE2 %{buildroot}%{_libexecdir}/os-probes/mounted
|
|
|
|
install -m 755 -d %{buildroot}%{_libexecdir}/os-probes/mounted/efi
|
|
|
|
install -m 755 -p %SOURCE3 \
|
|
|
|
%{buildroot}%{_libexecdir}/os-probes/mounted/efi/20microsoft
|
|
|
|
install -m 755 -p %SOURCE4 \
|
|
|
|
%{buildroot}%{_libexecdir}/os-probes/mounted/efi/10elilo
|
2011-07-12 15:23:33 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root,-)
|
2011-12-19 12:15:34 +01:00
|
|
|
%doc README TODO debian/copyright debian/changelog COPYING-note.txt
|
2011-07-12 15:23:33 +02:00
|
|
|
%{_bindir}/*
|
|
|
|
%{_libexecdir}/linux-boot-probes
|
|
|
|
%{_libexecdir}/newns
|
|
|
|
%{_libexecdir}/os-probes
|
|
|
|
%{_datadir}/%{name}
|
|
|
|
%{_localstatedir}/lib/%{name}
|
|
|
|
|
|
|
|
%changelog
|