File os-prober.spec of Package os-prober

# spec file for package os-prober
# Copyright (c) 2011 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

Name:           os-prober
Version:        1.49
Release:        0
Summary:        Probes disks on the system for installed operating systems
License:        GPL-2.0+
Group:          System/Boot

Source1:        COPYING-note.txt
# 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
Patch1:         os-prober-SUSE.patch

Requires:       /bin/grep
Requires:       /bin/sed
Requires:       /sbin/modprobe
Requires:       coreutils
Requires:       dmraid
Requires:       lvm2
Requires:       udev
Requires:       util-linux

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.

%setup -q -n %{name}
cp %SOURCE1 .
%patch0 -p1
%patch1 -p1

make %{?_smp_mflags} CC="%__cc" CFLAGS="%{optflags}"

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 %{buildroot}%{_datadir}/%{name}/

%ifarch m68k
%ifarch ppc ppc64
%ifarch sparc sparc64
%ifarch %{ix86} x86_64

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
if [ "$ARCH" = x86 ]; then
        install -m 755 -p os-probes/mounted/powerpc/20macosx \

%doc README TODO debian/copyright debian/changelog COPYING-note.txt

openSUSE Build Service is sponsored by