File kernel-syms.spec of Package kernel-source-ck

#
# spec file for package kernel-syms (Version v2.6.22_rc3)
#
# Copyright (c) 2003 SuSE Linux AG, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://www.suse.de/feedback/
#

# norootforbuild
# ( kernel-binary-packages is expanded into the list of all binary kernel
#   packages for each architecture by Autobuild. )

Name:         kernel-syms
Summary:      Dummy summary
Version:      v2.6.22_rc3
Release:      0
License:      GPL
Group:        Development/Sources
Autoreqprov:  off
BuildRequires: coreutils
%if ! 0%{?opensuse_bs}
BuildRequires: kernel-dummy
%endif
%ifarch %ix86
BuildRequires: kernel-default kernel-bigsmp kernel-debug kernel-um kernel-xen kernel-xenpae kernel-kdump kernel-vanilla
%else
%ifarch ppc
BuildRequires: kernel-default kernel-ppc64 kernel-kdump kernel-vanilla
%else
%ifarch ppc64
BuildRequires: kernel-default kernel-ppc64 kernel-kdump kernel-vanilla
%else
%ifarch s390
BuildRequires: kernel-s390
%else
%ifarch s390x
BuildRequires: kernel-default kernel-vanilla
%else
%ifarch ia64
BuildRequires: kernel-default kernel-debug kernel-vanilla
%else
%ifarch x86_64
BuildRequires: kernel-default kernel-um kernel-xen kernel-debug kernel-kdump kernel-vanilla
%else
%ifarch alpha
BuildRequires: kernel-default kernel-vanilla
%endif
%endif
%endif
%endif
%endif
%endif
%endif
%endif
# the packages above do require other things, but none of those are needed during package build
#!BuildIgnore: irqbalance xen
#!BuildIgnore: perl-Bootloader mkinitrd
Requires:     linux
Requires:     kernel-source = v2.6.22_rc3-%release
Source11:     arch-symbols
Source12:     guards
Source21:     config.conf
BuildRoot:    %_tmppath/%name-%version-build
Prefix:       /usr/src

%(chmod +x %_sourcedir/{arch-symbols,guards})

%define symbols %(set -- $(%_sourcedir/arch-symbols %_target_cpu) $([ -e extra-symbols ] && cat extra-symbols) ; echo $*)

%define preconf 1

%description
Dummy description.

%prep

echo "Architecture symbol(s):" %symbols

%install
# skip long-running sanity checks
export NO_BRP_NOEXECSTACK=yes

rm -rf $RPM_BUILD_ROOT
mkdir $RPM_BUILD_ROOT

%if %preconf
# Add all the symbol version hashes from the binary kernel packages
%_sourcedir/guards %symbols < %_sourcedir/series.conf \
    > %_builddir/kernel-source.patches
for config in $(%_sourcedir/guards %symbols < %_sourcedir/config.conf) ; do
    arch="${config%%/*}"
    flavor="${config#*/}"
    
    # Don't add the preconf files for kernels that are based
    # on a different set of patches than kernel-source.
    %_sourcedir/guards %symbols kernel-$flavor < %_sourcedir/series.conf \
	> %_builddir/kernel-$flavor.patches
    diff -q %_builddir/kernel-{source,$flavor}.patches || continue

    shopt -s nullglob
    for symvers in /usr/src/linux-*-obj/$arch/*/Module.symvers; do
	cp -p --parents $symvers $RPM_BUILD_ROOT/
    done
    for symsets in /boot/symsets-*-$flavor.tar.gz; do
	cp -p --parents $symsets $RPM_BUILD_ROOT/
    done
    for file in /lib/modules/*-$flavor/{modules.alias,build}; do
	cp -pd --parents $file $RPM_BUILD_ROOT/
    done
done
%endif

%files
%defattr(-, root, root)
%if %preconf
/usr/src/linux-*-obj
%endif
/boot/symsets-*-*.tar.gz
/lib/modules/*/*
openSUSE Build Service is sponsored by