Search
j0ke.net Open Build Service
>
Projects
>
GFS
>
kernel-source
> Changes
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
Changes of Revision 45
[-]
[+]
Added
kernel-syms-rt.spec
@@ -0,0 +1,118 @@ +# +# spec file for package kernel-syms-rt (Version 2.6.27.4) +# +# Copyright (c) 2008 SUSE LINUX Products GmbH, 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://bugs.opensuse.org/ +# + +# norootforbuild +# ( kernel-binary-packages is expanded into the list of all binary kernel +# packages for each architecture by Autobuild. ) + +%if 0%{?opensuse_bs} +# Strip off the build number ("y") from the "x.y" release number +%define source_rel %(release=%release; echo ${release%.*}) +%else +# We don't have build numbers internally +%define source_rel %release +%endif + +Name: kernel-syms-rt +Summary: Dummy summary +Version: 2.6.27.4 +Release: <RELEASE> +License: GPL +Group: Development/Sources +AutoReqProv: off +BuildRequires: coreutils +%if ! 0%{?opensuse_bs} +BuildRequires: kernel-dummy +%endif +ExclusiveArch: %ix86 x86_64 +%ifarch %ix86 +BuildRequires: kernel-rt kernel-rt_debug +%else +%ifarch x86_64 +BuildRequires: kernel-rt kernel-rt_debug +%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 = 2.6.27.4-%source_rel +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 %_sourcedir/extra-symbols ] && cat %_sourcedir/extra-symbols) ; echo $*) + +%description +Dummy description. + +%prep + +echo "Architecture symbol(s):" %symbols + +%install +rm -rf $RPM_BUILD_ROOT +mkdir $RPM_BUILD_ROOT + +set -- %symbols +case kernel-syms-rt in +(*-rt) + set -- RT "$@" + ;; +esac +%_sourcedir/guards "$@" < %_sourcedir/series.conf > %_builddir/kernel-syms-rt.patches +for config in $(%_sourcedir/guards %symbols < %_sourcedir/config.conf) ; do + arch="${config%%/*}" + flavor="${config#*/}" + + rpm -q --quiet kernel-$flavor || continue + + # Don't add the build infrastructure for kernels that are based + # on a different set of patches. + set -- kernel-$flavor $flavor $(case $flavor in (rt|rt_*) echo RT ;; esac) + %_sourcedir/guards $* %symbols < %_sourcedir/series.conf \ + > %_builddir/kernel-$flavor.patches + diff -q %_builddir/{kernel-syms-rt,kernel-$flavor}.patches || continue + + # Make sure that all the kernel-$flavor release numbers match the + # kernel-syms release number. + set -- %release $(rpm -q --qf '%{RELEASE}' kernel-$flavor) +%if 0%{?opensuse_bs} + set -- ${1%.*} ${2%.*} +%endif + if [ "$1" != "$2" ]; then + echo "Release numbers $1 and $2 do not match" >&2 + exit 1 + fi + + shopt -s nullglob + for symvers in /usr/src/linux-*-obj/$arch/$flavor/Module.symvers; do + cp -p --parents $symvers $RPM_BUILD_ROOT/ + for file in /lib/modules/*-$flavor/modules.alias; do + cp -p $file $(dirname $RPM_BUILD_ROOT$symvers) + done + done + for symsets in /boot/symsets-*-$flavor.tar.gz; do + cp -p --parents $symsets $RPM_BUILD_ROOT/ + done + for file in /lib/modules/*-$flavor/build; do + cp -pd --parents $file $RPM_BUILD_ROOT/ + done +done + +%files +%defattr(-, root, root) +/usr/src/linux-*-obj +/boot/symsets-*-*.tar.gz +/lib/modules/*/build