Logoj0ke.net Open Build Service > Projects > GFS > kernel-source > kernel-syms-rt.spec
Sign Up | Log In

File kernel-syms-rt.spec of Package kernel-source (Revision ce796e2499aac629e569fcf4eb4958e5)

Currently displaying revision ce796e2499aac629e569fcf4eb4958e5, show latest

 
1
#
2
# spec file for package kernel-syms-rt (Version 2.6.27.4)
3
#
4
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
5
# This file and all modifications and additions to the pristine
6
# package are under the same license as the package itself.
7
#
8
# Please submit bugfixes or comments via http://bugs.opensuse.org/
9
#
10
11
# norootforbuild
12
# ( kernel-binary-packages is expanded into the list of all binary kernel
13
#   packages for each architecture by Autobuild. )
14
15
%if 0%{?opensuse_bs}
16
# Strip off the build number ("y") from the "x.y" release number
17
%define source_rel %(release=%release; echo ${release%.*})
18
%else
19
# We don't have build numbers internally
20
%define source_rel %release
21
%endif
22
23
Name:         kernel-syms-rt
24
Summary:      Dummy summary
25
Version:      2.6.27.4
26
Release:      <RELEASE>
27
License:      GPL
28
Group:        Development/Sources
29
AutoReqProv:  off
30
BuildRequires: coreutils
31
%if ! 0%{?opensuse_bs}
32
BuildRequires: kernel-dummy
33
%endif
34
ExclusiveArch: %ix86 x86_64
35
%ifarch %ix86
36
BuildRequires: kernel-rt kernel-rt_debug
37
%else
38
%ifarch x86_64
39
BuildRequires: kernel-rt kernel-rt_debug
40
%endif
41
%endif
42
# the packages above do require other things, but none of those are needed during package build
43
#!BuildIgnore: irqbalance xen
44
#!BuildIgnore: perl-Bootloader mkinitrd
45
Requires:     linux
46
Requires:     kernel-source = 2.6.27.4-%source_rel
47
Source11:     arch-symbols
48
Source12:     guards
49
Source21:     config.conf
50
BuildRoot:    %_tmppath/%name-%version-build
51
Prefix:       /usr/src
52
53
%(chmod +x %_sourcedir/{arch-symbols,guards})
54
55
%define symbols %(set -- $(%_sourcedir/arch-symbols %_target_cpu) $([ -e %_sourcedir/extra-symbols ] && cat %_sourcedir/extra-symbols) ; echo $*)
56
57
%description
58
Dummy description.
59
60
%prep
61
62
echo "Architecture symbol(s):" %symbols
63
64
%install
65
rm -rf $RPM_BUILD_ROOT
66
mkdir $RPM_BUILD_ROOT
67
68
set -- %symbols
69
case kernel-syms-rt in
70
(*-rt)
71
    set -- RT "$@"
72
    ;;
73
esac
74
%_sourcedir/guards "$@" < %_sourcedir/series.conf > %_builddir/kernel-syms-rt.patches
75
for config in $(%_sourcedir/guards %symbols < %_sourcedir/config.conf) ; do
76
    arch="${config%%/*}"
77
    flavor="${config#*/}"
78
    
79
    rpm -q --quiet kernel-$flavor || continue
80
81
    # Don't add the build infrastructure for kernels that are based
82
    # on a different set of patches.
83
    set -- kernel-$flavor $flavor $(case $flavor in (rt|rt_*) echo RT ;; esac)
84
    %_sourcedir/guards $* %symbols < %_sourcedir/series.conf \
85
    > %_builddir/kernel-$flavor.patches
86
    diff -q %_builddir/{kernel-syms-rt,kernel-$flavor}.patches || continue
87
88
    # Make sure that all the kernel-$flavor release numbers match the
89
    # kernel-syms release number.
90
    set -- %release $(rpm -q --qf '%{RELEASE}' kernel-$flavor)
91
%if 0%{?opensuse_bs}
92
    set -- ${1%.*} ${2%.*}
93
%endif
94
    if [ "$1" != "$2" ]; then
95
    echo "Release numbers $1 and $2 do not match" >&2
96
    exit 1
97
    fi
98
99
    shopt -s nullglob
100
    for symvers in /usr/src/linux-*-obj/$arch/$flavor/Module.symvers; do
101
    cp -p --parents $symvers $RPM_BUILD_ROOT/
102
    for file in /lib/modules/*-$flavor/modules.alias; do
103
        cp -p $file $(dirname $RPM_BUILD_ROOT$symvers)
104
    done
105
    done
106
    for symsets in /boot/symsets-*-$flavor.tar.gz; do
107
    cp -p --parents $symsets $RPM_BUILD_ROOT/
108
    done
109
    for file in /lib/modules/*-$flavor/build; do
110
    cp -pd --parents $file $RPM_BUILD_ROOT/
111
    done
112
done
113
114
%files
115
%defattr(-, root, root)
116
/usr/src/linux-*-obj
117
/boot/symsets-*-*.tar.gz
118
/lib/modules/*/build
119