* Set compiler build dependencies from config informations.
* Install debian/lib into headers-all package. * Unlink version file before writing to them. * debian/README: Remove outdated information. r5275: waldi | 2006-01-05 14:00:15 +0100 * debian/lib/python/debian_linux/debian.py: Move package class from utils. * debian/lib/python/debian_linux/utils.py: Use package class from debian. r5277: waldi | 2006-01-05 14:41:45 +0100 * debian/lib/python/debian_linux/debian.py - Add package_relation, package_relation_list and package_relation_group classes. - Use them in the package class. * debian/lib/python/debian_linux/gencontrol.py - Support new relation classes. r5278: waldi | 2006-01-05 14:46:55 +0100 debian/bin/gencontrol.py: Use relation objects for tree entry. r5279: waldi | 2006-01-05 15:20:00 +0100 * debian/bin/gencontrol.py: Don't fail if some relation fields are empty. * debian/lib/python/debian_linux/debian.py: Merge relation entries. r5280: waldi | 2006-01-05 15:24:08 +0100 * debian/arch/defines, debian/arch/hppa/defines: Set relations for compiler. * debian/lib/python/debian_linux/gencontrol.py: Set compiler build dependencies from config informations. * debian/templates/control.source.in: Remove compiler from Build-Depends. r5281: waldi | 2006-01-05 15:39:45 +0100 * debian/rules.real - Install debian/lib into headers-all package. - Call dh_python with python version 2.4. * debian/templates/control.source.in: Add python to build-depends, needed by dh_python. r5282: waldi | 2006-01-05 16:36:33 +0100 debian/rules.real - Remove outdated comment about include_common_config. - Remove support for headers_dirs. r5283: waldi | 2006-01-05 16:38:05 +0100 debian/arch/amd64/Makefile.inc, debian/arch/arm/Makefile.inc, debian/arch/hppa/Makefile.inc, debian/arch/powerpc/Makefile.inc, debian/arch/sparc/Makefile.inc: Remove not longer supported variables. r5284: waldi | 2006-01-05 16:42:33 +0100 debian/lib/python/debian_linux/gencontrol.py: Warn if the class setting is not available. r5287: waldi | 2006-01-05 19:07:05 +0100 debian/arch/powerpc/defines: Set kernel-arch for all except powerpc64 to ppc. r5288: waldi | 2006-01-05 19:08:35 +0100 debian/lib/python/debian_linux/config.py: Only bail out if a section is not found in any config file. r5294: waldi | 2006-01-05 19:26:57 +0100 debian/lib/python/debian_linux/gencontrol.py - Support config underlay. - Add some small default implementations. r5295: waldi | 2006-01-05 19:39:55 +0100 debian/README: Remove outdated information. r5325: waldi | 2006-01-06 22:40:17 +0100 debian/bin/apply.py - Don't reference the debian_linux module, it is not available. - Unlink version file before writing to them. svn path=/dists/trunk/linux-2.6/; revision=5327
This commit is contained in:
parent
5008990d6c
commit
b37871ac10
|
@ -8,26 +8,13 @@ the machine descriptions for various flavours. For arches with
|
|||
subarches the subdirectory arch/<arch>/<subarch> with the same file
|
||||
structure must be created for each subarch.
|
||||
|
||||
Support for arch/subarch-specific patches
|
||||
-----------------------------------------
|
||||
Patches specific to a particular architecture or subarchitecture and
|
||||
not included into the debian patch set should be placed in the
|
||||
debian/patches-arch subdirectory. Patch must be named <arch>.diff or
|
||||
<subarch>.diff. If such patch is present, it will be automatically
|
||||
applied during the unpacking of the build tree for a particular
|
||||
(sub)architecture. Patches present in the debian/patches-arch will also
|
||||
be included in the kernel-patch-debian package, suitable for building
|
||||
kernels with make-kpkg.
|
||||
|
||||
Config files
|
||||
------------
|
||||
Kernel config files
|
||||
-------------------
|
||||
Configuration files are constructed dynamically by concatenating a number
|
||||
of config files as described below.
|
||||
|
||||
For architecture without subarches:
|
||||
|
||||
Configuration file for kernel-image:
|
||||
|
||||
arch/config
|
||||
arch/<arch>/config
|
||||
arch/<arch>/config.<flavour>
|
||||
|
@ -65,14 +52,7 @@ into the templates:
|
|||
this is unset, it will default to @class@.
|
||||
@desc@ (Potentially) multi-line verbiage that's appended to
|
||||
-image descriptions.
|
||||
@ltver@ linux-tree version, a single digit.
|
||||
@srcver@ Source version, extracted from the changelog.
|
||||
This is normally @version@-@ltver@.
|
||||
@lt_depends@ The Depends field for the linux-tree package.
|
||||
@lt_provides@ The Provides field for the linux-tree package.
|
||||
@abiname@ Current abiname, a single digit.
|
||||
@allheaders@ Given the arch, a list of all the linux-headers packages for the
|
||||
arch - used for kernel-headers-x.y.z-n-arch.
|
||||
|
||||
Normally, the arch-specific contents should be controlled by
|
||||
adjusting the corresponding defines file.
|
||||
|
@ -85,88 +65,9 @@ variables. It may be used to override the standard variables on
|
|||
per-architecture basis and other evil things. So far the valid uses of
|
||||
this file include the setting of the following variables:
|
||||
|
||||
headers_dirs
|
||||
|
||||
This variable is substituted into the headers-install script,
|
||||
controlling which asm-* directories are included into the
|
||||
kernel-headers package. By default it is set to karch (see
|
||||
above). See header-install.in file for detail. Typical usage:
|
||||
|
||||
headers_dirs := sparc | sparc64
|
||||
|
||||
headers_subarch
|
||||
|
||||
The subarch to pass to the --subarch option for the make-kpkg
|
||||
call to build the kernel-headers. Typical usage:
|
||||
|
||||
headers_subarch := sparc64
|
||||
|
||||
build_subarch
|
||||
|
||||
Setting this variable to non-empty value will cause an option
|
||||
--subarch $(build_subarch) added to 'build' and 'kernel-image'
|
||||
make-kpkg calls. If a substring @flavour@ is present in the
|
||||
definition of this variable, it will be expanded to the current
|
||||
flavour during build time. In general, if you wish to add subarch
|
||||
support for your architecture, you should contact kernel-package
|
||||
maintainer to ensure that the flavour name correctly maps onto a
|
||||
kernel subarch name. Typical usage:
|
||||
|
||||
build_subarch := pmac
|
||||
|
||||
or
|
||||
|
||||
build_subarch := @flavour@
|
||||
|
||||
build_makeflags
|
||||
|
||||
This variable may contain the make flags settings for the
|
||||
make-kpkg invocation in the 'build' target. Currently it is
|
||||
only used by amd64, where it should be set to something like
|
||||
|
||||
build_makeflags := 'CC=amd64-linux-gcc V=1'
|
||||
|
||||
The value of the variable must be properly quoted.
|
||||
|
||||
initrd_modules
|
||||
|
||||
This variable may contain a space-separated list of modules
|
||||
which should be hard-linked into the /lib/modules/<version>/initrd
|
||||
directory, so that they will be included by mkinitrd. Full
|
||||
pathname relative to the /lib/modules/<version> directory should
|
||||
be give, no quoting is necessary. Typical usage:
|
||||
|
||||
initrd_modules := kernel/drivers/video/vesafb.ko kernel/security/capability.ko
|
||||
|
||||
image_postproc
|
||||
|
||||
A command to be run after the kernel image is built. As far as I know,
|
||||
it only required on sparc for stripping of the kernel which is too big
|
||||
to be booted otherwise. Typical use is too ugly to be presented here.
|
||||
|
||||
image_prefix_flavours
|
||||
image_prefix
|
||||
|
||||
These variables allow to prepend the 'make-kpkg kernel_image' call with
|
||||
an arbitrary prefix for selected flavours. Some architectures have a
|
||||
32- and 64-bit versions. If kernels are built on the 64-bit hardware, then
|
||||
building a 32-bit kernel usually requires using a wrapper which sets the
|
||||
correct execution domain (such as sparc32 or linux32). If the variable
|
||||
image_prefix_flavours is non-empty and contains a space-separated list
|
||||
if flavours, then make-kpkg invocation to create a kernel_image target
|
||||
will be prepended with contents of the image_prefix variable. Typical
|
||||
usage:
|
||||
|
||||
image_prefix_flavours := sparc32 sparc32-smp
|
||||
image_prefix := sparc32
|
||||
|
||||
extra_postinstall_command
|
||||
|
||||
This variable, if defined, is executed at the end of the
|
||||
post-install script, which is used by kernel-package to add or
|
||||
modify the files going into the kernel image package.
|
||||
|
||||
It can use these variables (but see templates/post-install.in for
|
||||
details): $(subarch), $(flavour), $(version) and $(abiname). Since
|
||||
Makefile.inc is a Makefile, the leading $ need to be escaped as
|
||||
double $$.
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#
|
||||
# Variables
|
||||
#
|
||||
headers_dirs = x86_64
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#
|
||||
# Variables
|
||||
#
|
||||
include_common_config := no
|
||||
default_config := footbridge
|
||||
|
|
|
@ -28,3 +28,7 @@ available: False
|
|||
yaird: mkinitrd.yaird
|
||||
initramfs-tools: mkinitramfs
|
||||
|
||||
[relations]
|
||||
gcc: gcc (>= 4:4.0)
|
||||
gcc-3.3: gcc-3.3
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
#
|
||||
# Variables
|
||||
#
|
||||
headers_dirs = parisc
|
||||
|
|
|
@ -20,3 +20,6 @@ class: 64-bit PA-RISC
|
|||
[parisc64-smp]
|
||||
class: multi-processor 64-bit PA-RISC
|
||||
|
||||
[relations]
|
||||
gcc: gcc (>= 4:4.0), binutils-hppa64, gcc-4.0-hppa64
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
#
|
||||
# Variables
|
||||
#
|
||||
headers_dirs = ppc | ppc64 | m68k
|
||||
|
|
|
@ -6,7 +6,7 @@ flavours:
|
|||
powerpc-miboot
|
||||
powerpc64
|
||||
kernel-header-dirs: powerpc ppc m68k
|
||||
kernel-arch: powerpc
|
||||
kernel-arch: ppc
|
||||
kpkg-subarch: ppc
|
||||
|
||||
[apus]
|
||||
|
@ -23,3 +23,4 @@ depends: mkvmlinuz (>= 18)
|
|||
|
||||
[powerpc64]
|
||||
kpkg-subarch: powerpc64
|
||||
kernel-arch: powerpc
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
#
|
||||
# Variables
|
||||
#
|
||||
headers_dirs := sparc64
|
||||
image_postproc = strip -R .comment -R .note -K sun4u_init -K _end -K _start arch/$(subst 32,,$(subst -smp,,$*))/boot/image
|
||||
# image_prefix_flavours := sparc32 sparc32-smp
|
||||
# image_prefix := sparc32
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
#!/usr/bin/env python2.4
|
||||
|
||||
import os.path, sys
|
||||
import os, os.path, re, sys
|
||||
from warnings import warn
|
||||
import debian_linux
|
||||
|
||||
_default_home = "@home@"
|
||||
_default_revisions = "@revisions@"
|
||||
|
@ -207,13 +206,33 @@ class version(object):
|
|||
|
||||
def __init__(self, string = None):
|
||||
if string is not None:
|
||||
t = debian_linux.parse_version(string)
|
||||
self.upstream = t['source_upstream']
|
||||
self.revision = t['debian']
|
||||
self.upstream, self.revision = self.parse(string)
|
||||
|
||||
def __str__(self):
|
||||
return "%s-%s" % (self.upstream, self.revision)
|
||||
|
||||
_re = r"""
|
||||
^
|
||||
(
|
||||
(?:
|
||||
\d+\.\d+\.\d+\+
|
||||
)?
|
||||
\d+\.\d+\.\d+
|
||||
(?:
|
||||
-.+?
|
||||
)?
|
||||
)
|
||||
-
|
||||
([^-]+)
|
||||
$
|
||||
"""
|
||||
|
||||
def parse(self, version):
|
||||
match = re.match(self._re, version, re.X)
|
||||
if match is None:
|
||||
raise ValueError
|
||||
return match.groups()
|
||||
|
||||
class version_file(object):
|
||||
_file = 'version.Debian'
|
||||
extra = ()
|
||||
|
@ -252,6 +271,8 @@ class version_file(object):
|
|||
self.extra = tuple(list[1].split('_'))
|
||||
|
||||
def _write(self):
|
||||
if os.path.lexists(self._file):
|
||||
os.unlink(self._file)
|
||||
file(self._file, 'w').write('%s\n' % self)
|
||||
|
||||
def begin(self):
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
import os, os.path, re, sys, textwrap, ConfigParser
|
||||
sys.path.append("debian/lib/python")
|
||||
import debian_linux.gencontrol
|
||||
from debian_linux.debian import *
|
||||
|
||||
class gencontrol(debian_linux.gencontrol.gencontrol):
|
||||
def do_main_packages(self, packages):
|
||||
|
@ -126,7 +127,7 @@ class gencontrol(debian_linux.gencontrol.gencontrol):
|
|||
in_entry['Description'] += "\n.\n" + vars['desc']
|
||||
entry = self.process_package(in_entry, vars)
|
||||
for field in 'Depends', 'Provides', 'Suggests', 'Recommends', 'Conflicts':
|
||||
value = entry.get(field, [])
|
||||
value = entry.get(field, package_relation_list())
|
||||
t = vars.get(field.lower(), [])
|
||||
value.extend(t)
|
||||
entry[field] = value
|
||||
|
@ -141,16 +142,14 @@ class gencontrol(debian_linux.gencontrol.gencontrol):
|
|||
break
|
||||
versions.insert(0, i['Version'])
|
||||
for i in (('Depends', 'Provides')):
|
||||
value = []
|
||||
tmp = entry.get(i, None)
|
||||
if tmp:
|
||||
value.extend([j.strip() for j in tmp.split(',')])
|
||||
value = package_relation_list()
|
||||
value.extend(entry.get(i, []))
|
||||
if i == 'Depends':
|
||||
value.append("linux-patch-debian-%(version)s (= %(source)s)" % self.changelog[0]['Version'])
|
||||
value.append(' | '.join(["linux-source-%(version)s (= %(source)s)" % v for v in versions]))
|
||||
elif i == 'Provides':
|
||||
value.extend(["linux-tree-%(source)s" % v for v in versions])
|
||||
entry[i] = ', '.join(value)
|
||||
entry[i] = value
|
||||
return entry
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
@ -6,7 +6,7 @@ _marker = object()
|
|||
|
||||
class config_reader(dict):
|
||||
"""
|
||||
Read configs in debian/arch and in the overlay directory.
|
||||
Read configs in debian/arch and in the underlay directory.
|
||||
"""
|
||||
|
||||
class schema_item_boolean(object):
|
||||
|
@ -34,8 +34,8 @@ class config_reader(dict):
|
|||
|
||||
config_name = "defines"
|
||||
|
||||
def __init__(self, overlay_dir = None):
|
||||
self._overlay_dir = overlay_dir
|
||||
def __init__(self, underlay = None):
|
||||
self._underlay = underlay
|
||||
self._read_base()
|
||||
|
||||
def __getitem__(self, key):
|
||||
|
@ -43,8 +43,8 @@ class config_reader(dict):
|
|||
|
||||
def _get_files(self, name):
|
||||
ret = []
|
||||
if self._overlay_dir is not None:
|
||||
ret.append(os.path.join(self._overlay_dir, name))
|
||||
if self._underlay is not None:
|
||||
ret.append(os.path.join(self._underlay, name))
|
||||
ret.append(os.path.join('debian/arch', name))
|
||||
return ret
|
||||
|
||||
|
@ -181,21 +181,20 @@ class config_parser(object):
|
|||
def items(self, section, var = {}):
|
||||
ret = {}
|
||||
section = '_'.join(section)
|
||||
exception = None
|
||||
exceptions = []
|
||||
for config in self.configs:
|
||||
try:
|
||||
items = config.items(section)
|
||||
except ConfigParser.NoSectionError, e:
|
||||
exception = e
|
||||
exceptions.append(e)
|
||||
else:
|
||||
for key, value in items:
|
||||
try:
|
||||
value = self.schema[key](value)
|
||||
except KeyError: pass
|
||||
ret[key] = value
|
||||
exception = None
|
||||
if exception is not None:
|
||||
raise exception
|
||||
if len(exceptions) == len(self.configs):
|
||||
raise exceptions[0]
|
||||
return ret
|
||||
|
||||
def sections(self):
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import re, utils
|
||||
import itertools, re, utils
|
||||
|
||||
def read_changelog():
|
||||
r = re.compile(r"""
|
||||
|
@ -81,3 +81,129 @@ $
|
|||
ret['source_upstream'] = ret['upstream']
|
||||
return ret
|
||||
|
||||
class package_relation(object):
|
||||
__slots__ = "name", "version", "arches"
|
||||
|
||||
_re = re.compile(r'^(\S+)(?: \(([^)]+)\))?(?: \[([^]]+)\])?$')
|
||||
|
||||
def __init__(self, value = None):
|
||||
if value is not None:
|
||||
match = self._re.match(value)
|
||||
if match is None:
|
||||
raise RuntimeError, "Can't parse dependency %s" % value
|
||||
match = match.groups()
|
||||
self.name = match[0]
|
||||
self.version = match[1]
|
||||
if match[2] is not None:
|
||||
self.arches = re.split('\s+', match[2])
|
||||
else:
|
||||
self.arches = []
|
||||
else:
|
||||
self.name = None
|
||||
self.version = None
|
||||
self.arches = []
|
||||
|
||||
def __str__(self):
|
||||
ret = [self.name]
|
||||
if self.version is not None:
|
||||
ret.extend([' (', self.version, ')'])
|
||||
if self.arches:
|
||||
ret.extend([' [', ' '.join(self.arches), ']'])
|
||||
return ''.join(ret)
|
||||
|
||||
class package_relation_list(list):
|
||||
def __init__(self, value = None):
|
||||
if isinstance(value, (list, tuple)):
|
||||
self.extend(value)
|
||||
elif value is not None:
|
||||
self.extend(value)
|
||||
|
||||
def __str__(self):
|
||||
return ', '.join([str(i) for i in self])
|
||||
|
||||
def _match(self, value):
|
||||
for i in self:
|
||||
if i._match(value):
|
||||
return i
|
||||
return None
|
||||
|
||||
def extend(self, value):
|
||||
if isinstance(value, basestring):
|
||||
value = [package_relation_group(j.strip()) for j in re.split(',', value.strip())]
|
||||
for i in value:
|
||||
if isinstance(i, basestring):
|
||||
i = package_relation_group(i)
|
||||
j = self._match(i)
|
||||
if j:
|
||||
j._update_arches(i)
|
||||
else:
|
||||
self.append(i)
|
||||
|
||||
class package_relation_group(list):
|
||||
def __init__(self, value = None):
|
||||
if isinstance(value, package_relation_list):
|
||||
self.extend(value)
|
||||
elif value is not None:
|
||||
self._extend(value)
|
||||
|
||||
def __str__(self):
|
||||
return ' | '.join([str(i) for i in self])
|
||||
|
||||
def _extend(self, value):
|
||||
self.extend([package_relation(j.strip()) for j in re.split('\|', value.strip())])
|
||||
|
||||
def _match(self, value):
|
||||
for i, j in itertools.izip(self, value):
|
||||
if i.name != j.name or i.version != j.version:
|
||||
return None
|
||||
return self
|
||||
|
||||
def _update_arches(self, value):
|
||||
for i, j in itertools.izip(self, value):
|
||||
if i.arches:
|
||||
for arch in j.arches:
|
||||
if arch not in i.arches:
|
||||
i.arches.append(arch)
|
||||
|
||||
class package(dict):
|
||||
_fields = utils.sorted_dict((
|
||||
('Package', str),
|
||||
('Source', str),
|
||||
('Architecture', utils.field_list),
|
||||
('Section', str),
|
||||
('Priority', str),
|
||||
('Maintainer', str),
|
||||
('Uploaders', str),
|
||||
('Standards-Version', str),
|
||||
('Build-Depends', package_relation_list),
|
||||
('Build-Depends-Indep', package_relation_list),
|
||||
('Provides', package_relation_list),
|
||||
('Depends', package_relation_list),
|
||||
('Recommends', package_relation_list),
|
||||
('Suggests', package_relation_list),
|
||||
('Replaces', package_relation_list),
|
||||
('Conflicts', package_relation_list),
|
||||
('Description', utils.field_string),
|
||||
))
|
||||
|
||||
def __setitem__(self, key, value):
|
||||
try:
|
||||
value = self._fields[key](value)
|
||||
except KeyError: pass
|
||||
super(package, self).__setitem__(key, value)
|
||||
|
||||
def iterkeys(self):
|
||||
for i in self._fields.iterkeys():
|
||||
if self.has_key(i) and self[i]:
|
||||
yield i
|
||||
|
||||
def iteritems(self):
|
||||
for i in self._fields.iterkeys():
|
||||
if self.has_key(i) and self[i]:
|
||||
yield (i, self[i])
|
||||
|
||||
def itervalues(self):
|
||||
for i in self._fields.iterkeys():
|
||||
if self.has_key(i) and self[i]:
|
||||
yield self[i]
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import warnings
|
||||
from config import *
|
||||
from debian import *
|
||||
from utils import *
|
||||
|
@ -11,9 +12,9 @@ class packages_list(sorted_dict):
|
|||
self[package['Package']] = package
|
||||
|
||||
class gencontrol(object):
|
||||
def __init__(self):
|
||||
def __init__(self, underlay = None):
|
||||
self.changelog = read_changelog()
|
||||
self.config = config_reader()
|
||||
self.config = config_reader(underlay)
|
||||
self.templates = templates()
|
||||
self.version, self.abiname, self.kpkg_abiname, self.changelog_vars = self.process_changelog({})
|
||||
|
||||
|
@ -113,7 +114,8 @@ class gencontrol(object):
|
|||
makefile.append("%s-%s:: %s-%s-real" % (i, arch, i, arch))
|
||||
|
||||
def do_arch_packages(self, packages, makefile, arch, vars, makeflags, extra):
|
||||
pass
|
||||
for i in (('binary-arch', 'build', 'setup',)):
|
||||
makefile.append("%s-%s-real:" % (i, arch))
|
||||
|
||||
def do_arch_packages_post(self, packages, makefile, arch, vars, makeflags, extra):
|
||||
pass
|
||||
|
@ -143,7 +145,8 @@ class gencontrol(object):
|
|||
makefile.append("%s-%s-%s:: %s-%s-%s-real" % (i, arch, subarch, i, arch, subarch))
|
||||
|
||||
def do_subarch_packages(self, packages, makefile, arch, subarch, vars, makeflags, extra):
|
||||
pass
|
||||
for i in (('binary-arch', 'build', 'setup',)):
|
||||
makefile.append("%s-%s-%s-real:" % (i, arch, subarch))
|
||||
|
||||
def do_flavour(self, packages, makefile, arch, subarch, flavour, vars, makeflags, extra):
|
||||
config_entry = self.config['base', arch, subarch, flavour]
|
||||
|
@ -151,17 +154,33 @@ class gencontrol(object):
|
|||
|
||||
vars['flavour'] = flavour
|
||||
if not vars.has_key('class'):
|
||||
warnings.warn('No class entry in config for flavour %s, subarch %s, arch %s' % (flavour, subarch, arch), DeprecationWarning)
|
||||
vars['class'] = '%s-class' % flavour
|
||||
if not vars.has_key('longclass'):
|
||||
vars['longclass'] = vars['class']
|
||||
|
||||
config_base = self.config.merge('base', arch)
|
||||
config_relations = self.config.merge('relations', arch)
|
||||
compiler = config_base.get('compiler', 'gcc')
|
||||
relations_compiler = package_relation_list(config_relations[compiler])
|
||||
for group in relations_compiler:
|
||||
for item in group:
|
||||
item.arches = [arch]
|
||||
packages['source']['Build-Depends'].extend(relations_compiler)
|
||||
|
||||
makeflags['FLAVOUR'] = flavour
|
||||
self.do_flavour_makeflags(makeflags, arch, subarch, flavour)
|
||||
self.do_flavour_makefile(makefile, arch, subarch, flavour, makeflags)
|
||||
self.do_flavour_packages(packages, makefile, arch, subarch, flavour, vars, makeflags, extra)
|
||||
|
||||
def do_flavour_makeflags(self, makeflags, arch, subarch, flavour):
|
||||
pass
|
||||
config_entry = self.config.merge('base', arch, subarch, flavour)
|
||||
for i in (
|
||||
('compiler', 'COMPILER'),
|
||||
('kernel-arch', 'KERNEL_ARCH')
|
||||
):
|
||||
if config_entry.has_key(i[0]):
|
||||
makeflags[i[1]] = config_entry[i[0]]
|
||||
|
||||
def do_flavour_makefile(self, makefile, arch, subarch, flavour, makeflags):
|
||||
for i in ('binary-arch', 'build', 'setup'):
|
||||
|
@ -188,11 +207,17 @@ class gencontrol(object):
|
|||
|
||||
def process_relation(self, key, e, in_e, vars):
|
||||
in_dep = in_e[key]
|
||||
dep = type(in_dep)()
|
||||
for d in in_dep:
|
||||
d = self.substitute(d, vars)
|
||||
if d:
|
||||
dep.append(d)
|
||||
dep = package_relation_list()
|
||||
for in_groups in in_dep:
|
||||
groups = package_relation_group()
|
||||
for in_item in in_groups:
|
||||
item = package_relation()
|
||||
item.name = self.substitute(in_item.name, vars)
|
||||
if in_item.version is not None:
|
||||
item.version = self.substitute(in_item.version, vars)
|
||||
item.arches = in_item.arches
|
||||
groups.append(item)
|
||||
dep.append(groups)
|
||||
e[key] = dep
|
||||
|
||||
def process_description(self, e, in_e, vars):
|
||||
|
@ -207,15 +232,15 @@ class gencontrol(object):
|
|||
|
||||
def process_package(self, in_entry, vars):
|
||||
e = package()
|
||||
for key in in_entry.iterkeys():
|
||||
if key in (('Depends', 'Provides', 'Suggests', 'Recommends', 'Conflicts')):
|
||||
for key, value in in_entry.iteritems():
|
||||
if isinstance(value, package_relation_list):
|
||||
self.process_relation(key, e, in_entry, vars)
|
||||
elif key == 'Description':
|
||||
self.process_description(e, in_entry, vars)
|
||||
elif key[:2] == 'X-':
|
||||
pass
|
||||
else:
|
||||
e[key] = self.substitute(in_entry[key], vars)
|
||||
e[key] = self.substitute(value, vars)
|
||||
return e
|
||||
|
||||
def process_packages(self, in_entries, vars):
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import re, textwrap
|
||||
import debian, re, textwrap
|
||||
|
||||
class _sorted_dict(dict):
|
||||
__slots__ = ('_list')
|
||||
|
@ -77,48 +77,6 @@ class field_string(str):
|
|||
def __str__(self):
|
||||
return '\n '.join(self.split('\n'))
|
||||
|
||||
class package(dict):
|
||||
_fields = sorted_dict((
|
||||
('Package', str),
|
||||
('Source', str),
|
||||
('Architecture', field_list),
|
||||
('Section', str),
|
||||
('Priority', str),
|
||||
('Maintainer', str),
|
||||
('Uploaders', str),
|
||||
('Standards-Version', str),
|
||||
('Build-Depends', str),
|
||||
('Build-Depends-Indep', str),
|
||||
('Provides', field_list_commata),
|
||||
('Depends', field_list_commata),
|
||||
('Recommends', field_list_commata),
|
||||
('Suggests', field_list_commata),
|
||||
('Replaces', field_list_commata),
|
||||
('Conflicts', field_list_commata),
|
||||
('Description', field_string),
|
||||
))
|
||||
|
||||
def __setitem__(self, key, value):
|
||||
try:
|
||||
value = self._fields[key](value)
|
||||
except KeyError: pass
|
||||
super(package, self).__setitem__(key, value)
|
||||
|
||||
def iterkeys(self):
|
||||
for i in self._fields.iterkeys():
|
||||
if self.has_key(i) and self[i]:
|
||||
yield i
|
||||
|
||||
def iteritems(self):
|
||||
for i in self._fields.iterkeys():
|
||||
if self.has_key(i) and self[i]:
|
||||
yield (i, self[i])
|
||||
|
||||
def itervalues(self):
|
||||
for i in self._fields.iterkeys():
|
||||
if self.has_key(i) and self[i]:
|
||||
yield self[i]
|
||||
|
||||
class templates(dict):
|
||||
def __init__(self, dir = None):
|
||||
if dir is None:
|
||||
|
@ -143,7 +101,7 @@ class templates(dict):
|
|||
f = file("%s/%s.in" % (self.dir, filename))
|
||||
|
||||
while True:
|
||||
e = package()
|
||||
e = debian.package()
|
||||
while True:
|
||||
line = f.readline()
|
||||
if not line:
|
||||
|
|
|
@ -61,9 +61,6 @@ ifdef COMPILER
|
|||
setup_makeflags += CC="$$$$(CROSS_COMPILE)$(COMPILER)"
|
||||
endif
|
||||
setup_env += MAKEFLAGS='$(setup_makeflags)'
|
||||
ifndef headers_dirs
|
||||
headers_dirs = $(DEB_HOST_ARCH)
|
||||
endif
|
||||
|
||||
#
|
||||
# Targets
|
||||
|
@ -84,9 +81,6 @@ setup-flavour: $(STAMPS_DIR)/setup-$(ARCH)-$(SUBARCH)-$(FLAVOUR)
|
|||
# the arch-independent config file (arch/config),
|
||||
# arch-specific config file (arch/$(karch)/config),
|
||||
# and subarch specific one (arch/$(karch)/$(subarch)/config).
|
||||
# It is possible to avoid the inclusion of the arch-indep
|
||||
# config file by setting include_common_config = no in the
|
||||
# arch/$(karch)/Makefile.inc.
|
||||
#
|
||||
config_common = debian/arch/config debian/arch/$(ARCH)/config
|
||||
ifneq ($(SUBARCH),none)
|
||||
|
@ -235,10 +229,11 @@ install-headers-all: DH_OPTIONS = -plinux-headers-$(VERSION)
|
|||
install-headers-all:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_install $(DH_OPTIONS) debian/arch '/usr/src/linux-headers-$(VERSION)/debian'
|
||||
echo $(FLAVOURS) >'debian/linux-headers-$(VERSION)/usr/src/linux-headers-$(VERSION)/flavours'
|
||||
dh_install $(DH_OPTIONS) debian/arch '/usr/src/linux-headers-$(VERSION)'
|
||||
dh_install $(DH_OPTIONS) debian/lib '/usr/src/linux-headers-$(VERSION)'
|
||||
dh_installdocs $(DH_OPTIONS)
|
||||
dh_installchangelogs $(DH_OPTIONS)
|
||||
dh_python $(DH_OPTIONS) -V 2.4 /usr/src/linux-headers-$(VERSION)/lib/python
|
||||
$(MAKE) -f debian/rules.real install-base DH_OPTIONS='$(DH_OPTIONS)'
|
||||
|
||||
install-patch: PACKAGE = linux-patch-debian-$(VERSION)
|
||||
|
|
|
@ -4,5 +4,5 @@ Priority: optional
|
|||
Maintainer: Debian Kernel Team <debian-kernel@lists.debian.org>
|
||||
Uploaders: Andres Salomon <dilinger@debian.org>, Bastian Blank <waldi@debian.org>, Simon Horman <horms@debian.org>, Sven Luther <luther@debian.org>, Jonas Smedegaard <dr@jones.dk>, Norbert Tretkowski <nobse@debian.org>, Frederik Schüler <fs@debian.org>
|
||||
Standards-Version: 3.6.1.0
|
||||
Build-Depends: gcc (>= 4:4.0) [!m68k], gcc-3.3 [m68k], binutils-hppa64 [hppa], gcc-4.0-hppa64 [hppa], debhelper (>= 4.1.0), module-init-tools, dpkg-dev (>= 1.10.23), debianutils (>= 1.6), bzip2, sparc-utils [sparc], kernel-package (>= 10.029), ocaml-interp, python2.4-minimal
|
||||
Build-Depends: debhelper (>= 4.1.0), module-init-tools, dpkg-dev (>= 1.10.23), debianutils (>= 1.6), bzip2, sparc-utils [sparc], kernel-package (>= 10.029), ocaml-interp, python, python2.4-minimal
|
||||
Build-Depends-Indep: docbook-utils, gs, transfig, xmlto
|
||||
|
|
Loading…
Reference in New Issue