summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorChris Larson <clarson@kergoth.com>2004-12-07 22:05:47 +0000
committerChris Larson <clarson@kergoth.com>2004-12-07 22:05:47 +0000
commita780643c4b6aa11e1a36965a69df7116477c7b4c (patch)
tree17e81e77bde19931facf9b30fa5b5981df796071 /classes
parent88cce8db7ebf88ab9da2366a2ac21a5a723340b8 (diff)
Merge oe-devel@oe-devel.bkbits.net:packages.bb
into handhelds.org:/home/kergoth/code/packages.bb 2004/12/07 04:58:25-06:00 ti.com!kergoth More updates per the core rename. 2004/12/07 04:46:51-06:00 ti.com!kergoth Update soundtracker per the core rename. 2004/12/07 04:44:14-06:00 ti.com!kergoth Merge 2004/12/07 04:42:38-06:00 ti.com!kergoth Updates per the recent rename of the oe core from 'oe' to 'bitbake'. BKrev: 41b6293b91LRHSxMOt6WnrZVAdLbFw
Diffstat (limited to 'classes')
-rw-r--r--classes/autotools.bbclass (renamed from classes/base_srpm.oeclass)0
-rw-r--r--classes/autotools.oeclass142
-rw-r--r--classes/base.bbclass (renamed from classes/binconfig.oeclass)0
-rw-r--r--classes/base.oeclass734
-rw-r--r--classes/base_srpm.bbclass (renamed from classes/cml1.oeclass)0
-rw-r--r--classes/binconfig.bbclass (renamed from classes/cpan.oeclass)0
-rw-r--r--classes/ccdv.bbclass (renamed from classes/debian.oeclass)0
-rw-r--r--classes/ccdv.oeclass21
-rw-r--r--classes/cml1.bbclass (renamed from classes/distutils.oeclass)0
-rw-r--r--classes/cpan.bbclass (renamed from classes/flow-lossage.oeclass)0
-rw-r--r--classes/cross.bbclass (renamed from classes/gettext.oeclass)0
-rw-r--r--classes/cross.oeclass29
-rw-r--r--classes/debian.bbclass (renamed from classes/kernel-arch.oeclass)0
-rw-r--r--classes/distutils.bbclass (renamed from classes/lib_package.oeclass)0
-rw-r--r--classes/flow-lossage.bbclass (renamed from classes/linux_modules.oeclass)0
-rw-r--r--classes/gconf.bbclass (renamed from classes/nylon-mirrors.oeclass)0
-rw-r--r--classes/gconf.oeclass57
-rw-r--r--classes/gettext.bbclass (renamed from classes/pkg_distribute.oeclass)0
-rw-r--r--classes/gnome.bbclass (renamed from classes/rm_work.oeclass)0
-rw-r--r--classes/gnome.oeclass20
-rw-r--r--classes/gpe.bbclass (renamed from classes/rpm_core.oeclass)0
-rw-r--r--classes/gpe.oeclass15
-rw-r--r--classes/image_ipk.bbclass (renamed from classes/tmake.oeclass)0
-rw-r--r--classes/image_ipk.oeclass72
-rw-r--r--classes/kernel-arch.bbclass0
-rw-r--r--classes/kernel.bbclass0
-rw-r--r--classes/kernel.oeclass312
-rw-r--r--classes/lib_package.bbclass0
-rw-r--r--classes/linux_modules.bbclass0
-rw-r--r--classes/module-base.bbclass0
-rw-r--r--classes/module-base.oeclass16
-rw-r--r--classes/module.bbclass0
-rw-r--r--classes/module.oeclass22
-rw-r--r--classes/module_strip.bbclass0
-rw-r--r--classes/module_strip.oeclass18
-rw-r--r--classes/native.bbclass0
-rw-r--r--classes/native.oeclass42
-rw-r--r--classes/nslu2_flashimg.bbclass0
-rw-r--r--classes/nslu2_flashimg.oeclass23
-rw-r--r--classes/nylon-mirrors.bbclass0
-rw-r--r--classes/oebuildstamp.bbclass0
-rw-r--r--classes/oebuildstamp.oeclass16
-rw-r--r--classes/oelint.bbclass0
-rw-r--r--classes/oelint.oeclass174
-rw-r--r--classes/opie.bbclass0
-rw-r--r--classes/opie.oeclass94
-rw-r--r--classes/opie_i18n.bbclass0
-rw-r--r--classes/opie_i18n.oeclass163
-rw-r--r--classes/package.bbclass0
-rw-r--r--classes/package.oeclass570
-rw-r--r--classes/package_ipk.bbclass0
-rw-r--r--classes/package_ipk.oeclass224
-rw-r--r--classes/package_rpm.bbclass0
-rw-r--r--classes/package_rpm.oeclass135
-rw-r--r--classes/package_tar.bbclass0
-rw-r--r--classes/package_tar.oeclass100
-rw-r--r--classes/palmtop.bbclass0
-rw-r--r--classes/palmtop.oeclass10
-rw-r--r--classes/pkg_distribute.bbclass0
-rw-r--r--classes/pkgconfig.bbclass0
-rw-r--r--classes/pkgconfig.oeclass28
-rw-r--r--classes/qmake-base.bbclass0
-rw-r--r--classes/qmake-base.oeclass42
-rw-r--r--classes/qmake.bbclass0
-rw-r--r--classes/qmake.oeclass57
-rw-r--r--classes/qt3x11.bbclass0
-rw-r--r--classes/qt3x11.oeclass11
-rw-r--r--classes/rm_work.bbclass0
-rw-r--r--classes/rootfs_ipk.bbclass0
-rw-r--r--classes/rootfs_ipk.oeclass90
-rw-r--r--classes/rpm_core.bbclass0
-rw-r--r--classes/sdk.bbclass0
-rw-r--r--classes/sdk.oeclass22
-rw-r--r--classes/sip.bbclass0
-rw-r--r--classes/sip.oeclass53
-rw-r--r--classes/split_ipk_feeds.bbclass0
-rw-r--r--classes/split_ipk_feeds.oeclass58
-rw-r--r--classes/src_distribute.bbclass0
-rw-r--r--classes/src_distribute.oeclass41
-rw-r--r--classes/src_distribute_local.bbclass0
-rw-r--r--classes/src_distribute_local.oeclass31
-rw-r--r--classes/tmake.bbclass0
-rw-r--r--classes/update-alternatives.bbclass0
-rw-r--r--classes/update-alternatives.oeclass33
-rw-r--r--classes/update-rc.d.bbclass0
-rw-r--r--classes/update-rc.d.oeclass47
-rw-r--r--classes/xfce.bbclass0
-rw-r--r--classes/xfce.oeclass15
88 files changed, 0 insertions, 3537 deletions
diff --git a/classes/base_srpm.oeclass b/classes/autotools.bbclass
index e69de29bb2..e69de29bb2 100644
--- a/classes/base_srpm.oeclass
+++ b/classes/autotools.bbclass
diff --git a/classes/autotools.oeclass b/classes/autotools.oeclass
deleted file mode 100644
index 86a7f208eb..0000000000
--- a/classes/autotools.oeclass
+++ /dev/null
@@ -1,142 +0,0 @@
-inherit base
-
-def autotools_dep_prepend(d):
- import oe;
- pn = oe.data.getVar('PN', d, 1)
- deps = ''
-
- if pn in ['autoconf-native', 'automake-native']:
- return deps
- deps += 'autoconf-native automake-native '
-
- if not pn in ['libtool', 'libtool-native', 'libtool-cross']:
- deps += 'libtool-native '
-
- return deps + 'gnu-config-native '
-
-EXTRA_OEMAKE = ""
-DEPENDS_prepend = "${@autotools_dep_prepend(d)}"
-acpaths = "default"
-EXTRA_AUTORECONF = "--exclude=autopoint"
-
-def autotools_set_crosscompiling(d):
- import oe
- if not oe.data.inherits_class('native', d):
- return " cross_compiling=yes"
- return ""
-
-# EXTRA_OECONF_append = "${@autotools_set_crosscompiling(d)}"
-
-oe_runconf () {
- if [ -x ${S}/configure ] ; then
- cfgcmd="${S}/configure \
- --build=${BUILD_SYS} \
- --host=${HOST_SYS} \
- --target=${TARGET_SYS} \
- --prefix=${prefix} \
- --exec_prefix=${exec_prefix} \
- --bindir=${bindir} \
- --sbindir=${sbindir} \
- --libexecdir=${libexecdir} \
- --datadir=${datadir} \
- --sysconfdir=${sysconfdir} \
- --sharedstatedir=${sharedstatedir} \
- --localstatedir=${localstatedir} \
- --libdir=${libdir} \
- --includedir=${includedir} \
- --oldincludedir=${oldincludedir} \
- --infodir=${infodir} \
- --mandir=${mandir} \
- ${EXTRA_OECONF} \
- $@"
- oenote "Running $cfgcmd..."
- $cfgcmd || oefatal "oe_runconf failed"
- else
- oefatal "no configure script found"
- fi
-}
-
-autotools_do_configure() {
- case ${PN} in
- autoconf*)
- ;;
- automake*)
- ;;
- *)
- # WARNING: gross hack follows:
- # An autotools built package generally needs these scripts, however only
- # automake or libtoolize actually install the current versions of them.
- # This is a problem in builds that do not use libtool or automake, in the case
- # where we -need- the latest version of these scripts. e.g. running a build
- # for a package whose autotools are old, on an x86_64 machine, which the old
- # config.sub does not support. Work around this by installing them manually
- # regardless.
- ( for ac in `find ${S} -name configure.in -o -name configure.ac`; do
- rm -f `dirname $ac`/configure
- done )
- if [ -e ${S}/configure.in -o -e ${S}/configure.ac ]; then
- olddir=`pwd`
- cd ${S}
- if [ x"${acpaths}" = xdefault ]; then
- acpaths=
- for i in `find ${S} -maxdepth 2 -name \*.m4|grep -v 'aclocal.m4'| \
- grep -v 'acinclude.m4' | sed -e 's,\(.*/\).*$,\1,'|sort -u`; do
- acpaths="$acpaths -I $i"
- done
- else
- acpaths="${acpaths}"
- fi
- install -d ${STAGING_DIR}/${HOST_SYS}/share/aclocal
- acpaths="$acpaths -I ${STAGING_DIR}/${HOST_SYS}/share/aclocal"
- # autoreconf is too shy to overwrite aclocal.m4 if it doesn't look
- # like it was auto-generated. Work around this by blowing it away
- # by hand, unless the package specifically asked not to run aclocal.
- if ! echo ${EXTRA_AUTORECONF} | grep -q "aclocal"; then
- rm -f aclocal.m4
- fi
- if [ -e configure.in ]; then
- CONFIGURE_AC=configure.in
- else
- CONFIGURE_AC=configure.ac
- fi
- if grep "^AM_GLIB_GNU_GETTEXT" $CONFIGURE_AC >/dev/null; then
- if grep "sed.*POTFILES" configure.ac >/dev/null; then
- : do nothing -- we still have an old unmodified configure.ac
- else
- oenote Executing glib-gettextize --force --copy
- echo "no" | glib-gettextize --force --copy
- fi
- fi
- if grep "^AC_PROG_INTLTOOL" $CONFIGURE_AC >/dev/null; then
- oenote Executing intltoolize --copy --force --automake
- intltoolize --copy --force --automake
- fi
- oenote Executing autoreconf --verbose --install --force ${EXTRA_AUTORECONF} $acpaths
- mkdir -p m4
- autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} $acpaths || oefatal "autoreconf execution failed."
- cd $olddir
- fi
- ;;
- esac
- if [ -e ${S}/configure ]; then
- oe_runconf
- else
- oenote "nothing to configure"
- fi
-}
-
-autotools_do_install() {
- oe_runmake 'DESTDIR=${D}' install
-}
-
-STAGE_TEMP="${WORKDIR}/temp-staging"
-
-autotools_stage_includes() {
- rm -rf ${STAGE_TEMP}
- mkdir -p ${STAGE_TEMP}
- make DESTDIR="${STAGE_TEMP}" install
- cp -a ${STAGE_TEMP}/${includedir}/* ${STAGING_INCDIR}
- rm -rf ${STAGE_TEMP}
-}
-
-EXPORT_FUNCTIONS do_configure do_install
diff --git a/classes/binconfig.oeclass b/classes/base.bbclass
index e69de29bb2..e69de29bb2 100644
--- a/classes/binconfig.oeclass
+++ b/classes/base.bbclass
diff --git a/classes/base.oeclass b/classes/base.oeclass
deleted file mode 100644
index 66136074c7..0000000000
--- a/classes/base.oeclass
+++ /dev/null
@@ -1,734 +0,0 @@
-PATCHES_DIR="${S}"
-
-def base_dep_prepend(d):
- import oe;
- #
- # Ideally this will check a flag so we will operate properly in
- # the case where host == build == target, for now we don't work in
- # that case though.
- #
- deps = ""
- if not oe.data.getVar('INHIBIT_DEFAULT_DEPS', d):
- deps += "patcher-native"
- if (oe.data.getVar('HOST_SYS', d, 1) !=
- oe.data.getVar('BUILD_SYS', d, 1)):
- deps += " virtual/${TARGET_PREFIX}gcc virtual/libc "
- return deps
-
-def base_read_file(filename):
- import oe
- try:
- f = file( filename, "r" )
- except IOError, reason:
- raise oe.build.FuncFailed("can't read from file '%s' (%s)", (filename,reason))
- else:
- return f.read().strip()
- return None
-
-DEPENDS_prepend="${@base_dep_prepend(d)} "
-
-def base_set_filespath(path, d):
- import os, oe
- filespath = []
- for p in path:
- overrides = oe.data.getVar("OVERRIDES", d, 1) or ""
- overrides = overrides + ":"
- for o in overrides.split(":"):
- filespath.append(os.path.join(p, o))
- oe.data.setVar("FILESPATH", ":".join(filespath), d)
-
-FILESPATH = "${@base_set_filespath([ "${FILE_DIRNAME}/${PF}", "${FILE_DIRNAME}/${P}", "${FILE_DIRNAME}/${PN}", "${FILE_DIRNAME}/files", "${FILE_DIRNAME}" ], d)}"
-
-def oe_filter(f, str, d):
- from re import match
- return " ".join(filter(lambda x: match(f, x, 0), str.split()))
-
-def oe_filter_out(f, str, d):
- from re import match
- return " ".join(filter(lambda x: not match(f, x, 0), str.split()))
-
-die() {
- oefatal "$*"
-}
-
-oenote() {
- echo "NOTE:" "$*"
-}
-
-oewarn() {
- echo "WARNING:" "$*"
-}
-
-oefatal() {
- echo "FATAL:" "$*"
- exit 1
-}
-
-oedebug() {
- test $# -ge 2 || {
- echo "Usage: oedebug level \"message\""
- exit 1
- }
-
- test ${OEDEBUG:-0} -ge $1 && {
- shift
- echo "DEBUG:" $*
- }
-}
-
-oe_runmake() {
- if [ x"$MAKE" = x ]; then MAKE=make; fi
- oenote ${MAKE} ${EXTRA_OEMAKE} "$@"
- ${MAKE} ${EXTRA_OEMAKE} "$@" || die "oemake failed"
-}
-
-oe_soinstall() {
- # Purpose: Install shared library file and
- # create the necessary links
- # Example:
- #
- # oe_
- #
- #oenote installing shared library $1 to $2
- #
- libname=`basename $1`
- install -m 755 $1 $2/$libname
- sonamelink=`${HOST_PREFIX}readelf -d $1 |grep 'Library soname:' |sed -e 's/.*\[\(.*\)\].*/\1/'`
- solink=`echo $libname | sed -e 's/\.so\..*/.so/'`
- ln -sf $libname $2/$sonamelink
- ln -sf $libname $2/$solink
-}
-
-oe_libinstall() {
- # Purpose: Install a library, in all its forms
- # Example
- #
- # oe_libinstall libltdl ${STAGING_LIBDIR}/
- # oe_libinstall -C src/libblah libblah ${D}/${libdir}/
- dir=""
- libtool=""
- silent=""
- require_static=""
- require_shared=""
- while [ "$#" -gt 0 ]; do
- case "$1" in
- -C)
- shift
- dir="$1"
- ;;
- -s)
- silent=1
- ;;
- -a)
- require_static=1
- ;;
- -so)
- require_shared=1
- ;;
- -*)
- oefatal "oe_libinstall: unknown option: $1"
- ;;
- *)
- break;
- ;;
- esac
- shift
- done
-
- libname="$1"
- shift
- destpath="$1"
- if [ -z "$destpath" ]; then
- oefatal "oe_libinstall: no destination path specified"
- fi
-
- __runcmd () {
- if [ -z "$silent" ]; then
- echo >&2 "oe_libinstall: $*"
- fi
- $*
- }
-
- if [ -z "$dir" ]; then
- dir=`pwd`
- fi
- if [ -d "$dir/.libs" ]; then
- dir=$dir/.libs
- fi
- olddir=`pwd`
- __runcmd cd $dir
-
- lafile=$libname.la
- if [ -f "$lafile" ]; then
- # libtool archive
- eval `cat $lafile|grep "^library_names="`
- libtool=1
- else
- library_names="$libname.so* $libname.dll.a"
- fi
-
- __runcmd install -d $destpath/
- dota=$libname.a
- if [ -f "$dota" -o -n "$require_static" ]; then
- __runcmd install -m 0644 $dota $destpath/
- fi
- dotlai=$libname.lai
- if [ -f "$dotlai" -o -n "$libtool" ]; then
- __runcmd install -m 0644 $dotlai $destpath/$libname.la
- fi
-
- for name in $library_names; do
- files=`eval echo $name`
- for f in $files; do
- if [ ! -e "$f" ]; then
- if [ -n "$libtool" ]; then
- oefatal "oe_libinstall: $dir/$f not found."
- fi
- elif [ -L "$f" ]; then
- __runcmd cp -P "$f" $destpath/
- elif [ ! -L "$f" ]; then
- libfile="$f"
- __runcmd install -m 0755 $libfile $destpath/
- fi
- done
- done
-
- if [ -z "$libfile" ]; then
- if [ -n "$require_shared" ]; then
- oefatal "oe_libinstall: unable to locate shared library"
- fi
- elif [ -z "$libtool" ]; then
- # special case hack for non-libtool .so.#.#.# links
- baselibfile=`basename "$libfile"`
- if (echo $baselibfile | grep -qE '^lib.*\.so\.[0-9.]*$'); then
- sonamelink=`${HOST_PREFIX}readelf -d $libfile |grep 'Library soname:' |sed -e 's/.*\[\(.*\)\].*/\1/'`
- solink=`echo $baselibfile | sed -e 's/\.so\..*/.so/'`
- if [ -n "$sonamelink" -a x"$baselibfile" != x"$sonamelink" ]; then
- __runcmd ln -sf $baselibfile $destpath/$sonamelink
- fi
- __runcmd ln -sf $baselibfile $destpath/$solink
- fi
- fi
-
- __runcmd cd "$olddir"
-}
-
-oe_machinstall() {
- # Purpose: Install machine dependent files, if available
- # If not available, check if there is a default
- # If no default, just touch the destination
- # Example:
- # $1 $2 $3 $4
- # oe_machinstall -m 0644 fstab ${D}/etc/fstab
- #
- # TODO: Check argument number?
- #
- filename=`basename $3`
- dirname=`dirname $3`
-
- for o in `echo ${OVERRIDES} | tr ':' ' '`; do
- if [ -e $dirname/$o/$filename ]; then
- oenote $dirname/$o/$filename present, installing to $4
- install $1 $2 $dirname/$o/$filename $4
- return
- fi
- done
-# oenote overrides specific file NOT present, trying default=$3...
- if [ -e $3 ]; then
- oenote $3 present, installing to $4
- install $1 $2 $3 $4
- else
- oenote $3 NOT present, touching empty $4
- touch $4
- fi
-}
-
-addtask showdata
-do_showdata[nostamp] = "1"
-python do_showdata() {
- import sys
- # emit variables and shell functions
- oe.data.emit_env(sys.__stdout__, d, True)
- # emit the metadata which isnt valid shell
- for e in d.keys():
- if oe.data.getVarFlag(e, 'python', d):
- sys.__stdout__.write("\npython %s () {\n%s}\n" % (e, oe.data.getVar(e, d, 1)))
-}
-
-addtask listtasks
-do_listtasks[nostamp] = "1"
-python do_listtasks() {
- import sys
- # emit variables and shell functions
- #oe.data.emit_env(sys.__stdout__, d)
- # emit the metadata which isnt valid shell
- for e in d.keys():
- if oe.data.getVarFlag(e, 'task', d):
- sys.__stdout__.write("%s\n" % e)
-}
-
-addtask clean
-do_clean[dirs] = "${TOPDIR}"
-do_clean[nostamp] = "1"
-python base_do_clean() {
- """clear the build and temp directories"""
- dir = oe.data.expand("${WORKDIR}", d)
- if dir == '//': raise oe.build.FuncFailed("wrong DATADIR")
- oe.note("removing " + dir)
- os.system('rm -rf ' + dir)
-
- dir = "%s.*" % oe.data.expand(oe.data.getVar('STAMP', d), d)
- oe.note("removing " + dir)
- os.system('rm -f '+ dir)
-}
-
-addtask mrproper
-do_mrproper[dirs] = "${TOPDIR}"
-do_mrproper[nostamp] = "1"
-python base_do_mrproper() {
- """clear downloaded sources, build and temp directories"""
- dir = oe.data.expand("${DL_DIR}", d)
- if dir == '/': oe.build.FuncFailed("wrong DATADIR")
- oe.debug(2, "removing " + dir)
- os.system('rm -rf ' + dir)
- oe.build.exec_task('do_clean', d)
-}
-
-addtask fetch
-do_fetch[dirs] = "${DL_DIR}"
-do_fetch[nostamp] = "1"
-python base_do_fetch() {
- import sys, copy
-
- localdata = copy.deepcopy(d)
- oe.data.update_data(localdata)
-
- src_uri = oe.data.getVar('SRC_URI', localdata, 1)
- if not src_uri:
- return 1
-
- try:
- oe.fetch.init(src_uri.split())
- except oe.fetch.NoMethodError:
- (type, value, traceback) = sys.exc_info()
- raise oe.build.FuncFailed("No method: %s" % value)
-
- try:
- oe.fetch.go(localdata)
- except oe.fetch.MissingParameterError:
- (type, value, traceback) = sys.exc_info()
- raise oe.build.FuncFailed("Missing parameters: %s" % value)
- except oe.fetch.FetchError:
- (type, value, traceback) = sys.exc_info()
- raise oe.build.FuncFailed("Fetch failed: %s" % value)
-}
-
-def oe_unpack_file(file, data, url = None):
- import oe, os
- if not url:
- url = "file://%s" % file
- dots = file.split(".")
- if dots[-1] in ['gz', 'bz2', 'Z']:
- efile = os.path.join(oe.data.getVar('WORKDIR', data, 1),os.path.basename('.'.join(dots[0:-1])))
- else:
- efile = file
- cmd = None
- if file.endswith('.tar'):
- cmd = 'tar x --no-same-owner -f %s' % file
- elif file.endswith('.tgz') or file.endswith('.tar.gz'):
- cmd = 'tar xz --no-same-owner -f %s' % file
- elif file.endswith('.tbz') or file.endswith('.tar.bz2'):
- cmd = 'bzip2 -dc %s | tar x --no-same-owner -f -' % file
- elif file.endswith('.gz') or file.endswith('.Z') or file.endswith('.z'):
- cmd = 'gzip -dc %s > %s' % (file, efile)
- elif file.endswith('.bz2'):
- cmd = 'bzip2 -dc %s > %s' % (file, efile)
- elif file.endswith('.zip'):
- cmd = 'unzip -q %s' % file
- elif os.path.isdir(file):
- filesdir = os.path.realpath(oe.data.getVar("FILESDIR", data, 1))
- destdir = "."
- if file[0:len(filesdir)] == filesdir:
- destdir = file[len(filesdir):file.rfind('/')]
- destdir = destdir.strip('/')
- if len(destdir) < 1:
- destdir = "."
- elif not os.access("%s/%s" % (os.getcwd(), destdir), os.F_OK):
- os.makedirs("%s/%s" % (os.getcwd(), destdir))
- cmd = 'cp -a %s %s/%s/' % (file, os.getcwd(), destdir)
- else:
- (type, host, path, user, pswd, parm) = oe.decodeurl(url)
- if not 'patch' in parm:
- destdir = oe.decodeurl(url)[1] or "."
- oe.mkdirhier("%s/%s" % (os.getcwd(), destdir))
- cmd = 'cp %s %s/%s/' % (file, os.getcwd(), destdir)
- if not cmd:
- return True
- cmd = "PATH=\"%s\" %s" % (oe.data.getVar('PATH', data, 1), cmd)
- oe.note("Unpacking %s to %s/" % (file, os.getcwd()))
- ret = os.system(cmd)
- return ret == 0
-
-addtask unpack after do_fetch
-do_unpack[dirs] = "${WORKDIR}"
-python base_do_unpack() {
- import re, copy, os
-
- localdata = copy.deepcopy(d)
- oe.data.update_data(localdata)
-
- src_uri = oe.data.getVar('SRC_URI', localdata)
- if not src_uri:
- return
- src_uri = oe.data.expand(src_uri, localdata)
- for url in src_uri.split():
- try:
- local = oe.data.expand(oe.fetch.localpath(url, localdata), localdata)
- except oe.MalformedUrl, e:
- raise FuncFailed('Unable to generate local path for malformed uri: %s' % e)
- # dont need any parameters for extraction, strip them off
- local = re.sub(';.*$', '', local)
- local = os.path.realpath(local)
- ret = oe_unpack_file(local, localdata, url)
- if not ret:
- raise oe.build.FuncFailed()
-}
-
-addtask patch after do_unpack
-do_patch[dirs] = "${WORKDIR}"
-python base_do_patch() {
- import re
-
- src_uri = oe.data.getVar('SRC_URI', d)
- if not src_uri:
- return
- src_uri = oe.data.expand(src_uri, d)
- for url in src_uri.split():
-# oe.note('url is %s' % url)
- (type, host, path, user, pswd, parm) = oe.decodeurl(url)
- if not "patch" in parm:
- continue
- from oe.fetch import init, localpath
- init([url])
- url = oe.encodeurl((type, host, path, user, pswd, []))
- local = '/' + localpath(url, d)
- # patch!
- dots = local.split(".")
- if dots[-1] in ['gz', 'bz2', 'Z']:
- efile = os.path.join(oe.data.getVar('WORKDIR', d),os.path.basename('.'.join(dots[0:-1])))
- else:
- efile = local
- efile = oe.data.expand(efile, d)
- patches_dir = oe.data.expand(oe.data.getVar('PATCHES_DIR', d), d)
- oe.mkdirhier(patches_dir + "/.patches")
- os.chdir(patches_dir)
- cmd = "PATH=\"%s\" patcher" % oe.data.getVar("PATH", d, 1)
- if "pnum" in parm:
- cmd += " -p %s" % parm["pnum"]
- # Getting rid of // at the front helps the Cygwin-Users of OE
- if efile.startswith('//'):
- efile = efile[1:]
- cmd += " -R -n \"%s\" -i %s" % (os.path.basename(efile), efile)
- ret = os.system(cmd)
- if ret != 0:
- raise oe.build.FuncFailed("'patcher' execution failed")
-}
-
-
-addhandler base_eventhandler
-python base_eventhandler() {
- from oe import note, error, data
- from oe.event import Handled, NotHandled, getName
- import os
-
- name = getName(e)
- if name in ["PkgSucceeded"]:
- note("package %s: build completed" % e.pkg)
- if name in ["PkgStarted"]:
- note("package %s: build %s" % (e.pkg, name[3:].lower()))
- elif name in ["PkgFailed"]:
- error("package %s: build %s" % (e.pkg, name[3:].lower()))
- elif name in ["TaskStarted"]:
- note("package %s: task %s %s" % (data.expand(data.getVar("PF", e.data), e.data), e.task, name[4:].lower()))
- elif name in ["TaskSucceeded"]:
- note("package %s: task %s completed" % (data.expand(data.getVar("PF", e.data), e.data), e.task))
- elif name in ["TaskFailed"]:
- error("package %s: task %s %s" % (data.expand(data.getVar("PF", e.data), e.data), e.task, name[4:].lower()))
- elif name in ["UnsatisfiedDep"]:
- note("package %s: dependency %s %s" % (e.pkg, e.dep, name[:-3].lower()))
- elif name in ["BuildStarted", "BuildCompleted"]:
- note("build %s %s" % (e.name, name[5:].lower()))
- return NotHandled
-}
-
-addtask configure after do_unpack do_patch
-do_configure[dirs] = "${S} ${B}"
-
-base_do_configure() {
- :
-}
-
-addtask compile after do_configure
-do_compile[dirs] = "${S} ${B}"
-base_do_compile() {
- if [ -e Makefile -o -e makefile ]; then
- oe_runmake || die "make failed"
- else
- oenote "nothing to compile"
- fi
-}
-
-
-addtask stage after do_compile
-base_do_stage () {
- :
-}
-
-do_populate_staging[dirs] = "${STAGING_DIR}/${TARGET_SYS}/bin ${STAGING_DIR}/${TARGET_SYS}/lib \
- ${STAGING_DIR}/${TARGET_SYS}/include \
- ${STAGING_DIR}/${BUILD_SYS}/bin ${STAGING_DIR}/${BUILD_SYS}/lib \
- ${STAGING_DIR}/${BUILD_SYS}/include \
- ${STAGING_DATADIR} \
- ${S} ${B}"
-
-addtask populate_staging after do_compile
-
-#python do_populate_staging () {
-# if not oe.data.getVar('manifest', d):
-# oe.build.exec_func('do_emit_manifest', d)
-# if oe.data.getVar('do_stage', d):
-# oe.build.exec_func('do_stage', d)
-# else:
-# oe.build.exec_func('manifest_do_populate_staging', d)
-#}
-
-python do_populate_staging () {
- if oe.data.getVar('manifest_do_populate_staging', d):
- oe.build.exec_func('manifest_do_populate_staging', d)
- else:
- oe.build.exec_func('do_stage', d)
-}
-
-#addtask install
-addtask install after do_compile
-do_install[dirs] = "${S} ${B}"
-
-base_do_install() {
- :
-}
-
-#addtask populate_pkgs after do_compile
-#python do_populate_pkgs () {
-# if not oe.data.getVar('manifest', d):
-# oe.build.exec_func('do_emit_manifest', d)
-# oe.build.exec_func('manifest_do_populate_pkgs', d)
-# oe.build.exec_func('package_do_shlibs', d)
-#}
-
-base_do_package() {
- :
-}
-
-addtask build after do_populate_staging
-do_build = ""
-do_build[nostamp] = "1"
-do_build[func] = "1"
-
-# Functions that update metadata based on files outputted
-# during the build process.
-
-SHLIBS = ""
-RDEPENDS_prepend = " ${SHLIBS}"
-
-python read_manifest () {
- import sys
- mfn = oe.data.getVar("MANIFEST", d, 1)
- if os.access(mfn, os.R_OK):
- # we have a manifest, so emit do_stage and do_populate_pkgs,
- # and stuff some additional bits of data into the metadata store
- mfile = file(mfn, "r")
- manifest = oe.manifest.parse(mfile, d)
- if not manifest:
- return
-
- oe.data.setVar('manifest', manifest, d)
-}
-
-python parse_manifest () {
- manifest = oe.data.getVar("manifest", d)
- if not manifest:
- return
- for func in ("do_populate_staging", "do_populate_pkgs"):
- value = oe.manifest.emit(func, manifest, d)
- if value:
- oe.data.setVar("manifest_" + func, value, d)
- oe.data.delVarFlag("manifest_" + func, "python", d)
- oe.data.delVarFlag("manifest_" + func, "fakeroot", d)
- oe.data.setVarFlag("manifest_" + func, "func", 1, d)
- packages = []
- for l in manifest:
- if "pkg" in l and l["pkg"] is not None:
- packages.append(l["pkg"])
- oe.data.setVar("PACKAGES", " ".join(packages), d)
-}
-
-def explode_deps(s):
- r = []
- l = s.split()
- flag = False
- for i in l:
- if i[0] == '(':
- flag = True
- j = []
- if flag:
- j.append(i)
- if i.endswith(')'):
- flag = False
- r[-1] += ' ' + ' '.join(j)
- else:
- r.append(i)
- return r
-
-python read_shlibdeps () {
- packages = (oe.data.getVar('PACKAGES', d, 1) or "").split()
- for pkg in packages:
- rdepends = explode_deps(oe.data.getVar('RDEPENDS_' + pkg, d, 0) or oe.data.getVar('RDEPENDS', d, 0) or "")
- shlibsfile = oe.data.expand("${WORKDIR}/install/" + pkg + ".shlibdeps", d)
- if os.access(shlibsfile, os.R_OK):
- fd = file(shlibsfile)
- lines = fd.readlines()
- fd.close()
- for l in lines:
- rdepends.append(l.rstrip())
- pcfile = oe.data.expand("${WORKDIR}/install/" + pkg + ".pcdeps", d)
- if os.access(pcfile, os.R_OK):
- fd = file(pcfile)
- lines = fd.readlines()
- fd.close()
- for l in lines:
- rdepends.append(l.rstrip())
- oe.data.setVar('RDEPENDS_' + pkg, " " + " ".join(rdepends), d)
-}
-
-python read_subpackage_metadata () {
- import re
-
- def decode(str):
- import codecs
- c = codecs.getdecoder("string_escape")
- return c(str)[0]
-
- data_file = oe.data.expand("${WORKDIR}/install/${PN}.package", d)
- if os.access(data_file, os.R_OK):
- f = file(data_file, 'r')
- lines = f.readlines()
- f.close()
- r = re.compile("([^:]+):\s*(.*)")
- for l in lines:
- m = r.match(l)
- if m:
- oe.data.setVar(m.group(1), decode(m.group(2)), d)
-}
-
-python __anonymous () {
- import exceptions
- need_host = oe.data.getVar('COMPATIBLE_HOST', d, 1)
- if need_host:
- import re
- this_host = oe.data.getVar('HOST_SYS', d, 1)
- if not re.match(need_host, this_host):
- raise oe.parse.SkipPackage("incompatible with host %s" % this_host)
-
- pn = oe.data.getVar('PN', d, 1)
- cvsdate = oe.data.getVar('CVSDATE_%s' % pn, d, 1)
- if cvsdate != None:
- oe.data.setVar('CVSDATE', cvsdate, d)
-
- try:
- oe.build.exec_func('read_manifest', d)
- oe.build.exec_func('parse_manifest', d)
- oe.build.exec_func('read_shlibdeps', d)
- oe.build.exec_func('read_subpackage_metadata', d)
- except exceptions.KeyboardInterrupt:
- raise
- except Exception, e:
- oe.error("anonymous function: %s" % e)
- pass
-}
-
-python () {
- import oe, os
- mach_arch = oe.data.getVar('MACHINE_ARCH', d, 1)
- old_arch = oe.data.getVar('PACKAGE_ARCH', d, 1)
- if (old_arch == mach_arch):
- # Nothing to do
- return
- paths = []
- for p in [ "${FILE_DIRNAME}/${PF}", "${FILE_DIRNAME}/${P}", "${FILE_DIRNAME}/${PN}", "${FILE_DIRNAME}/files", "${FILE_DIRNAME}" ]:
- paths.append(oe.data.expand(os.path.join(p, mach_arch), d))
- for s in oe.data.getVar('SRC_URI', d, 1).split():
- local = oe.data.expand(oe.fetch.localpath(s, d), d)
- for mp in paths:
- if local.startswith(mp):
-# oe.note("overriding PACKAGE_ARCH from %s to %s" % (old_arch, mach_arch))
- oe.data.setVar('PACKAGE_ARCH', mach_arch, d)
- return
-}
-
-
-addtask emit_manifest
-python do_emit_manifest () {
-# FIXME: emit a manifest here
-# 1) adjust PATH to hit the wrapper scripts
- wrappers = oe.which(oe.data.getVar("OEPATH", d, 1), 'build/install', 0)
- path = (oe.data.getVar('PATH', d, 1) or '').split(':')
- path.insert(0, os.path.dirname(wrappers))
- oe.data.setVar('PATH', ':'.join(path), d)
-# 2) exec_func("do_install", d)
- oe.build.exec_func('do_install', d)
-# 3) read in data collected by the wrappers
- oe.build.exec_func('read_manifest', d)
-# 4) mangle the manifest we just generated, get paths back into
-# our variable form
-# 5) write it back out
-# 6) re-parse it to ensure the generated functions are proper
- oe.build.exec_func('parse_manifest', d)
-}
-
-EXPORT_FUNCTIONS do_clean do_mrproper do_fetch do_unpack do_configure do_compile do_install do_package do_patch do_populate_pkgs do_stage
-
-MIRRORS[func] = "0"
-MIRRORS () {
-${DEBIAN_MIRROR}/main http://snapshot.debian.net/archive/pool
-${DEBIAN_MIRROR} ftp://ftp.de.debian.org/debian/pool
-${DEBIAN_MIRROR} ftp://ftp.au.debian.org/debian/pool
-${DEBIAN_MIRROR} ftp://ftp.cl.debian.org/debian/pool
-${DEBIAN_MIRROR} ftp://ftp.hr.debian.org/debian/pool
-${DEBIAN_MIRROR} ftp://ftp.fi.debian.org/debian/pool
-${DEBIAN_MIRROR} ftp://ftp.hk.debian.org/debian/pool
-${DEBIAN_MIRROR} ftp://ftp.hu.debian.org/debian/pool
-${DEBIAN_MIRROR} ftp://ftp.ie.debian.org/debian/pool
-${DEBIAN_MIRROR} ftp://ftp.it.debian.org/debian/pool
-${DEBIAN_MIRROR} ftp://ftp.jp.debian.org/debian/pool
-${DEBIAN_MIRROR} ftp://ftp.no.debian.org/debian/pool
-${DEBIAN_MIRROR} ftp://ftp.pl.debian.org/debian/pool
-${DEBIAN_MIRROR} ftp://ftp.ro.debian.org/debian/pool
-${DEBIAN_MIRROR} ftp://ftp.si.debian.org/debian/pool
-${DEBIAN_MIRROR} ftp://ftp.es.debian.org/debian/pool
-${DEBIAN_MIRROR} ftp://ftp.se.debian.org/debian/pool
-${DEBIAN_MIRROR} ftp://ftp.tr.debian.org/debian/pool
-${GNU_MIRROR} ftp://mirrors.kernel.org/gnu
-${GNU_MIRROR} ftp://ftp.matrix.com.br/pub/gnu
-${GNU_MIRROR} ftp://ftp.cs.ubc.ca/mirror2/gnu
-${GNU_MIRROR} ftp://sunsite.ust.hk/pub/gnu
-${GNU_MIRROR} ftp://ftp.ayamura.org/pub/gnu
-ftp://ftp.kernel.org/pub http://www.kernel.org/pub
-ftp://ftp.kernel.org/pub ftp://ftp.us.kernel.org/pub
-ftp://ftp.kernel.org/pub ftp://ftp.uk.kernel.org/pub
-ftp://ftp.kernel.org/pub ftp://ftp.hk.kernel.org/pub
-ftp://ftp.kernel.org/pub ftp://ftp.au.kernel.org/pub
-ftp://ftp.kernel.org/pub ftp://ftp.jp.kernel.org/pub
-ftp://.*/.*/ http://treke.net/oe/source/
-http://.*/.*/ http://treke.net/oe/source/
-}
-
diff --git a/classes/cml1.oeclass b/classes/base_srpm.bbclass
index e69de29bb2..e69de29bb2 100644
--- a/classes/cml1.oeclass
+++ b/classes/base_srpm.bbclass
diff --git a/classes/cpan.oeclass b/classes/binconfig.bbclass
index e69de29bb2..e69de29bb2 100644
--- a/classes/cpan.oeclass
+++ b/classes/binconfig.bbclass
diff --git a/classes/debian.oeclass b/classes/ccdv.bbclass
index e69de29bb2..e69de29bb2 100644
--- a/classes/debian.oeclass
+++ b/classes/ccdv.bbclass
diff --git a/classes/ccdv.oeclass b/classes/ccdv.oeclass
deleted file mode 100644
index 24a6cb0892..0000000000
--- a/classes/ccdv.oeclass
+++ /dev/null
@@ -1,21 +0,0 @@
-python () {
- if oe.data.getVar('PN', d, 1) in ['ccdv-native']:
- if not oe.data.getVar('INHIBIT_DEFAULT_DEPS', d, 1):
- oe.data.setVar("DEPENDS", '%s %s' % ("ccdv-native", oe.data.getVar("DEPENDS", d, 1) or ""), d)
- oe.data.setVar("CC", '%s %s' % ("ccdv", oe.data.getVar("CC", d, 1) or ""), d)
- oe.data.setVar("BUILD_CC", '%s %s' % ("ccdv", oe.data.getVar("BUILD_CC", d, 1) or ""), d)
- oe.data.setVar("CCLD", '%s %s' % ("ccdv", oe.data.getVar("CCLD", d, 1) or ""), d)
-}
-
-def quiet_libtool(oe,d):
- deps = (oe.data.getVar('DEPENDS', d, 1) or "").split()
- if 'libtool-cross' in deps:
- return "'LIBTOOL=${STAGING_BINDIR}/${HOST_SYS}-libtool --silent'"
- elif 'libtool-native' in deps:
- return "'LIBTOOL=${B}/${HOST_SYS}-libtool --silent'"
- else:
- return ""
-
-CCDV = "ccdv"
-EXTRA_OEMAKE_append = " ${@quiet_libtool(oe,d)}"
-MAKE += "-s"
diff --git a/classes/distutils.oeclass b/classes/cml1.bbclass
index e69de29bb2..e69de29bb2 100644
--- a/classes/distutils.oeclass
+++ b/classes/cml1.bbclass
diff --git a/classes/flow-lossage.oeclass b/classes/cpan.bbclass
index e69de29bb2..e69de29bb2 100644
--- a/classes/flow-lossage.oeclass
+++ b/classes/cpan.bbclass
diff --git a/classes/gettext.oeclass b/classes/cross.bbclass
index e69de29bb2..e69de29bb2 100644
--- a/classes/gettext.oeclass
+++ b/classes/cross.bbclass
diff --git a/classes/cross.oeclass b/classes/cross.oeclass
deleted file mode 100644
index 6bdc5bf926..0000000000
--- a/classes/cross.oeclass
+++ /dev/null
@@ -1,29 +0,0 @@
-# Cross packages are built indirectly via dependency,
-# no need for them to be a direct target of 'world'
-EXCLUDE_FROM_WORLD = "1"
-
-PACKAGES = ""
-
-HOST_ARCH = "${BUILD_ARCH}"
-HOST_VENDOR = "${BUILD_VENDOR}"
-HOST_OS = "${BUILD_OS}"
-HOST_PREFIX = "${BUILD_PREFIX}"
-HOST_CC_ARCH = "${BUILD_CC_ARCH}"
-
-export CPPFLAGS = "${BUILD_CPPFLAGS}"
-export CFLAGS = "${BUILD_CFLAGS}"
-export CXXFLAGS = "${BUILD_CFLAGS}"
-export LDFLAGS = "${BUILD_LDFLAGS}"
-
-prefix = "${CROSS_DIR}"
-exec_prefix = "${prefix}"
-bindir = "${prefix}/bin"
-sbindir = "${prefix}/bin"
-
-do_stage () {
- oe_runmake install
-}
-
-do_install () {
- :
-}
diff --git a/classes/kernel-arch.oeclass b/classes/debian.bbclass
index e69de29bb2..e69de29bb2 100644
--- a/classes/kernel-arch.oeclass
+++ b/classes/debian.bbclass
diff --git a/classes/lib_package.oeclass b/classes/distutils.bbclass
index e69de29bb2..e69de29bb2 100644
--- a/classes/lib_package.oeclass
+++ b/classes/distutils.bbclass
diff --git a/classes/linux_modules.oeclass b/classes/flow-lossage.bbclass
index e69de29bb2..e69de29bb2 100644
--- a/classes/linux_modules.oeclass
+++ b/classes/flow-lossage.bbclass
diff --git a/classes/nylon-mirrors.oeclass b/classes/gconf.bbclass
index e69de29bb2..e69de29bb2 100644
--- a/classes/nylon-mirrors.oeclass
+++ b/classes/gconf.bbclass
diff --git a/classes/gconf.oeclass b/classes/gconf.oeclass
deleted file mode 100644
index cdf34af899..0000000000
--- a/classes/gconf.oeclass
+++ /dev/null
@@ -1,57 +0,0 @@
-gconf_postinst() {
-if [ "$1" = configure ]; then
- if [ "x$D" != "x" ]; then
- exit 1
- fi
- SCHEMA_LOCATION=/etc/gconf/schemas
- for SCHEMA in ${SCHEMA_FILES}; do
- if [ -e $SCHEMA_LOCATION/$SCHEMA ]; then
- HOME=/root GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` \
- gconftool-2 \
- --makefile-install-rule $SCHEMA_LOCATION/$SCHEMA > /dev/null
- fi
- done
-fi
-}
-
-gconf_prerm() {
-if [ "$1" = remove ] || [ "$1" = upgrade ]; then
- SCHEMA_LOCATION=/etc/gconf/schemas
- for SCHEMA in ${SCHEMA_FILES}; do
- if [ -e $SCHEMA_LOCATION/$SCHEMA ]; then
- HOME=/root GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` \
- gconftool-2 \
- --makefile-uninstall-rule $SCHEMA_LOCATION/$SCHEMA > /dev/null
- fi
- done
-fi
-}
-
-python populate_packages_append () {
- import os.path, re
- packages = oe.data.getVar('PACKAGES', d, 1).split()
- workdir = oe.data.getVar('WORKDIR', d, 1)
-
- for pkg in packages:
- schema_dir = '%s/install/%s/etc/gconf/schemas' % (workdir, pkg)
- schemas = []
- schema_re = re.compile(".*\.schemas$")
- if os.path.exists(schema_dir):
- for f in os.listdir(schema_dir):
- if schema_re.match(f):
- schemas.append(f)
- if schemas != []:
- oe.note("adding gconf postinst and prerm scripts to %s" % pkg)
- oe.data.setVar('SCHEMA_FILES', " ".join(schemas), d)
- postinst = oe.data.getVar('pkg_postinst_%s' % pkg, d, 1) or oe.data.getVar('pkg_postinst', d, 1)
- if not postinst:
- postinst = '#!/bin/sh\n'
- postinst += oe.data.getVar('gconf_postinst', d, 1)
- oe.data.setVar('pkg_postinst_%s' % pkg, postinst, d)
- prerm = oe.data.getVar('pkg_prerm_%s' % pkg, d, 1) or oe.data.getVar('pkg_prerm', d, 1)
- if not prerm:
- prerm = '#!/bin/sh\n'
- prerm += oe.data.getVar('gconf_prerm', d, 1)
- oe.data.setVar('pkg_prerm_%s' % pkg, prerm, d)
-
-}
diff --git a/classes/pkg_distribute.oeclass b/classes/gettext.bbclass
index e69de29bb2..e69de29bb2 100644
--- a/classes/pkg_distribute.oeclass
+++ b/classes/gettext.bbclass
diff --git a/classes/rm_work.oeclass b/classes/gnome.bbclass
index e69de29bb2..e69de29bb2 100644
--- a/classes/rm_work.oeclass
+++ b/classes/gnome.bbclass
diff --git a/classes/gnome.oeclass b/classes/gnome.oeclass
deleted file mode 100644
index 4be151efa2..0000000000
--- a/classes/gnome.oeclass
+++ /dev/null
@@ -1,20 +0,0 @@
-def gnome_verdir(v):
- import re
- m = re.match("([0-9]+)\.([0-9]+)\..*", v)
- return "%s.%s" % (m.group(1), m.group(2))
-
-SECTION = "gnome"
-SRC_URI = "${GNOME_MIRROR}/${PN}/${@gnome_verdir("${PV}")}/${PN}-${PV}.tar.bz2"
-
-DEPENDS += "gnome-common"
-
-FILES_${PN} += "${datadir}/application-registry ${datadir}/mime-info \
- ${datadir}/gnome-2.0"
-
-inherit autotools pkgconfig gconf
-
-EXTRA_AUTORECONF += "-I ${STAGING_DIR}/${HOST_SYS}/share/aclocal/gnome2-macros"
-
-gnome_stage_includes() {
- autotools_stage_includes
-}
diff --git a/classes/rpm_core.oeclass b/classes/gpe.bbclass
index e69de29bb2..e69de29bb2 100644
--- a/classes/rpm_core.oeclass
+++ b/classes/gpe.bbclass
diff --git a/classes/gpe.oeclass b/classes/gpe.oeclass
deleted file mode 100644
index 3b0cd0a001..0000000000
--- a/classes/gpe.oeclass
+++ /dev/null
@@ -1,15 +0,0 @@
-DEPENDS_prepend = "coreutils-native virtual/libintl intltool-native "
-SRC_URI = "${GPE_MIRROR}/${PN}-${PV}.tar.gz"
-FILES_${PN} += "${datadir}/gpe ${datadir}/application-registry"
-
-inherit gettext
-
-gpe_do_compile() {
- oe_runmake PREFIX=${prefix}
-}
-
-gpe_do_install() {
- oe_runmake PREFIX=${prefix} DESTDIR=${D} install
-}
-
-EXPORT_FUNCTIONS do_compile do_install
diff --git a/classes/tmake.oeclass b/classes/image_ipk.bbclass
index e69de29bb2..e69de29bb2 100644
--- a/classes/tmake.oeclass
+++ b/classes/image_ipk.bbclass
diff --git a/classes/image_ipk.oeclass b/classes/image_ipk.oeclass
deleted file mode 100644
index 9d4715321f..0000000000
--- a/classes/image_ipk.oeclass
+++ /dev/null
@@ -1,72 +0,0 @@
-inherit rootfs_ipk
-
-# Images are generally built explicitly, do not need to be part of world.
-EXCLUDE_FROM_WORLD = "1"
-
-USE_DEVFS ?= "0"
-
-DEPENDS += "makedevs-native"
-
-def get_image_deps(d):
- import oe
- str = ""
- for type in (oe.data.getVar('IMAGE_FSTYPES', d, 1) or "").split():
- deps = oe.data.getVar('IMAGE_DEPENDS_%s' % type, d) or ""
- if deps:
- str += " %s" % deps
- return str
-
-DEPENDS += "${@get_image_deps(d)}"
-
-IMAGE_DEVICE_TABLE = "${@oe.which(oe.data.getVar('OEPATH', d, 1), 'files/device_table-minimal.txt')}"
-IMAGE_POSTPROCESS_COMMAND ?= ""
-
-# Must call real_do_rootfs() from inside here, rather than as a separate
-# task, so that we have a single fakeroot context for the whole process.
-fakeroot do_rootfs () {
- set -x
- rm -rf ${IMAGE_ROOTFS}
-
- if [ "${USE_DEVFS}" != "1" ]; then
- mkdir -p ${IMAGE_ROOTFS}/dev
- makedevs -r ${IMAGE_ROOTFS} -D ${IMAGE_DEVICE_TABLE}
- fi
-
- real_do_rootfs
-
- insert_feed_uris
-
- rm ${IMAGE_ROOTFS}/usr/lib/ipkg/lists/oe
-
- ${IMAGE_PREPROCESS_COMMAND}
-
- export TOPDIR=${TOPDIR}
-
- for type in ${IMAGE_FSTYPES}; do
- if test -z "$FAKEROOTKEY"; then
- fakeroot -i ${TMPDIR}/fakedb.image oeimage -t $type -e ${FILE}
- else
- oeimage -n "${IMAGE_NAME}" -t "$type" -e "${FILE}"
- fi
- done
-
- ${IMAGE_POSTPROCESS_COMMAND}
-}
-
-insert_feed_uris () {
-
- echo "Building feeds for [${DISTRO}].."
-
- for line in ${FEED_URIS}
- do
- # strip leading and trailing spaces/tabs, then split into name and uri
- line_clean="`echo "$line"|sed 's/^[ \t]*//;s/[ \t]*$//'`"
- feed_name="`echo "$line_clean" | sed -n 's/\(.*\)##\(.*\)/\1/p'`"
- feed_uri="`echo "$line_clean" | sed -n 's/\(.*\)##\(.*\)/\2/p'`"
-
- echo "Added $feed_name feed with URL $feed_uri"
-
- # insert new feed-sources
- echo "src/gz $feed_name $feed_uri" >> ${IMAGE_ROOTFS}/etc/ipkg/${feed_name}-feed.conf
- done
-}
diff --git a/classes/kernel-arch.bbclass b/classes/kernel-arch.bbclass
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/classes/kernel-arch.bbclass
diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/classes/kernel.bbclass
diff --git a/classes/kernel.oeclass b/classes/kernel.oeclass
deleted file mode 100644
index 9bd089b31b..0000000000
--- a/classes/kernel.oeclass
+++ /dev/null
@@ -1,312 +0,0 @@
-inherit module_strip
-
-PROVIDES += "virtual/kernel"
-DEPENDS += "virtual/${TARGET_PREFIX}depmod virtual/${TARGET_PREFIX}gcc${KERNEL_CCSUFFIX} update-modules"
-
-inherit kernel-arch
-
-export OS = "${TARGET_OS}"
-export CROSS_COMPILE = "${TARGET_PREFIX}"
-KERNEL_IMAGETYPE = "zImage"
-
-KERNEL_PRIORITY = "${@oe.data.getVar('PV',d,1).split('-')[0].split('.')[-1]}"
-
-KERNEL_CCSUFFIX ?= ""
-KERNEL_LDSUFFIX ?= ""
-
-KERNEL_CC = "${CCACHE}${HOST_PREFIX}gcc${KERNEL_CCSUFFIX}"
-KERNEL_LD = "${LD}${KERNEL_LDSUFFIX}"
-
-KERNEL_OUTPUT = "arch/${ARCH}/boot/${KERNEL_IMAGETYPE}"
-KERNEL_IMAGEDEST = "boot"
-
-#
-# configuration
-#
-export CMDLINE_CONSOLE = "console=${@oe.data.getVar("KERNEL_CONSOLE",d,1) or "ttyS0"}"
-
-# parse kernel ABI version out of <linux/version.h>
-def get_kernelversion(p):
- import re
- try:
- f = open(p, 'r')
- except IOError:
- return None
- l = f.readlines()
- f.close()
- r = re.compile("#define UTS_RELEASE \"(.*)\"")
- for s in l:
- m = r.match(s)
- if m:
- return m.group(1)
- return None
-
-KERNEL_VERSION = "${@get_kernelversion('${S}/include/linux/version.h')}"
-
-# kernels are generally machine specific
-PACKAGE_ARCH := "${MACHINE_ARCH}"
-
-kernel_do_compile() {
- unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
- oe_runmake include/linux/version.h CC="${KERNEL_CC}" LD="${KERNEL_LD}"
- oe_runmake dep CC="${KERNEL_CC}" LD="${KERNEL_LD}"
- oe_runmake ${KERNEL_IMAGETYPE} CC="${KERNEL_CC}" LD="${KERNEL_LD}"
- if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
- oe_runmake modules CC="${KERNEL_CC}" LD="${KERNEL_LD}"
- else
- oenote "no modules to compile"
- fi
-}
-
-kernel_do_stage() {
- ASMDIR=`readlink include/asm`
- install -d ${STAGING_KERNEL_DIR}/include/{$ASMDIR,asm-generic,linux,net,pcmcia}
- ln -sf $ASMDIR ${STAGING_KERNEL_DIR}/include/asm
- cp -fR include/linux/* ${STAGING_KERNEL_DIR}/include/linux/
- cp -fR include/$ASMDIR/* ${STAGING_KERNEL_DIR}/include/$ASMDIR/
- cp -fR include/asm-generic/* ${STAGING_KERNEL_DIR}/include/asm-generic/
- cp -fR include/net/* ${STAGING_KERNEL_DIR}/include/net/
- cp -fR include/pcmcia/* ${STAGING_KERNEL_DIR}/include/pcmcia/
- install -m 0644 .config ${STAGING_KERNEL_DIR}/config-${PV}
- ln -sf config-${PV} ${STAGING_KERNEL_DIR}/.config
- ln -sf config-${PV} ${STAGING_KERNEL_DIR}/kernel-config
- echo "${KERNEL_VERSION}" >${STAGING_KERNEL_DIR}/kernel-abiversion
- echo "${S}" >${STAGING_KERNEL_DIR}/kernel-source
- echo "${KERNEL_CCSUFFIX}" >${STAGING_KERNEL_DIR}/kernel-ccsuffix
- echo "${KERNEL_LDSUFFIX}" >${STAGING_KERNEL_DIR}/kernel-ldsuffix
- [ -e Rules.make ] && install -m 0644 Rules.make ${STAGING_KERNEL_DIR}/
- [ -e Makefile ] && install -m 0644 Makefile ${STAGING_KERNEL_DIR}/
-
- # Check if arch/${ARCH}/Makefile exists and install it
- if [ -e arch/${ARCH}/Makefile ]; then
- install -d ${STAGING_KERNEL_DIR}/arch/${ARCH}
- install -m 0644 arch/${ARCH}/Makefile ${STAGING_KERNEL_DIR}/arch/${ARCH}
- fi
- cp -fR scripts ${STAGING_KERNEL_DIR}/
- cp -fR include/config* ${STAGING_KERNEL_DIR}/include/
- install -m 0644 ${KERNEL_OUTPUT} ${STAGING_KERNEL_DIR}/${KERNEL_IMAGETYPE}
- install -m 0644 System.map ${STAGING_KERNEL_DIR}/System.map-${PV}
-}
-
-kernel_do_install() {
- unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
- if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
- oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" modules_install
- else
- oenote "no modules to install"
- fi
-
- install -d ${D}/${KERNEL_IMAGEDEST}
- install -d ${D}/boot
- install -m 0644 ${KERNEL_OUTPUT} ${D}/${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${PV}
- install -m 0644 System.map ${D}/boot/System.map-${PV}
- install -m 0644 .config ${D}/boot/config-${PV}
- install -d ${D}/etc/modutils
-}
-
-kernel_do_configure() {
- yes '' | oe_runmake oldconfig
-}
-
-pkg_postinst_kernel () {
- update-alternatives --install /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE} ${KERNEL_IMAGETYPE} /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${PV} ${KERNEL_PRIORITY} || true
-}
-
-pkg_postrm_kernel () {
- update-alternatives --remove ${KERNEL_IMAGETYPE} /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-${PV} || true
-}
-
-inherit cml1
-
-EXPORT_FUNCTIONS do_compile do_install do_stage do_configure
-
-PACKAGES = "kernel kernel-dev"
-FILES = ""
-FILES_kernel = "/boot/${KERNEL_IMAGETYPE}*"
-FILES_kernel-dev = "/boot/System.map* /boot/config*"
-
-pkg_postinst_modules () {
-if [ -n "$D" ]; then
- ${HOST_PREFIX}depmod -A -b $D -F ${STAGING_KERNEL_DIR}/System.map-${PV} ${KERNEL_VERSION}
-else
- depmod -A
- update-modules || true
-fi
-}
-
-pkg_postrm_modules () {
-update-modules || true
-}
-
-autoload_postinst_fragment() {
-if [ x"$D" = "x" ]; then
- modprobe %s
-fi
-}
-
-# defaults
-module_autoload_ipv6 = "ipv6"
-module_autoload_ipsec = "ipsec"
-module_conf_bluez = "alias net-pf-31 bluez"
-module_conf_l2cap = "alias bt-proto-0 l2cap"
-module_conf_sco = "alias bt-proto-2 sco"
-module_conf_rfcomm = "alias bt-proto-3 rfcomm"
-module_conf_bnep = "alias bt-proto-4 bnep"
-module_conf_hci_uart = "alias tty-ldisc-15 hci_uart"
-
-python populate_packages_prepend () {
- def extract_modinfo(file):
- import os, re
- tmpfile = os.tmpnam()
- cmd = "PATH=\"%s\" %sobjcopy -j .modinfo -O binary %s %s" % (oe.data.getVar("PATH", d, 1), oe.data.getVar("HOST_PREFIX", d, 1) or "", file, tmpfile)
- os.system(cmd)
- f = open(tmpfile)
- l = f.read().split("\000")
- f.close()
- os.unlink(tmpfile)
- exp = re.compile("([^=]+)=(.*)")
- vals = {}
- for i in l:
- m = exp.match(i)
- if not m:
- continue
- vals[m.group(1)] = m.group(2)
- return vals
-
- def parse_depmod():
- import os, re
-
- dvar = oe.data.getVar('D', d, 1)
- if not dvar:
- oe.error("D not defined")
- return
-
- kernelver = oe.data.getVar('PV', d, 1)
- kernelver_stripped = kernelver
- m = re.match('^(.*-hh.*)\..*$', kernelver)
- if m:
- kernelver_stripped = m.group(1)
- path = oe.data.getVar("PATH", d, 1)
- host_prefix = oe.data.getVar("HOST_PREFIX", d, 1) or ""
-
- cmd = "PATH=\"%s\" %sdepmod -n -a -r -b %s -F %s/boot/System.map-%s %s" % (path, host_prefix, dvar, dvar, kernelver, kernelver_stripped)
- f = os.popen(cmd, 'r')
-
- deps = {}
- pattern0 = "^(.*\.o):..*$"
- pattern1 = "^(.*\.o):\t(.*\.o)$"
- pattern2 = "^(.*\.o):\t(.*\.o) \\\$"
- pattern3 = "^\t(.*\.o) \\\$"
- pattern4 = "^\t(.*\.o)$"
-
- line = f.readline()
- while line:
- if not re.match(pattern0, line):
- line = f.readline()
- continue
- m1 = re.match(pattern1, line)
- if m1:
- deps[m1.group(1)] = [m1.group(2)]
- else:
- m2 = re.match(pattern2, line)
- if m2:
- deps[m2.group(1)] = [m2.group(2)]
- line = f.readline()
- m3 = re.match(pattern3, line)
- while m3:
- deps[m2.group(1)].append(m3.group(1))
- line = f.readline()
- m3 = re.match(pattern3, line)
- m4 = re.match(pattern4, line)
- deps[m2.group(1)].append(m4.group(1))
- line = f.readline()
- f.close()
- return deps
-
- def get_dependencies(file, pattern, format):
- file = file.replace(oe.data.getVar('D', d, 1) or '', '', 1)
-
- if module_deps.has_key(file):
- import os.path, re
- dependencies = []
- for i in module_deps[file]:
- m = re.match(pattern, os.path.basename(i))
- if not m:
- continue
- on = legitimize_package_name(m.group(1))
- dependencies.append(format % on)
- return dependencies
- return []
-
- def frob_metadata(file, pkg, pattern, format, basename):
- import re
- vals = extract_modinfo(file)
-
- dvar = oe.data.getVar('D', d, 1)
-
- # If autoloading is requested, output /etc/modutils/<name> and append
- # appropriate modprobe commands to the postinst
- autoload = oe.data.getVar('module_autoload_%s' % basename, d, 1)
- if autoload:
- name = '%s/etc/modutils/%s' % (dvar, basename)
- f = open(name, 'w')
- for m in autoload.split():
- f.write('%s\n' % m)
- f.close()
- postinst = oe.data.getVar('pkg_postinst_%s' % pkg, d, 1)
- if not postinst:
- oe.fatal("pkg_postinst_%s not defined" % pkg)
- postinst += oe.data.getVar('autoload_postinst_fragment', d, 1) % autoload
- oe.data.setVar('pkg_postinst_%s' % pkg, postinst, d)
-
- # Write out any modconf fragment
- modconf = oe.data.getVar('module_conf_%s' % basename, d, 1)
- if modconf:
- name = '%s/etc/modutils/%s.conf' % (dvar, basename)
- f = open(name, 'w')
- f.write("%s\n" % modconf)
- f.close()
-
- files = oe.data.getVar('FILES_%s' % pkg, d, 1)
- files = "%s /etc/modutils/%s /etc/modutils/%s.conf" % (files, basename, basename)
- oe.data.setVar('FILES_%s' % pkg, files, d)
-
- if vals.has_key("description"):
- old_desc = oe.data.getVar('DESCRIPTION_' + pkg, d, 1) or ""
- oe.data.setVar('DESCRIPTION_' + pkg, old_desc + "; " + vals["description"], d)
-
- rdepends_str = oe.data.getVar('RDEPENDS_' + pkg, d, 1)
- if rdepends_str:
- rdepends = rdepends_str.split()
- else:
- rdepends = []
- rdepends.extend(get_dependencies(file, pattern, format))
- oe.data.setVar('RDEPENDS_' + pkg, ' '.join(rdepends), d)
-
- module_deps = parse_depmod()
- module_regex = '^(.*)\.k?o$'
- module_pattern = 'kernel-module-%s'
-
- postinst = oe.data.getVar('pkg_postinst_modules', d, 1)
- postrm = oe.data.getVar('pkg_postrm_modules', d, 1)
- do_split_packages(d, root='/lib/modules', file_regex=module_regex, output_pattern=module_pattern, description='%s kernel module', postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, extra_depends='update-modules')
-
- import re, os
- metapkg = "kernel-modules"
- oe.data.setVar('ALLOW_EMPTY_' + metapkg, "1", d)
- oe.data.setVar('FILES_' + metapkg, "", d)
- blacklist = [ 'kernel-dev', 'kernel-image' ]
- for l in module_deps.values():
- for i in l:
- pkg = module_pattern % legitimize_package_name(re.match(module_regex, os.path.basename(i)).group(1))
- blacklist.append(pkg)
- metapkg_rdepends = []
- packages = oe.data.getVar('PACKAGES', d, 1).split()
- for pkg in packages[1:]:
- if not pkg in blacklist and not pkg in metapkg_rdepends:
- metapkg_rdepends.append(pkg)
- oe.data.setVar('RDEPENDS_' + metapkg, ' '.join(metapkg_rdepends), d)
- oe.data.setVar('DESCRIPTION_' + metapkg, 'Kernel modules meta package', d)
- packages.append(metapkg)
- oe.data.setVar('PACKAGES', ' '.join(packages), d)
-}
diff --git a/classes/lib_package.bbclass b/classes/lib_package.bbclass
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/classes/lib_package.bbclass
diff --git a/classes/linux_modules.bbclass b/classes/linux_modules.bbclass
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/classes/linux_modules.bbclass
diff --git a/classes/module-base.bbclass b/classes/module-base.bbclass
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/classes/module-base.bbclass
diff --git a/classes/module-base.oeclass b/classes/module-base.oeclass
deleted file mode 100644
index 2b8cd34b48..0000000000
--- a/classes/module-base.oeclass
+++ /dev/null
@@ -1,16 +0,0 @@
-inherit module_strip
-
-inherit kernel-arch
-
-export OS = "${TARGET_OS}"
-export CROSS_COMPILE = "${TARGET_PREFIX}"
-
-export KERNEL_VERSION = ${@base_read_file('${STAGING_DIR}/${HOST_SYS}/kernel/kernel-abiversion')}
-export KERNEL_SOURCE = ${@base_read_file('${STAGING_DIR}/${HOST_SYS}/kernel/kernel-source')}
-KERNEL_CCSUFFIX = ${@base_read_file('${STAGING_DIR}/${HOST_SYS}/kernel/kernel-ccsuffix')}
-KERNEL_LDSUFFIX = ${@base_read_file('${STAGING_DIR}/${HOST_SYS}/kernel/kernel-ldsuffix')}
-KERNEL_CC = "${CCACHE}${HOST_PREFIX}gcc${KERNEL_CCSUFFIX}"
-KERNEL_LD = "${LD}${KERNEL_LDSUFFIX}"
-
-# kernel modules are generally machine specific
-PACKAGE_ARCH := "${MACHINE_ARCH}"
diff --git a/classes/module.bbclass b/classes/module.bbclass
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/classes/module.bbclass
diff --git a/classes/module.oeclass b/classes/module.oeclass
deleted file mode 100644
index 669e1f3d18..0000000000
--- a/classes/module.oeclass
+++ /dev/null
@@ -1,22 +0,0 @@
-RDEPENDS += "kernel (${KERNEL_VERSION})"
-DEPENDS += "virtual/kernel"
-
-inherit module-base
-
-module_do_compile() {
- unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
- oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR} \
- KERNEL_SRC=${STAGING_KERNEL_DIR} \
- KERNEL_VERSION=${KERNEL_VERSION} \
- CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
- ${MAKE_TARGETS}
-}
-
-module_do_install() {
- unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
- oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" CC="${KERNEL_CC}" LD="${KERNEL_LD}" modules_install
-}
-
-EXPORT_FUNCTIONS do_compile do_install
-
-FILES_${PN} = "/etc /lib/modules"
diff --git a/classes/module_strip.bbclass b/classes/module_strip.bbclass
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/classes/module_strip.bbclass
diff --git a/classes/module_strip.oeclass b/classes/module_strip.oeclass
deleted file mode 100644
index 85c4cf08e6..0000000000
--- a/classes/module_strip.oeclass
+++ /dev/null
@@ -1,18 +0,0 @@
-#DEPENDS_append = " module-strip"
-
-do_strip_modules () {
- for p in ${PACKAGES}; do
- if test -e ${WORKDIR}/install/$p/lib/modules; then
- modules="`find ${WORKDIR}/install/$p/lib/modules -name \*.o`"
- if [ -n "$modules" ]; then
- ${STRIP} -v -g $modules
-# NM="${CROSS_DIR}/bin/${HOST_PREFIX}nm" OBJCOPY="${CROSS_DIR}/bin/${HOST_PREFIX}objcopy" strip_module $modules
- fi
- fi
- done
-}
-
-python do_package_append () {
- if (oe.data.getVar('INHIBIT_PACKAGE_STRIP', d, 1) != '1'):
- oe.build.exec_func('do_strip_modules', d)
-}
diff --git a/classes/native.bbclass b/classes/native.bbclass
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/classes/native.bbclass
diff --git a/classes/native.oeclass b/classes/native.oeclass
deleted file mode 100644
index 93b2823b42..0000000000
--- a/classes/native.oeclass
+++ /dev/null
@@ -1,42 +0,0 @@
-inherit base
-
-# Native packages are built indirectly via dependency,
-# no need for them to be a direct target of 'world'
-EXCLUDE_FROM_WORLD = "1"
-
-PACKAGES = ""
-
-TARGET_ARCH = "${BUILD_ARCH}"
-TARGET_OS = "${BUILD_OS}"
-TARGET_VENDOR = "${BUILD_VENDOR}"
-TARGET_PREFIX = "${BUILD_PREFIX}"
-TARGET_CC_ARCH = "${BUILD_CC_ARCH}"
-
-HOST_ARCH = "${BUILD_ARCH}"
-HOST_OS = "${BUILD_OS}"
-HOST_VENDOR = "${BUILD_VENDOR}"
-HOST_PREFIX = "${BUILD_PREFIX}"
-HOST_CC_ARCH = "${BUILD_CC_ARCH}"
-
-CPPFLAGS = "${BUILD_CPPFLAGS}"
-CFLAGS = "${BUILD_CFLAGS}"
-CXXFLAGS = "${BUILD_CFLAGS}"
-LDFLAGS = "${BUILD_LDFLAGS}"
-
-prefix = "${STAGING_DIR}/${BUILD_ARCH}-${BUILD_OS}"
-exec_prefix = "${prefix}"
-bindir = "${STAGING_BINDIR}"
-sbindir = "${STAGING_BINDIR}"
-libdir = "${STAGING_LIBDIR}"
-includedir = "${STAGING_INCDIR}"
-oldincludedir = "${includedir}"
-sysconfdir = "${STAGING_DIR}/etc"
-datadir = "${STAGING_DATADIR}"
-
-do_stage () {
- oe_runmake install
-}
-
-do_install () {
- true
-}
diff --git a/classes/nslu2_flashimg.bbclass b/classes/nslu2_flashimg.bbclass
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/classes/nslu2_flashimg.bbclass
diff --git a/classes/nslu2_flashimg.oeclass b/classes/nslu2_flashimg.oeclass
deleted file mode 100644
index b71531a7f8..0000000000
--- a/classes/nslu2_flashimg.oeclass
+++ /dev/null
@@ -1,23 +0,0 @@
-nslu2_pack_image () {
- install -d ${DEPLOY_DIR_IMAGE}/slug
- install -m 0644 ${STAGING_LIBDIR}/nslu2-binaries/Redboot \
- ${STAGING_LIBDIR}/nslu2-binaries/Trailer \
- ${STAGING_LIBDIR}/nslu2-binaries/SysConf \
- ${STAGING_LIBDIR}/nslu2-binaries/switchbox.ext2.gz \
- ${DEPLOY_DIR_IMAGE}/slug/
- install -m 0644 ${DEPLOY_DIR_IMAGE}/zImage-${IMAGE_BASENAME} ${DEPLOY_DIR_IMAGE}/slug/vmlinuz
- if [ "${NSLU2_BUILD_RAMDISK_FIRMWARE}" == "1" ] ; then
- install -m 0644 ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext2.gz ${DEPLOY_DIR_IMAGE}/slug/ramdisk.ext2.gz
- fi
- install -m 0644 ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 ${DEPLOY_DIR_IMAGE}/slug/flashdisk.jffs2
- cd ${DEPLOY_DIR_IMAGE}/slug
- if [ "${NSLU2_BUILD_RAMDISK_FIRMWARE}" == "1" ] ; then
- slugimage -p -r Ramdisk:ramdisk.ext2.gz -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.ramdisk.img
- fi
- slugimage -p -r Ramdisk:switchbox.ext2.gz,Flashdisk:flashdisk.jffs2 -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.flashdisk.img
- rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext2.gz ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2
- rm -rf ${DEPLOY_DIR_IMAGE}/slug
-}
-
-EXTRA_IMAGEDEPENDS += 'slugimage-native nslu2-linksys-firmware nslu2-switchbox-firmware'
-IMAGE_POSTPROCESS_COMMAND += "nslu2_pack_image; "
diff --git a/classes/nylon-mirrors.bbclass b/classes/nylon-mirrors.bbclass
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/classes/nylon-mirrors.bbclass
diff --git a/classes/oebuildstamp.bbclass b/classes/oebuildstamp.bbclass
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/classes/oebuildstamp.bbclass
diff --git a/classes/oebuildstamp.oeclass b/classes/oebuildstamp.oeclass
deleted file mode 100644
index 1de1b95c2e..0000000000
--- a/classes/oebuildstamp.oeclass
+++ /dev/null
@@ -1,16 +0,0 @@
-#
-# Because base.oeclasses set the variable
-#
-# do_fetch[nostamp] = "1"
-# do_build[nostamp] = "1"
-#
-# for every build we're doing oemake calls all of the phases to check if
-# something new is to download. This class unset's this nostamp flag. This
-# makes a package "finished", once it's completely build.
-#
-# This means that the subsequent builds are faster, but when you change the
-# behaviour of the package, e.g. by adding INHERIT="package_ipk", you won't
-# get the ipk file except you delete the build stamp manually or all of them
-# with oebuild clean <oe-file>.
-
-do_build[nostamp] = ""
diff --git a/classes/oelint.bbclass b/classes/oelint.bbclass
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/classes/oelint.bbclass
diff --git a/classes/oelint.oeclass b/classes/oelint.oeclass
deleted file mode 100644
index 75a447c320..0000000000
--- a/classes/oelint.oeclass
+++ /dev/null
@@ -1,174 +0,0 @@
-addtask lint before do_fetch
-do_lint[nostamp] = 1
-python do_lint() {
- def testVar(var, explain=None):
- try:
- s = d[var]
- return s["content"]
- except KeyError:
- oe.error("%s is not set" % var)
- if explain: oe.note(explain)
- return None
-
-
- ##############################
- # Test that DESCRIPTION exists
- #
- testVar("DESCRIPTION")
-
-
- ##############################
- # Test that HOMEPAGE exists
- #
- s = testVar("HOMEPAGE")
- if s=="unknown":
- oe.error("HOMEPAGE is not set")
- elif not s.startswith("http://"):
- oe.error("HOMEPAGE doesn't start with http://")
-
-
-
- ##############################
- # Test for valid LICENSE
- #
- valid_licenses = {
- "GPL-2" : "GPLv2",
- "GPL LGPL FDL" : True,
- "GPL PSF" : True,
- "GPL/QPL" : True,
- "GPL" : True,
- "GPLv2" : True,
- "IBM" : True,
- "LGPL GPL" : True,
- "LGPL" : True,
- "MIT" : True,
- "OSL" : True,
- "Perl" : True,
- "Public Domain" : True,
- "QPL" : "GPL/QPL",
- }
- s = testVar("LICENSE")
- if s=="unknown":
- oe.error("LICENSE is not set")
- elif s.startswith("Vendor"):
- pass
- else:
- try:
- newlic = valid_licenses[s]
- if newlic == False:
- oe.note("LICENSE '%s' is not recommended" % s)
- elif newlic != True:
- oe.note("LICENSE '%s' is not recommended, better use '%s'" % (s, newsect))
- except:
- oe.note("LICENSE '%s' is not recommended" % s)
-
-
- ##############################
- # Test for valid MAINTAINER
- #
- s = testVar("MAINTAINER")
- if s=="OpenEmbedded Team <oe@handhelds.org>":
- oe.error("explicit MAINTAINER is missing, using default")
- elif s and s.find("@") == -1:
- oe.error("You forgot to put an e-mail address into MAINTAINER")
-
-
- ##############################
- # Test for valid SECTION
- #
- # if Correct section: True section name is valid
- # False section name is invalid, no suggestion
- # string section name is invalid, better name suggested
- #
- valid_sections = {
- # Current Section Correct section
- "apps" : True,
- "audio" : True,
- "base" : True,
- "console/games" : True,
- "console/net" : "console/network",
- "console/network" : True,
- "console/utils" : True,
- "devel" : True,
- "developing" : "devel",
- "devel/python" : True,
- "fonts" : True,
- "games" : True,
- "games/libs" : True,
- "gnome/base" : True,
- "gnome/libs" : True,
- "gpe" : True,
- "gpe/libs" : True,
- "gui" : False,
- "libc" : "libs",
- "libs" : True,
- "libs/net" : True,
- "multimedia" : True,
- "net" : "network",
- "NET" : "network",
- "network" : True,
- "opie/applets" : True,
- "opie/applications" : True,
- "opie/base" : True,
- "opie/codecs" : True,
- "opie/decorations" : True,
- "opie/fontfactories" : True,
- "opie/fonts" : True,
- "opie/games" : True,
- "opie/help" : True,
- "opie/inputmethods" : True,
- "opie/libs" : True,
- "opie/multimedia" : True,
- "opie/pim" : True,
- "opie/setting" : "opie/settings",
- "opie/settings" : True,
- "opie/Shell" : False,
- "opie/styles" : True,
- "opie/today" : True,
- "scientific" : True,
- "utils" : True,
- "x11" : True,
- "x11/libs" : True,
- "x11/wm" : True,
- }
- s = testVar("SECTION")
- if s:
- try:
- newsect = valid_sections[s]
- if newsect == False:
- oe.note("SECTION '%s' is not recommended" % s)
- elif newsect != True:
- oe.note("SECTION '%s' is not recommended, better use '%s'" % (s, newsect))
- except:
- oe.note("SECTION '%s' is not recommended" % s)
-
- if not s.islower():
- oe.error("SECTION should only use lower case")
-
-
-
-
- ##############################
- # Test for valid PRIORITY
- #
- valid_priorities = {
- "standard" : True,
- "required" : True,
- "optional" : True,
- "extra" : True,
- }
- s = testVar("PRIORITY")
- if s:
- try:
- newprio = valid_priorities[s]
- if newprio == False:
- oe.note("PRIORITY '%s' is not recommended" % s)
- elif newprio != True:
- oe.note("PRIORITY '%s' is not recommended, better use '%s'" % (s, newprio))
- except:
- oe.note("PRIORITY '%s' is not recommended" % s)
-
- if not s.islower():
- oe.error("PRIORITY should only use lower case")
-
-}
diff --git a/classes/opie.bbclass b/classes/opie.bbclass
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/classes/opie.bbclass
diff --git a/classes/opie.oeclass b/classes/opie.oeclass
deleted file mode 100644
index 5dd22ddefd..0000000000
--- a/classes/opie.oeclass
+++ /dev/null
@@ -1,94 +0,0 @@
-#
-# This oeclass takes care about some of the itchy details of installing parts
-# of Opie applications. Depending on quicklaunch or not, plugin or not, the
-# TARGET is either a shared object, a shared object with a link to quicklauncher,
-# or a usual binary.
-#
-# You have to provide two things: 1.) A proper SECTION field, and 2.) a proper APPNAME
-# Then opie.oeclass will:
-# * create the directory for the binary and install the binary file(s)
-# * for applications: create the directory for the .desktop and install the .desktop file
-# * for quicklauncher applications: create the startup symlink to the quicklauncher
-# You can override the automatic detection of APPTYPE, valid values are 'quicklaunch', 'binary', 'plugin'
-# You can override the default location of APPDESKTOP (<workdir>/apps/<section>/)
-#
-
-inherit palmtop
-
-DEPENDS_prepend = "${@["libopie2 ", ""][(oe.data.getVar('PN', d, 1) == 'libopie2')]}"
-
-# to be consistent, put all targets into workdir
-EXTRA_QMAKEVARS_POST_append = " DESTDIR=${S}"
-
-# plan for later:
-# add common scopes for opie applications, see qmake-native/common.pro
-# qmake should care about all the details then. qmake can do that, i know it :)
-#
-
-python opie_do_opie_install() {
- import os, shutil
- section = oe.data.getVar( "SECTION", d ).split( '/' )[1] or "Applications"
- section = section.title()
- if section in ( "Base", "Libs" ):
- oe.note( "Section = Base or Libs. Target won't be installed automatically." )
- return
-
- # SECTION : BINDIR DESKTOPDIR
- dirmap = { "Applets" : ( "/plugins/applets", None ),
- "Applications" : ( "<BINDIR>", "/apps/Applications" ),
- "Multimedia" : ( "<BINDIR>", "/apps/Applications" ),
- "Games" : ( "<BINDIR>", "/apps/Games" ),
- "Settings" : ( "<BINDIR>", "/apps/Settings" ),
- "Pim" : ( "<BINDIR>", "/apps/1Pim" ),
- "Examples" : ( "<BINDIR>", "/apps/Examples" ),
- "Shell" : ( "/bin", "/apps/Opie-SH" ),
- "Codecs" : ( "/plugins/codecs", None ),
- "Decorations" : ( "/plugins/decorations", None ),
- "Inputmethods" : ( "/plugins/inputmethods", None ),
- "Fontfactories" : ( "/plugins/fontfactories", None ),
- "Styles" : ( "/plugins/styles", None ),
- "Today" : ( "/plugins/today", None ),
- "Networksettings" : ( "/plugins/networksettings", None ) }
-
- if section not in dirmap:
- raise ValueError, "Unknown section '%s'. Valid sections are: %s" % ( section, dirmap.keys() )
-
- bindir, desktopdir = dirmap[section]
- APPNAME = oe.data.getVar( "APPNAME", d, True ) or oe.data.getVar( "PN", d, True )
- APPTYPE = oe.data.getVar( "APPTYPE", d, True )
- if not APPTYPE:
- if bindir == "<BINDIR>":
- APPTYPE = "quicklaunch"
- else:
- APPTYPE = "plugin"
-
- appmap = { "binary":"/bin", "quicklaunch":"/plugins/application" }
- if bindir == "<BINDIR>": bindir = appmap[APPTYPE]
-
- oe.note( "Section='%s', bindir='%s', desktopdir='%s', name='%s', type='%s'" %
- ( section, bindir, desktopdir, APPNAME, APPTYPE ) )
-
- S = oe.data.getVar( "S", d, 1 )
- D = "%s/image" % oe.data.getVar( "WORKDIR", d, True )
- WORKDIR = oe.data.getVar( "WORKDIR", d, True )
- palmtopdir = oe.data.getVar( "palmtopdir", d )
- APPDESKTOP = oe.data.getVar( "APPDESKTOP", d, True ) or "%s/%s" % ( WORKDIR, desktopdir )
-
- if desktopdir is not None:
- os.system( "install -d %s%s%s/" % ( D, palmtopdir, desktopdir ) )
- os.system( "install -m 0644 %s/%s.desktop %s%s%s/" % ( APPDESKTOP, APPNAME, D, palmtopdir, desktopdir ) )
-
- os.system( "install -d %s%s%s/" % ( D, palmtopdir, bindir ) )
-
- if APPTYPE == "binary":
- os.system( "install -m 0755 %s/%s %s%s%s/" % ( S, APPNAME, D, palmtopdir, bindir ) )
- elif APPTYPE == "quicklaunch":
- os.system( "install -m 0755 %s/lib%s.so %s%s%s/" % ( S, APPNAME, D, palmtopdir, bindir ) )
- os.system( "install -d %s%s/bin/" % ( D, palmtopdir ) )
- os.system( "ln -sf %s/bin/quicklauncher %s%s/bin/%s" % ( palmtopdir, D, palmtopdir, APPNAME ) )
- elif APPTYPE == "plugin":
- os.system( "install -m 0755 %s/lib%s.so %s%s%s/" % ( S, APPNAME, D, palmtopdir, bindir ) )
-}
-
-EXPORT_FUNCTIONS do_opie_install
-addtask opie_install after do_compile before do_populate_staging
diff --git a/classes/opie_i18n.bbclass b/classes/opie_i18n.bbclass
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/classes/opie_i18n.bbclass
diff --git a/classes/opie_i18n.oeclass b/classes/opie_i18n.oeclass
deleted file mode 100644
index 9e8e3f59f7..0000000000
--- a/classes/opie_i18n.oeclass
+++ /dev/null
@@ -1,163 +0,0 @@
-# classes/opie_i18n.oeclass Matthias 'CoreDump' Hentges 16-10-2004
-#
-# Automatically builds i18n ipks for opie packages. It downloads opie-i18n from opie CVS
-# and tries to guess the name of the .ts file based on the package name:
-# ${PN}.ts, lib${PN}.ts and opie-${PN}.ts are all valid. The .ts "guessing" can be
-# disabled by setting I18N_FILES in the .oe file.
-#
-# Todo:
-#
-
-I18N_STATS = "1"
-SRC_URI += "cvs://anoncvs:anoncvs@cvs.handhelds.org/cvs;module=opie/i18n"
-DEPENDS += "opie-i18n"
-
-die () {
- echo -e "opie_18n: ERROR: $1"
- exit 1
-}
-
-python do_build_opie_i18n_data() {
-
- import os, oe, re
- workdir = oe.data.getVar("WORKDIR", d, 1)
- packages = oe.data.getVar("PACKAGES", d, 1)
- files = oe.data.getVar("FILES", d, 1)
- section = oe.data.getVar("SECTION", d, 1)
- pn = oe.data.getVar("PN", d, 1)
- rdepends = oe.data.getVar("RDEPENDS", d, 1)
-
- if os.path.exists(workdir + "/PACKAGES.tmp"):
- fd = open(workdir + "/PACKAGES.tmp", 'r')
- lines = fd.readlines()
- fd.close()
-
- oe.data.setVar('PACKAGES', " ".join(lines).lower() + " " + packages, d)
-
- fd = open(workdir + "/FILES.tmp", 'r')
- lines = fd.readlines()
- fd.close()
-
- for l in lines:
- x = re.split("\#", l)
- oe.data.setVar('FILES_%s' % x[0].lower(), " " + x[1].strip('\n'), d)
- oe.data.setVar('SECTION_%s' % x[0].lower(), "opie/translations", d)
- oe.data.setVar('RDEPENDS_%s' % x[0].lower(), pn, d)
-
- oe.data.setVar('SECTION_%s' % pn, section, d)
- oe.data.setVar('RDEPENDS', rdepends, d)
- else:
- oe.note("No translations found for package " + pn)
-}
-
-do_build_opie_i18n () {
-
- cd "${WORKDIR}/i18n" || die "ERROR:\nCouldn't find Opies i18n sources in ${PN}/i18n\nMake sure that <inherit opie_i18n> or <inherit opie> is *below* <SRC_URIS =>!"
-
- if test -z "${I18N_FILES}"
- then
- package_name="`echo "${PN}"| sed "s/^opie\-//"`"
- package_name2="`echo "${PN}"| sed "s/^opie\-//;s/\-//"`"
- test "$package_name" != "$package_name2" && I18N_FILES="${package_name}.ts lib${package_name}.ts opie-${package_name}.ts ${package_name2}.ts lib${package_name2}.ts opie-${package_name2}.ts"
- test "$package_name" = "$package_name2" && I18N_FILES="${package_name}.ts lib${package_name}.ts opie-${package_name}.ts"
- echo -e "I18N Datafiles: ${I18N_FILES} (auto-detected)\nYou can overide the auto-detection by setting I18N_FILES in your .oe file"
- else
- echo "I18N Datafiles: ${I18N_FILES} (provided by .oe)"
- fi
-
- rm -f "${WORKDIR}/FILES.tmp" "${WORKDIR}/PACKAGES.tmp"
-
- echo -e "\nFILES is set to [${FILES}]\n"
-
- for file in ${I18N_FILES}
- do
- echo "Working on [$file]"
- for ts_file in `ls -1 */*.ts | egrep "/$file"`
- do
- echo -e "\tCompiling [$ts_file]"
- cd "${WORKDIR}/i18n/`dirname $ts_file`" || die "[${WORKDIR}/i18n/`dirname $ts_file`] not found"
- opie-lrelease "`basename $ts_file`" || die "lrelease failed! Make sure that <inherit opie_i18n> or <inherit opie> is *below* <DEPENDS =>!"
-
- # $lang is the language as in de_DE, $lang_sane replaces "_" with "-"
- # to allow packaging as "_" is not allowed in a package name
- lang="`echo "$ts_file" | sed -n "s#\(.*\)/\(.*\)#\1#p"`"
- lang_sane="`echo "$ts_file" | sed -n "s#\(.*\)/\(.*\)#\1#p"|sed s/\_/\-/`"
- echo -e "\tPackaging [`basename $ts_file`] for language [$lang]"
-
- install -d ${D}${palmtopdir}/i18n/$lang
- install -m 0644 ${WORKDIR}/i18n/$lang/.directory ${D}${palmtopdir}/i18n/$lang/
- install -m 0644 ${WORKDIR}/i18n/$lang/*.qm "${D}${palmtopdir}/i18n/$lang/"
-
- # As it is not possible to modify OE vars from within a _shell_ function,
- # some major hacking was needed. These two files will be read by the python
- # function do_build_opie_i18n_data() which sets the variables FILES_* and
- # PACKAGES as needed.
- echo -n "${PN}-${lang_sane} " >> "${WORKDIR}/PACKAGES.tmp"
- echo -e "${PN}-${lang_sane}#${palmtopdir}/i18n/$lang" >> "${WORKDIR}/FILES.tmp"
-
- ts_found_something=1
- done
-
- if test "$ts_found_something" != 1
- then
- echo -e "\tNo translations found"
- else
- ts_found_something=""
- ts_found="$ts_found $file"
- fi
-
- # Only used for debugging purposes
- test "${I18N_STATS}" = 1 && cd "${WORKDIR}/i18n"
-
- echo -e "Completed [$file]\n\n"
- done
-
- qt_dirs="apps bin etc lib pics plugins share sounds"
-
- for dir in $qt_dirs
- do
- dir_="$dir_ ${palmtopdir}/$dir "
- done
-
-
- # If we don't adjust FILES to exclude the i18n directory, we will end up with
- # _lots_ of empty i18n/$lang directories in the original .ipk.
- if (echo "${FILES}" | egrep "/opt/QtPalmtop/? |/opt/QtPalmtop/?$") &>/dev/null
- then
- echo "NOTE: FILES was set to /opt/QtPalmtop which would include the i18n directory"
- echo -e "\n\nI'll remove /opt/QtPalmtop from FILES and replace it with all directories"
- echo "below QtPalmtop, except i18n ($qt_dirs). See classes/opie_i18n.oeclass for details"
-
- # Removes /opt/QtPalmtop from FILES but keeps /opt/QtPalmtop/$some_dir
- FILES="`echo "$FILES"| sed "s#/opt/QtPalmtop[/]\?\$\|/opt/QtPalmtop[/]\? ##"`"
-
- echo "${PN}#$FILES $dir_" >> "${WORKDIR}/FILES.tmp"
- fi
-
- # This is the common case for OPIE apps which are installed by opie.oeclass magic
- if test -z "${FILES}"
- then
- echo "NOTE:"
- echo -e "Since FILES is empty, i'll add all directories below /o/QtPalmtop to it,\nexcluding i18n: ( $qt_dirs )"
- echo "${PN}#$FILES $dir_" >> "${WORKDIR}/FILES.tmp"
- fi
-
- if ! test -e "${WORKDIR}/PACKAGES.tmp" -a "${I18N_STATS}" = 1
- then
- echo "No translations for package [${PN}]" >> /tmp/oe-i18n-missing.log
- else
- echo "Using [$ts_found ] for package [${PN}]" >> /tmp/oe-i18n.log
- fi
-
- # While this might not be very elegant, it safes a _ton_ of space (~30Mb) for
- # each opie package.
- for file in $(ls */*.ts | egrep -v "`echo "$ts_found"| sed "s/^\ //;s/\ /\|/"`")
- do
- rm "$file"
- done
-
- return 0
-}
-
-addtask build_opie_i18n before do_compile
-addtask build_opie_i18n_data after do_build_opie_i18n before do_compile
diff --git a/classes/package.bbclass b/classes/package.bbclass
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/classes/package.bbclass
diff --git a/classes/package.oeclass b/classes/package.oeclass
deleted file mode 100644
index f7142e2839..0000000000
--- a/classes/package.oeclass
+++ /dev/null
@@ -1,570 +0,0 @@
-def legitimize_package_name(s):
- return s.lower().replace('_', '-').replace('@', '+').replace(',', '+').replace('/', '-')
-
-def do_split_packages(d, root, file_regex, output_pattern, description, postinst=None, recursive=False, hook=None, extra_depends=None, aux_files_pattern=None, postrm=None, allow_dirs=False, prepend=False, match_path=False):
- import os, os.path, oe
-
- dvar = oe.data.getVar('D', d, 1)
- if not dvar:
- oe.error("D not defined")
- return
-
- packages = oe.data.getVar('PACKAGES', d, 1).split()
- if not packages:
- # nothing to do
- return
-
- if postinst:
- postinst = '#!/bin/sh\n' + postinst
- if postrm:
- postrm = '#!/bin/sh\n' + postrm
- if not recursive:
- objs = os.listdir(dvar + root)
- else:
- objs = []
- for walkroot, dirs, files in os.walk(dvar + root):
- for file in files:
- relpath = os.path.join(walkroot, file).replace(dvar + root + '/', '', 1)
- if relpath:
- objs.append(relpath)
-
- if extra_depends == None:
- extra_depends = oe.data.getVar('PKG_' + packages[0], d, 1) or packages[0]
-
- for o in objs:
- import re, stat
- if match_path:
- m = re.match(file_regex, o)
- else:
- m = re.match(file_regex, os.path.basename(o))
-
- if not m:
- continue
- f = os.path.join(dvar + root, o)
- mode = os.lstat(f).st_mode
- if not (stat.S_ISREG(mode) or (allow_dirs and stat.S_ISDIR(mode))):
- continue
- on = legitimize_package_name(m.group(1))
- pkg = output_pattern % on
- if not pkg in packages:
- if prepend:
- packages = [pkg] + packages
- else:
- packages.append(pkg)
- the_files = [os.path.join(root, o)]
- if aux_files_pattern:
- if type(aux_files_pattern) is list:
- for fp in aux_files_pattern:
- the_files.append(fp % on)
- else:
- the_files.append(aux_files_pattern % on)
- oe.data.setVar('FILES_' + pkg, " ".join(the_files), d)
- if extra_depends != '':
- oe.data.setVar('RDEPENDS_' + pkg, extra_depends, d)
- oe.data.setVar('DESCRIPTION_' + pkg, description % on, d)
- if postinst:
- oe.data.setVar('pkg_postinst_' + pkg, postinst, d)
- if postrm:
- oe.data.setVar('pkg_postrm_' + pkg, postrm, d)
- else:
- oldfiles = oe.data.getVar('FILES_' + pkg, d, 1)
- if not oldfiles:
- oe.fatal("Package '%s' exists but has no files" % pkg)
- oe.data.setVar('FILES_' + pkg, oldfiles + " " + os.path.join(root, o), d)
- if callable(hook):
- hook(f, pkg, file_regex, output_pattern, m.group(1))
-
- oe.data.setVar('PACKAGES', ' '.join(packages), d)
-
-python populate_packages () {
- import glob, stat, errno, re, copy
-
- workdir = oe.data.getVar('WORKDIR', d, 1)
- if not workdir:
- oe.error("WORKDIR not defined, unable to package")
- return
-
- import os # path manipulations
- outdir = oe.data.getVar('DEPLOY_DIR', d, 1)
- if not outdir:
- oe.error("DEPLOY_DIR not defined, unable to package")
- return
- oe.mkdirhier(outdir)
-
- dvar = oe.data.getVar('D', d, 1)
- if not dvar:
- oe.error("D not defined, unable to package")
- return
- oe.mkdirhier(dvar)
-
- packages = oe.data.getVar('PACKAGES', d, 1)
- if not packages:
- oe.debug(1, "PACKAGES not defined, nothing to package")
- return
-
- pn = oe.data.getVar('PN', d, 1)
- if not pn:
- oe.error("PN not defined")
- return
-
- os.chdir(dvar)
-
- def isexec(path):
- try:
- s = os.stat(path)
- except (os.error, AttributeError):
- return 0
- return (s[stat.ST_MODE] & stat.S_IEXEC)
-
- for pkg in packages.split():
- localdata = copy.deepcopy(d)
- root = os.path.join(workdir, "install", pkg)
-
- os.system('rm -rf %s' % root)
-
- oe.data.setVar('ROOT', '', localdata)
- oe.data.setVar('ROOT_%s' % pkg, root, localdata)
- pkgname = oe.data.getVar('PKG_%s' % pkg, localdata, 1)
- if not pkgname:
- pkgname = pkg
- oe.data.setVar('PKG', pkgname, localdata)
-
- overrides = oe.data.getVar('OVERRIDES', localdata, 1)
- if not overrides:
- raise oe.build.FuncFailed('OVERRIDES not defined')
- oe.data.setVar('OVERRIDES', overrides+':'+pkg, localdata)
-
- oe.data.update_data(localdata)
-
- root = oe.data.getVar('ROOT', localdata, 1)
- oe.mkdirhier(root)
- filesvar = oe.data.getVar('FILES', localdata, 1) or ""
- files = filesvar.split()
- stripfunc = ""
- for file in files:
- if os.path.isabs(file):
- file = '.' + file
- if not os.path.islink(file):
- if os.path.isdir(file):
- newfiles = [ os.path.join(file,x) for x in os.listdir(file) ]
- if newfiles:
- files += newfiles
- continue
- globbed = glob.glob(file)
- if globbed:
- if [ file ] != globbed:
- files += globbed
- continue
- if (not os.path.islink(file)) and (not os.path.exists(file)):
- continue
- fpath = os.path.join(root,file)
- dpath = os.path.dirname(fpath)
- oe.mkdirhier(dpath)
- if (oe.data.getVar('INHIBIT_PACKAGE_STRIP', d, 1) != '1') and not os.path.islink(file) and isexec(file):
- stripfunc += "${STRIP} %s || : ;\n" % fpath
- ret = oe.movefile(file,fpath)
- if ret is None or ret == 0:
- raise oe.build.FuncFailed("File population failed")
- if not stripfunc == "":
- from oe import build
- # strip
- oe.data.setVar('RUNSTRIP', '%s\nreturn 0' % stripfunc, localdata)
- oe.data.setVarFlag('RUNSTRIP', 'func', 1, localdata)
- oe.build.exec_func('RUNSTRIP', localdata)
- del localdata
- os.chdir(workdir)
-
- unshipped = []
- for root, dirs, files in os.walk(dvar):
- for f in files:
- path = os.path.join(root[len(dvar):], f)
- unshipped.append(path)
-
- if unshipped != []:
- oe.note("the following files were installed but not shipped in any package:")
- for f in unshipped:
- oe.note(" " + f)
-
- oe.build.exec_func("package_name_hook", d)
-
- for pkg in packages.split():
- if oe.data.getVar('PKG_%s' % pkg, d, 1) is None:
- oe.data.setVar('PKG_%s' % pkg, pkg, d)
-
- dangling_links = {}
- pkg_files = {}
- for pkg in packages.split():
- dangling_links[pkg] = []
- pkg_files[pkg] = []
- inst_root = os.path.join(workdir, "install", pkg)
- for root, dirs, files in os.walk(inst_root):
- for f in files:
- path = os.path.join(root, f)
- rpath = path[len(inst_root):]
- pkg_files[pkg].append(rpath)
- try:
- s = os.stat(path)
- except OSError, (err, strerror):
- if err != errno.ENOENT:
- raise
- target = os.readlink(path)
- if target[0] != '/':
- target = os.path.join(root[len(inst_root):], target)
- dangling_links[pkg].append(os.path.normpath(target))
-
- for pkg in packages.split():
- rdepends = explode_deps(oe.data.getVar('RDEPENDS_' + pkg, d, 1) or oe.data.getVar('RDEPENDS', d, 1) or "")
- for l in dangling_links[pkg]:
- found = False
- oe.debug(1, "%s contains dangling link %s" % (pkg, l))
- for p in packages.split():
- for f in pkg_files[p]:
- if f == l:
- found = True
- oe.debug(1, "target found in %s" % p)
- dp = oe.data.getVar('PKG_' + p, d, 1) or p
- if not dp in rdepends:
- rdepends.append(dp)
- break
- if found == False:
- oe.note("%s contains dangling symlink to %s" % (pkg, l))
- oe.data.setVar('RDEPENDS_' + pkg, " " + " ".join(rdepends), d)
-
- def write_if_exists(f, pkg, var):
- def encode(str):
- import codecs
- c = codecs.getencoder("string_escape")
- return c(str)[0]
-
- val = oe.data.getVar('%s_%s' % (var, pkg), d, 1)
- if val:
- f.write('%s_%s: %s\n' % (var, pkg, encode(val)))
-
- data_file = os.path.join(workdir, "install", pn + ".package")
- f = open(data_file, 'w')
- f.write("PACKAGES: %s\n" % packages)
- for pkg in packages.split():
- write_if_exists(f, pkg, 'DESCRIPTION')
- write_if_exists(f, pkg, 'RDEPENDS')
- write_if_exists(f, pkg, 'RPROVIDES')
- write_if_exists(f, pkg, 'PKG')
- write_if_exists(f, pkg, 'ALLOW_EMPTY')
- write_if_exists(f, pkg, 'FILES')
- write_if_exists(f, pkg, 'pkg_postinst')
- write_if_exists(f, pkg, 'pkg_postrm')
- f.close()
- oe.build.exec_func("read_subpackage_metadata", d)
-}
-
-ldconfig_postinst_fragment() {
-if [ x"$D" = "x" ]; then
- ldconfig
-fi
-}
-
-python package_do_shlibs() {
- import os, re, os.path
-
- lib_re = re.compile("^lib.*\.so")
- libdir_re = re.compile(".*/lib$")
-
- packages = oe.data.getVar('PACKAGES', d, 1)
- if not packages:
- oe.debug(1, "no packages to build; not calculating shlibs")
- return
-
- workdir = oe.data.getVar('WORKDIR', d, 1)
- if not workdir:
- oe.error("WORKDIR not defined")
- return
-
- staging = oe.data.getVar('STAGING_DIR', d, 1)
- if not staging:
- oe.error("STAGING_DIR not defined")
- return
-
- ver = oe.data.getVar('PV', d, 1)
- if not ver:
- oe.error("PV not defined")
- return
-
- target_sys = oe.data.getVar('TARGET_SYS', d, 1)
- if not target_sys:
- oe.error("TARGET_SYS not defined")
- return
-
- shlibs_dir = os.path.join(staging, target_sys, "shlibs")
- old_shlibs_dir = os.path.join(staging, "shlibs")
- oe.mkdirhier(shlibs_dir)
-
- needed = {}
- for pkg in packages.split():
- needs_ldconfig = False
- oe.debug(2, "calculating shlib provides for %s" % pkg)
-
- pkgname = oe.data.getVar('PKG_%s' % pkg, d, 1)
- if not pkgname:
- pkgname = pkg
-
- needed[pkg] = []
- sonames = list()
- top = os.path.join(workdir, "install", pkg)
- for root, dirs, files in os.walk(top):
- for file in files:
- soname = None
- path = os.path.join(root, file)
- if os.access(path, os.X_OK) or lib_re.match(file):
- cmd = (oe.data.getVar('BUILD_PREFIX', d, 1) or "") + "objdump -p " + path + " 2>/dev/null"
- fd = os.popen(cmd)
- lines = fd.readlines()
- fd.close()
- for l in lines:
- m = re.match("\s+NEEDED\s+([^\s]*)", l)
- if m:
- needed[pkg].append(m.group(1))
- m = re.match("\s+SONAME\s+([^\s]*)", l)
- if m and not m.group(1) in sonames:
- sonames.append(m.group(1))
- if m and libdir_re.match(root):
- needs_ldconfig = True
- shlibs_file = os.path.join(shlibs_dir, pkgname + ".list")
- if os.path.exists(shlibs_file):
- os.remove(shlibs_file)
- shver_file = os.path.join(shlibs_dir, pkgname + ".ver")
- if os.path.exists(shver_file):
- os.remove(shver_file)
- if len(sonames):
- fd = open(shlibs_file, 'w')
- for s in sonames:
- fd.write(s + '\n')
- fd.close()
- fd = open(shver_file, 'w')
- fd.write(ver + '\n')
- fd.close()
- if needs_ldconfig:
- oe.debug(1, 'adding ldconfig call to postinst for %s' % pkg)
- postinst = oe.data.getVar('pkg_postinst_%s' % pkg, d, 1) or oe.data.getVar('pkg_postinst', d, 1)
- if not postinst:
- postinst = '#!/bin/sh\n'
- postinst += oe.data.getVar('ldconfig_postinst_fragment', d, 1)
- oe.data.setVar('pkg_postinst_%s' % pkg, postinst, d)
-
- shlib_provider = {}
- list_re = re.compile('^(.*)\.list$')
- for dir in [shlibs_dir, old_shlibs_dir]:
- if not os.path.exists(dir):
- continue
- for file in os.listdir(dir):
- m = list_re.match(file)
- if m:
- dep_pkg = m.group(1)
- fd = open(os.path.join(dir, file))
- lines = fd.readlines()
- fd.close()
- ver_file = os.path.join(dir, dep_pkg + '.ver')
- lib_ver = None
- if os.path.exists(ver_file):
- fd = open(ver_file)
- lib_ver = fd.readline().rstrip()
- fd.close()
- for l in lines:
- shlib_provider[l.rstrip()] = (dep_pkg, lib_ver)
-
-
- for pkg in packages.split():
- oe.debug(2, "calculating shlib requirements for %s" % pkg)
-
- deps = list()
- for n in needed[pkg]:
- if n in shlib_provider.keys():
- (dep_pkg, ver_needed) = shlib_provider[n]
-
- if ver_needed:
- dep = "%s (>= %s)" % (dep_pkg, ver_needed)
- else:
- dep = dep_pkg
- if not dep in deps:
- deps.append(dep)
- else:
- oe.note("Couldn't find shared library provider for %s" % n)
-
-
- deps_file = os.path.join(workdir, "install", pkg + ".shlibdeps")
- if os.path.exists(deps_file):
- os.remove(deps_file)
- if len(deps):
- fd = open(deps_file, 'w')
- for dep in deps:
- fd.write(dep + '\n')
- fd.close()
-}
-
-python package_do_pkgconfig () {
- import re, os
-
- packages = oe.data.getVar('PACKAGES', d, 1)
- if not packages:
- oe.debug(1, "no packages to build; not calculating pkgconfig dependencies")
- return
-
- workdir = oe.data.getVar('WORKDIR', d, 1)
- if not workdir:
- oe.error("WORKDIR not defined")
- return
-
- staging = oe.data.getVar('STAGING_DIR', d, 1)
- if not staging:
- oe.error("STAGING_DIR not defined")
- return
-
- pc_re = re.compile('(.*)\.pc$')
- var_re = re.compile('(.*)=(.*)')
- field_re = re.compile('(.*): (.*)')
-
- pkgconfig_provided = {}
- pkgconfig_needed = {}
- for pkg in packages.split():
- pkgconfig_provided[pkg] = []
- pkgconfig_needed[pkg] = []
- top = os.path.join(workdir, "install", pkg)
- for root, dirs, files in os.walk(top):
- for file in files:
- m = pc_re.match(file)
- if m:
- pd = {}
- name = m.group(1)
- pkgconfig_provided[pkg].append(name)
- path = os.path.join(root, file)
- if not os.access(path, os.R_OK):
- continue
- f = open(path, 'r')
- lines = f.readlines()
- f.close()
- for l in lines:
- m = var_re.match(l)
- if m:
- name = m.group(1)
- val = m.group(2)
- oe.data.setVar(name, oe.data.expand(val, pd), pd)
- continue
- m = field_re.match(l)
- if m:
- hdr = m.group(1)
- exp = oe.data.expand(m.group(2), pd)
- if hdr == 'Requires':
- pkgconfig_needed[pkg] += exp.replace(',', ' ').split()
-
- shlibs_dir = os.path.join(staging, "shlibs")
- oe.mkdirhier(shlibs_dir)
-
- for pkg in packages.split():
- pkgs_file = os.path.join(shlibs_dir, pkg + ".pclist")
- if os.path.exists(pkgs_file):
- os.remove(pkgs_file)
- if pkgconfig_provided[pkg] != []:
- f = open(pkgs_file, 'w')
- for p in pkgconfig_provided[pkg]:
- f.write('%s\n' % p)
- f.close()
-
- for file in os.listdir(shlibs_dir):
- m = re.match('^(.*)\.pclist$', file)
- if m:
- pkg = m.group(1)
- fd = open(os.path.join(shlibs_dir, file))
- lines = fd.readlines()
- fd.close()
- pkgconfig_provided[pkg] = []
- for l in lines:
- pkgconfig_provided[pkg].append(l.rstrip())
-
- for pkg in packages.split():
- deps = []
- for n in pkgconfig_needed[pkg]:
- found = False
- for k in pkgconfig_provided.keys():
- if n in pkgconfig_provided[k]:
- if k != pkg and not (k in deps):
- deps.append(k)
- found = True
- if found == False:
- oe.note("couldn't find pkgconfig module '%s' in any package" % n)
- deps_file = os.path.join(workdir, "install", pkg + ".pcdeps")
- if os.path.exists(deps_file):
- os.remove(deps_file)
- if len(deps):
- fd = open(deps_file, 'w')
- for dep in deps:
- fd.write(dep + '\n')
- fd.close()
-}
-
-python package_do_split_locales() {
- import os
-
- if (oe.data.getVar('PACKAGE_NO_LOCALE', d, 1) == '1'):
- oe.debug(1, "package requested not splitting locales")
- return
-
- packages = (oe.data.getVar('PACKAGES', d, 1) or "").split()
- if not packages:
- oe.debug(1, "no packages to build; not splitting locales")
- return
-
- datadir = oe.data.getVar('datadir', d, 1)
- if not datadir:
- oe.note("datadir not defined")
- return
-
- dvar = oe.data.getVar('D', d, 1)
- if not dvar:
- oe.error("D not defined")
- return
-
- pn = oe.data.getVar('PN', d, 1)
- if not pn:
- oe.error("PN not defined")
- return
-
- if pn + '-locale' in packages:
- packages.remove(pn + '-locale')
-
- localedir = os.path.join(dvar + datadir, 'locale')
-
- if not os.path.isdir(localedir):
- oe.debug(1, "No locale files in this package")
- return
-
- locales = os.listdir(localedir)
-
- mainpkg = packages[0]
-
- for l in locales:
- ln = legitimize_package_name(l)
- pkg = pn + '-locale-' + ln
- packages.append(pkg)
- oe.data.setVar('FILES_' + pkg, os.path.join(datadir, 'locale', l), d)
- oe.data.setVar('RDEPENDS_' + pkg, '${PKG_%s} virtual-locale-%s' % (mainpkg, ln), d)
- oe.data.setVar('RPROVIDES_' + pkg, '%s-locale %s-translation' % (pn, ln), d)
- oe.data.setVar('DESCRIPTION_' + pkg, '%s translation for %s' % (l, pn), d)
-
- oe.data.setVar('PACKAGES', ' '.join(packages), d)
-
- rdep = (oe.data.getVar('RDEPENDS_%s' % mainpkg, d, 1) or oe.data.getVar('RDEPENDS', d, 1) or "").split()
- rdep.append('%s-locale*' % pn)
- oe.data.setVar('RDEPENDS_%s' % mainpkg, ' '.join(rdep), d)
-}
-
-python package_do_package () {
- oe.build.exec_func('do_install', d)
- oe.build.exec_func('package_do_split_locales', d)
- oe.build.exec_func('populate_packages', d)
- oe.build.exec_func('package_do_shlibs', d)
- oe.build.exec_func('package_do_pkgconfig', d)
- oe.build.exec_func('read_shlibdeps', d)
-}
-
-do_package[dirs] = "${D}"
-populate_packages[dirs] = "${D}"
-EXPORT_FUNCTIONS do_package do_shlibs do_split_locales
-addtask package before do_build after do_populate_staging
diff --git a/classes/package_ipk.bbclass b/classes/package_ipk.bbclass
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/classes/package_ipk.bbclass
diff --git a/classes/package_ipk.oeclass b/classes/package_ipk.oeclass
deleted file mode 100644
index dcc3b6e9a7..0000000000
--- a/classes/package_ipk.oeclass
+++ /dev/null
@@ -1,224 +0,0 @@
-inherit package
-DEPENDS_prepend="${@["ipkg-utils-native ", ""][(oe.data.getVar('PACKAGES', d, 1) == '')]}"
-BOOTSTRAP_EXTRA_RDEPENDS += "ipkg-collateral ipkg ipkg-link"
-BOOTSTRAP_EXTRA_DEPENDS += "ipkg-collateral ipkg ipkg-link"
-
-python package_ipk_fn () {
- from oe import data
- oe.data.setVar('PKGFN', oe.data.getVar('PKG',d), d)
-}
-
-python package_ipk_install () {
- import os, sys
- pkg = oe.data.getVar('PKG', d, 1)
- pkgfn = oe.data.getVar('PKGFN', d, 1)
- rootfs = oe.data.getVar('IMAGE_ROOTFS', d, 1)
- ipkdir = oe.data.getVar('DEPLOY_DIR_IPK', d, 1)
- stagingdir = oe.data.getVar('STAGING_DIR', d, 1)
- tmpdir = oe.data.getVar('TMPDIR', d, 1)
-
- if None in (pkg,pkgfn,rootfs):
- raise oe.build.FuncFailed("missing variables (one or more of PKG, PKGFN, IMAGEROOTFS)")
- try:
- oe.mkdirhier(rootfs)
- os.chdir(rootfs)
- except OSError:
- (type, value, traceback) = sys.exc_info()
- print value
- raise oe.build.FuncFailed
-
- # Generate ipk.conf if it or the stamp doesnt exist
- conffile = os.path.join(stagingdir,"ipkg.conf")
- if not os.access(conffile, os.R_OK):
- ipkg_archs = oe.data.getVar('IPKG_ARCHS',d)
- if ipkg_archs is None:
- oe.error("IPKG_ARCHS missing")
- raise FuncFailed
- ipkg_archs = ipkg_archs.split()
- arch_priority = 1
-
- f = open(conffile,"w")
- for arch in ipkg_archs:
- f.write("arch %s %s\n" % ( arch, arch_priority ))
- arch_priority += 1
- f.write("src local file:%s" % ipkdir)
- f.close()
-
-
- if (not os.access(os.path.join(ipkdir,"Packages"), os.R_OK) or
- not os.access(os.path.join(os.path.join(tmpdir, "stamps"),"do_packages"),os.R_OK)):
- ret = os.system('ipkg-make-index -p %s %s ' % (os.path.join(ipkdir, "Packages"), ipkdir))
- if (ret != 0 ):
- raise oe.build.FuncFailed
- f=open(os.path.join(os.path.join(tmpdir, "stamps"),"do_packages"),"w")
- f.close()
-
- ret = os.system('ipkg-cl -o %s -f %s update' % (rootfs, conffile))
- ret = os.system('ipkg-cl -o %s -f %s install %s' % (rootfs, conffile, pkgfn))
- if (ret != 0 ):
- raise oe.build.FuncFailed
-}
-
-python package_ipk_do_package_ipk () {
- import copy # to back up env data
- import sys
-
- workdir = oe.data.getVar('WORKDIR', d, 1)
- if not workdir:
- oe.error("WORKDIR not defined, unable to package")
- return
-
- import os # path manipulations
- outdir = oe.data.getVar('DEPLOY_DIR_IPK', d, 1)
- if not outdir:
- oe.error("DEPLOY_DIR_IPK not defined, unable to package")
- return
- oe.mkdirhier(outdir)
-
- dvar = oe.data.getVar('D', d, 1)
- if not dvar:
- oe.error("D not defined, unable to package")
- return
- oe.mkdirhier(dvar)
-
- packages = oe.data.getVar('PACKAGES', d, 1)
- if not packages:
- oe.debug(1, "PACKAGES not defined, nothing to package")
- return
-
- tmpdir = oe.data.getVar('TMPDIR', d, 1)
- # Invalidate the packages file
- if os.access(os.path.join(os.path.join(tmpdir, "stamps"),"do_packages"),os.R_OK):
- os.unlink(os.path.join(os.path.join(tmpdir, "stamps"),"do_packages"))
-
- if packages == []:
- oe.debug(1, "No packages; nothing to do")
- return
-
- for pkg in packages.split():
- from copy import deepcopy
- localdata = deepcopy(d)
- root = "%s/install/%s" % (workdir, pkg)
-
- oe.data.setVar('ROOT', '', localdata)
- oe.data.setVar('ROOT_%s' % pkg, root, localdata)
- pkgname = oe.data.getVar('PKG_%s' % pkg, localdata, 1)
- if not pkgname:
- pkgname = pkg
- oe.data.setVar('PKG', pkgname, localdata)
-
- overrides = oe.data.getVar('OVERRIDES', localdata)
- if not overrides:
- raise oe.build.FuncFailed('OVERRIDES not defined')
- overrides = oe.data.expand(overrides, localdata)
- oe.data.setVar('OVERRIDES', overrides + ':' + pkg, localdata)
-
- oe.data.update_data(localdata)
- basedir = os.path.join(os.path.dirname(root))
- pkgoutdir = outdir
- oe.mkdirhier(pkgoutdir)
- os.chdir(root)
- from glob import glob
- g = glob('*')
- try:
- del g[g.index('CONTROL')]
- del g[g.index('./CONTROL')]
- except ValueError:
- pass
- if not g and not oe.data.getVar('ALLOW_EMPTY', localdata):
- from oe import note
- note("Not creating empty archive for %s-%s-%s" % (pkg, oe.data.getVar('PV', localdata, 1), oe.data.getVar('PR', localdata, 1)))
- continue
- controldir = os.path.join(root, 'CONTROL')
- oe.mkdirhier(controldir)
- try:
- ctrlfile = file(os.path.join(controldir, 'control'), 'w')
- except OSError:
- raise oe.build.FuncFailed("unable to open control file for writing.")
-
- fields = []
- fields.append(["Version: %s-%s\n", ['PV', 'PR']])
- fields.append(["Description: %s\n", ['DESCRIPTION']])
- fields.append(["Section: %s\n", ['SECTION']])
- fields.append(["Priority: %s\n", ['PRIORITY']])
- fields.append(["Maintainer: %s\n", ['MAINTAINER']])
- fields.append(["Architecture: %s\n", ['PACKAGE_ARCH']])
- fields.append(["OE: %s\n", ['P']])
- fields.append(["Source: %s\n", ['SRC_URI']])
-
- def pullData(l, d):
- l2 = []
- for i in l:
- l2.append(oe.data.getVar(i, d, 1))
- return l2
-
- ctrlfile.write("Package: %s\n" % pkgname)
- # check for required fields
- try:
- for (c, fs) in fields:
- for f in fs:
- if oe.data.getVar(f, localdata) is None:
- raise KeyError(f)
- ctrlfile.write(c % tuple(pullData(fs, localdata)))
- except KeyError:
- (type, value, traceback) = sys.exc_info()
- ctrlfile.close()
- raise oe.build.FuncFailed("Missing field for ipk generation: %s" % value)
- # more fields
- rdepends = explode_deps(oe.data.getVar("RDEPENDS", localdata, 1) or "")
- rsuggests = (oe.data.getVar("RSUGGESTS", localdata, 1) or "").split()
- rrecommends = (oe.data.getVar("RRECOMMENDS", localdata, 1) or "").split()
- rprovides = (oe.data.getVar("RPROVIDES", localdata, 1) or "").split()
- if rdepends:
- ctrlfile.write("Depends: " + ", ".join(rdepends) + "\n")
- if rsuggests:
- ctrlfile.write("Suggests: " + ", ".join(rsuggests) + "\n")
- if rrecommends:
- ctrlfile.write("Recommends: " + ", ".join(rrecommends) + "\n")
- if rprovides:
- ctrlfile.write("Provides: " + ", ".join(rprovides) + "\n")
- ctrlfile.close()
-
- for script in ["preinst", "postinst", "prerm", "postrm"]:
- scriptvar = oe.data.getVar('pkg_%s' % script, localdata, 1)
- if not scriptvar:
- continue
- try:
- scriptfile = file(os.path.join(controldir, script), 'w')
- except OSError:
- raise oe.build.FuncFailed("unable to open %s script file for writing." % script)
- scriptfile.write(scriptvar)
- scriptfile.close()
- os.chmod(os.path.join(controldir, script), 0755)
-
- conffiles_str = oe.data.getVar("CONFFILES", localdata, 1)
- if conffiles_str:
- try:
- conffiles = file(os.path.join(controldir, 'conffiles'), 'w')
- except OSError:
- raise oe.build.FuncFailed("unable to open conffiles for writing.")
- for f in conffiles_str.split():
- conffiles.write('%s\n' % f)
- conffiles.close()
-
- os.chdir(basedir)
- ret = os.system("PATH=\"%s\" ipkg-build -o 0 -g 0 %s %s" % (oe.data.getVar("PATH", localdata, 1), pkg, pkgoutdir))
- if ret != 0:
- raise oe.build.FuncFailed("ipkg-build execution failed")
-
- for script in ["preinst", "postinst", "prerm", "postrm", "control" ]:
- scriptfile = os.path.join(controldir, script)
- try:
- os.remove(scriptfile)
- except OSError:
- pass
- try:
- os.rmdir(controldir)
- except OSError:
- pass
- del localdata
-}
-
-EXPORT_FUNCTIONS do_package_ipk
-
-addtask package_ipk after do_package before do_build
diff --git a/classes/package_rpm.bbclass b/classes/package_rpm.bbclass
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/classes/package_rpm.bbclass
diff --git a/classes/package_rpm.oeclass b/classes/package_rpm.oeclass
deleted file mode 100644
index 60cf86acf5..0000000000
--- a/classes/package_rpm.oeclass
+++ /dev/null
@@ -1,135 +0,0 @@
-inherit package
-inherit rpm_core
-
-RPMBUILD="rpmbuild --short-circuit ${RPMOPTS}"
-
-python write_specfile() {
- from oe import data, build
- import sys
- out_vartranslate = {
- "PKG": "Name",
- "PV": "Version",
- "PR": "Release",
- "DESCRIPTION": "%description",
- "ROOT": "BuildRoot",
- "LICENSE": "License",
- "SECTION": "Group",
- }
-
- root = oe.data.getVar('ROOT', d)
-
- # get %files
- filesvar = oe.data.expand(oe.data.getVar('FILES', d), d) or ""
- from glob import glob
- files = filesvar.split()
- todelete = []
- for file in files:
- if file[0] == '.':
- newfile = file[1:]
- files[files.index(file)] = newfile
- file = newfile
- else:
- newfile = file
- realfile = os.path.join(root, './'+file)
- if not glob(realfile):
- todelete.append(files[files.index(newfile)])
- for r in todelete:
- try:
- del files[files.index(r)]
- except ValueError:
- pass
- if not files:
- from oe import note
- note("Not creating empty archive for %s-%s-%s" % (oe.data.getVar('PKG',d, 1), oe.data.getVar('PV', d, 1), oe.data.getVar('PR', d, 1)))
- return
-
- # output .spec using this metadata store
- try:
- from __builtin__ import file
- if not oe.data.getVar('OUTSPECFILE', d):
- raise OSError('eek!')
- specfile = file(oe.data.getVar('OUTSPECFILE', d), 'w')
- except OSError:
- raise oe.build.FuncFailed("unable to open spec file for writing.")
-
-# fd = sys.__stdout__
- fd = specfile
- for var in out_vartranslate.keys():
- if out_vartranslate[var][0] == "%":
- continue
- fd.write("%s\t: %s\n" % (out_vartranslate[var], oe.data.getVar(var, d)))
- fd.write("Summary\t: .\n")
-
- for var in out_vartranslate.keys():
- if out_vartranslate[var][0] != "%":
- continue
- fd.write(out_vartranslate[var] + "\n")
- fd.write(oe.data.getVar(var, d) + "\n\n")
-
- fd.write("%files\n")
- for file in files:
- fd.write("%s\n" % file)
-
- fd.close()
-
- # call out rpm -bb on the .spec, thereby creating an rpm
-
- oe.data.setVar('BUILDSPEC', "${RPMBUILD} -bb ${OUTSPECFILE}\n", d)
- oe.data.setVarFlag('BUILDSPEC', 'func', '1', d)
- oe.build.exec_func('BUILDSPEC', d)
-
- # move the rpm into the pkgoutdir
- rpm = oe.data.expand('${RPMBUILDPATH}/RPMS/${TARGET_ARCH}/${PKG}-${PV}-${PR}.${TARGET_ARCH}.rpm', d)
- outrpm = oe.data.expand('${DEPLOY_DIR_RPM}/${PKG}-${PV}-${PR}.${TARGET_ARCH}.rpm', d)
- oe.movefile(rpm, outrpm)
-}
-
-python do_package_rpm () {
- workdir = oe.data.getVar('WORKDIR', d)
- if not workdir:
- raise oe.build.FuncFailed("WORKDIR not defined")
- workdir = oe.data.expand(workdir, d)
-
- import os # path manipulations
- outdir = oe.data.getVar('DEPLOY_DIR_RPM', d)
- if not outdir:
- raise oe.build.FuncFailed("DEPLOY_DIR_RPM not defined")
- outdir = oe.data.expand(outdir, d)
- oe.mkdirhier(outdir)
-
- packages = oe.data.getVar('PACKAGES', d)
- if not packages:
- packages = "${PN}"
- oe.data.setVar('FILES', '', d)
- ddir = oe.data.expand(oe.data.getVar('D', d), d)
- oe.mkdirhier(ddir)
- oe.data.setVar(oe.data.expand('FILES_${PN}', d), ''.join([ "./%s" % x for x in os.listdir(ddir)]), d)
- packages = oe.data.expand(packages, d)
-
- for pkg in packages.split():
- from copy import copy, deepcopy
- localdata = deepcopy(d)
- root = "%s/install/%s" % (workdir, pkg)
-
- oe.data.setVar('ROOT', '', localdata)
- oe.data.setVar('ROOT_%s' % pkg, root, localdata)
- oe.data.setVar('PKG', pkg, localdata)
-
- overrides = oe.data.getVar('OVERRIDES', localdata)
- if not overrides:
- raise oe.build.FuncFailed('OVERRIDES not defined')
- overrides = oe.data.expand(overrides, localdata)
- oe.data.setVar('OVERRIDES', '%s:%s' % (overrides, pkg), localdata)
-
- oe.data.update_data(localdata)
-# stuff
- root = oe.data.getVar('ROOT', localdata)
- basedir = os.path.dirname(root)
- pkgoutdir = outdir
- oe.mkdirhier(pkgoutdir)
- oe.data.setVar('OUTSPECFILE', os.path.join(workdir, "%s.spec" % pkg), localdata)
- oe.build.exec_func('write_specfile', localdata)
- del localdata
-}
-
-addtask package_rpm after do_package before do_build
diff --git a/classes/package_tar.bbclass b/classes/package_tar.bbclass
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/classes/package_tar.bbclass
diff --git a/classes/package_tar.oeclass b/classes/package_tar.oeclass
deleted file mode 100644
index 02e74bc8ad..0000000000
--- a/classes/package_tar.oeclass
+++ /dev/null
@@ -1,100 +0,0 @@
-inherit package
-
-python package_tar_fn () {
- import os
- from oe import data
- fn = os.path.join(oe.data.getVar('DEPLOY_DIR_TAR', d), "%s-%s-%s.tar.gz" % (oe.data.getVar('PKG', d), oe.data.getVar('PV', d), oe.data.getVar('PR', d)))
- fn = oe.data.expand(fn, d)
- oe.data.setVar('PKGFN', fn, d)
-}
-
-python package_tar_install () {
- import os, sys
- pkg = oe.data.getVar('PKG', d, 1)
- pkgfn = oe.data.getVar('PKGFN', d, 1)
- rootfs = oe.data.getVar('IMAGE_ROOTFS', d, 1)
-
- if None in (pkg,pkgfn,rootfs):
- oe.error("missing variables (one or more of PKG, PKGFN, IMAGEROOTFS)")
- raise oe.build.FuncFailed
- try:
- oe.mkdirhier(rootfs)
- os.chdir(rootfs)
- except OSError:
- (type, value, traceback) = sys.exc_info()
- print value
- raise oe.build.FuncFailed
-
- if not os.access(pkgfn, os.R_OK):
- oe.debug(1, "%s does not exist, skipping" % pkgfn)
- raise oe.build.FuncFailed
-
- ret = os.system('zcat %s | tar -xf -' % pkgfn)
- if ret != 0:
- raise oe.build.FuncFailed
-}
-
-python do_package_tar () {
- workdir = oe.data.getVar('WORKDIR', d, 1)
- if not workdir:
- oe.error("WORKDIR not defined, unable to package")
- return
-
- import os # path manipulations
- outdir = oe.data.getVar('DEPLOY_DIR_TAR', d, 1)
- if not outdir:
- oe.error("DEPLOY_DIR_TAR not defined, unable to package")
- return
- oe.mkdirhier(outdir)
-
- dvar = oe.data.getVar('D', d, 1)
- if not dvar:
- oe.error("D not defined, unable to package")
- return
- oe.mkdirhier(dvar)
-
- packages = oe.data.getVar('PACKAGES', d, 1)
- if not packages:
- oe.debug(1, "PACKAGES not defined, nothing to package")
- return
-
- for pkg in packages.split():
- from copy import copy, deepcopy
- localdata = deepcopy(d)
- root = "%s/install/%s" % (workdir, pkg)
-
- oe.data.setVar('ROOT', '', localdata)
- oe.data.setVar('ROOT_%s' % pkg, root, localdata)
- oe.data.setVar('PKG', pkg, localdata)
-
- overrides = oe.data.getVar('OVERRIDES', localdata)
- if not overrides:
- raise oe.build.FuncFailed('OVERRIDES not defined')
- overrides = oe.data.expand(overrides, localdata)
- oe.data.setVar('OVERRIDES', '%s:%s' % (overrides, pkg), localdata)
-
- oe.data.update_data(localdata)
-# stuff
- root = oe.data.getVar('ROOT', localdata)
- oe.mkdirhier(root)
- basedir = os.path.dirname(root)
- pkgoutdir = outdir
- oe.mkdirhier(pkgoutdir)
- oe.build.exec_func('package_tar_fn', localdata)
- tarfn = oe.data.getVar('PKGFN', localdata, 1)
-# if os.path.exists(tarfn):
-# del localdata
-# continue
- os.chdir(root)
- from glob import glob
- if not glob('*'):
- oe.note("Not creating empty archive for %s-%s-%s" % (pkg, oe.data.getVar('PV', localdata, 1), oe.data.getVar('PR', localdata, 1)))
- continue
- ret = os.system("tar -czvf %s %s" % (tarfn, '.'))
- if ret != 0:
- oe.error("Creation of tar %s failed." % tarfn)
-# end stuff
- del localdata
-}
-
-addtask package_tar after do_package before do_build
diff --git a/classes/palmtop.bbclass b/classes/palmtop.bbclass
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/classes/palmtop.bbclass
diff --git a/classes/palmtop.oeclass b/classes/palmtop.oeclass
deleted file mode 100644
index c7740c266b..0000000000
--- a/classes/palmtop.oeclass
+++ /dev/null
@@ -1,10 +0,0 @@
-# basically a placeholder for something more fancy
-# for now, just declare some things
-
-inherit qmake
-
-EXTRA_QMAKEVARS_POST_append = " DEFINES+=QWS LIBS+=-lqpe CONFIG+=qt"
-
-DEPENDS_prepend = "virtual/libqpe uicmoc-native "
-
-FILES_${PN} = "${palmtopdir}"
diff --git a/classes/pkg_distribute.bbclass b/classes/pkg_distribute.bbclass
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/classes/pkg_distribute.bbclass
diff --git a/classes/pkgconfig.bbclass b/classes/pkgconfig.bbclass
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/classes/pkgconfig.bbclass
diff --git a/classes/pkgconfig.oeclass b/classes/pkgconfig.oeclass
deleted file mode 100644
index 5e15a2ac97..0000000000
--- a/classes/pkgconfig.oeclass
+++ /dev/null
@@ -1,28 +0,0 @@
-inherit base
-
-DEPENDS_prepend = "pkgconfig-native "
-
-# The namespaces can clash here hence the two step replace
-def get_pkgconfig_mangle(d):
- import oe.data
- s = "-e ''"
- if not oe.data.inherits_class('native', d):
- s += " -e 's:${libdir}:OELIBDIR:;'"
- s += " -e 's:${includedir}:OEINCDIR:;'"
- s += " -e 's:${datadir}:OEDATADIR:'"
- s += " -e 's:${prefix}:OEPREFIX:'"
- s += " -e 's:${exec_prefix}:OEEXECPREFIX:'"
- s += " -e 's:OELIBDIR:${STAGING_LIBDIR}:;'"
- s += " -e 's:OEINCDIR:${STAGING_INCDIR}:;'"
- s += " -e 's:OEDATADIR:${STAGING_DATADIR}:'"
- s += " -e 's:OEPREFIX:${STAGING_LIBDIR}/..:'"
- s += " -e 's:OEEXECPREFIX:${STAGING_LIBDIR}/..:'"
- return s
-
-do_stage_append () {
- for pc in `find ${S} -name '*.pc'`; do
- pcname=`basename $pc`
- install -d ${PKG_CONFIG_PATH}
- cat $pc | sed ${@get_pkgconfig_mangle(d)} > ${PKG_CONFIG_PATH}/$pcname
- done
-}
diff --git a/classes/qmake-base.bbclass b/classes/qmake-base.bbclass
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/classes/qmake-base.bbclass
diff --git a/classes/qmake-base.oeclass b/classes/qmake-base.oeclass
deleted file mode 100644
index a5dd97968f..0000000000
--- a/classes/qmake-base.oeclass
+++ /dev/null
@@ -1,42 +0,0 @@
-DEPENDS_prepend = "qmake-native "
-
-OE_QMAKE_PLATFORM = "${TARGET_OS}-oe-g++"
-QMAKESPEC := "${QMAKE_MKSPEC_PATH}/${OE_QMAKE_PLATFORM}"
-
-# We override this completely to eliminate the -e normally passed in
-EXTRA_OEMAKE = ' MAKEFLAGS= '
-
-export OE_QMAKE_CC="${CC}"
-export OE_QMAKE_CFLAGS="${CFLAGS}"
-export OE_QMAKE_CXX="${CXX}"
-export OE_QMAKE_CXXFLAGS="-fno-exceptions -fno-rtti ${CXXFLAGS}"
-export OE_QMAKE_LDFLAGS="${LDFLAGS}"
-export OE_QMAKE_LINK="${CCLD}"
-export OE_QMAKE_AR="${AR}"
-export OE_QMAKE_STRIP="${STRIP}"
-export OE_QMAKE_UIC="${STAGING_BINDIR}/uic"
-export OE_QMAKE_MOC="${STAGING_BINDIR}/moc"
-export OE_QMAKE_RPATH="-Wl,-rpath-link,"
-
-# default to qte2 via oe.conf, inherit qt3x11 to configure for qt3x11
-export OE_QMAKE_INCDIR_QT="${QTDIR}/include"
-export OE_QMAKE_LIBDIR_QT="${QTDIR}/lib"
-export OE_QMAKE_LIBS_QT="qte"
-export OE_QMAKE_LIBS_X11=""
-
-oe_qmake_mkspecs () {
- mkdir -p mkspecs/${OE_QMAKE_PLATFORM}
- for f in ${QMAKE_MKSPEC_PATH}/${OE_QMAKE_PLATFORM}/*; do
- if [ -L $f ]; then
- lnk=`readlink $f`
- if [ -f mkspecs/${OE_QMAKE_PLATFORM}/$lnk ]; then
- ln -s $lnk mkspecs/${OE_QMAKE_PLATFORM}/`basename $f`
- else
- cp $f mkspecs/${OE_QMAKE_PLATFORM}/
- fi
- else
- cp $f mkspecs/${OE_QMAKE_PLATFORM}/
- fi
- done
-}
-
diff --git a/classes/qmake.bbclass b/classes/qmake.bbclass
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/classes/qmake.bbclass
diff --git a/classes/qmake.oeclass b/classes/qmake.oeclass
deleted file mode 100644
index 10aa8c9f7d..0000000000
--- a/classes/qmake.oeclass
+++ /dev/null
@@ -1,57 +0,0 @@
-inherit qmake-base
-
-qmake_do_configure() {
- case ${QMAKESPEC} in
- *linux-oe-g++|*linux-uclibc-oe-g++)
- ;;
- *-oe-g++)
- die Unsupported target ${TARGET_OS} for oe-g++ qmake spec
- ;;
- *)
- oenote Searching for qmake spec file
- paths="${QMAKE_MKSPEC_PATH}/qws/${TARGET_OS}-${TARGET_ARCH}-g++"
- paths="${QMAKE_MKSPEC_PATH}/${TARGET_OS}-g++ $paths"
-
- if (echo "${TARGET_ARCH}"|grep -q 'i.86'); then
- paths="${QMAKE_MKSPEC_PATH}/qws/${TARGET_OS}-x86-g++ $paths"
- fi
- for i in $paths; do
- if test -e $i; then
- export QMAKESPEC=$i
- break
- fi
- done
- ;;
- esac
-
- oenote "using qmake spec in ${QMAKESPEC}, using profiles '${QMAKE_PROFILES}'"
-
- if [ -z "${QMAKE_PROFILES}" ]; then
- PROFILES="`ls *.pro`"
- else
- PROFILES="${QMAKE_PROFILES}"
- fi
-
- if [ -z "$PROFILES" ]; then
- die "QMAKE_PROFILES not set and no profiles found in $PWD"
- fi
-
- if [ ! -z "${EXTRA_QMAKEVARS_POST}" ]; then
- AFTER="-after"
- QMAKE_VARSUBST_POST="${EXTRA_QMAKEVARS_POST}"
- oenote "qmake postvar substitution: ${EXTRA_QMAKEVARS_POST}"
- fi
-
- if [ ! -z "${EXTRA_QMAKEVARS_PRE}" ]; then
- QMAKE_VARSUBST_PRE="${EXTRA_QMAKEVARS_PRE}"
- oenote "qmake prevar substitution: ${EXTRA_QMAKEVARS_PRE}"
- fi
-
-#oenote "Calling 'qmake -makefile -spec ${QMAKESPEC} -o Makefile $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST'"
- unset QMAKESPEC || true
- qmake -makefile -spec ${QMAKESPEC} -o Makefile $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST || die "Error calling qmake on $PROFILES"
-}
-
-EXPORT_FUNCTIONS do_configure
-
-addtask configure after do_unpack do_patch before do_compile
diff --git a/classes/qt3x11.bbclass b/classes/qt3x11.bbclass
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/classes/qt3x11.bbclass
diff --git a/classes/qt3x11.oeclass b/classes/qt3x11.oeclass
deleted file mode 100644
index 2a2f3d5bbd..0000000000
--- a/classes/qt3x11.oeclass
+++ /dev/null
@@ -1,11 +0,0 @@
-#
-# override variables set by qmake-base to compile Qt/X11 apps
-#
-export QTDIR="${STAGING_DIR}/${HOST_SYS}/qt3"
-export OE_QMAKE_UIC="${STAGING_BINDIR}/uic3"
-export OE_QMAKE_MOC="${STAGING_BINDIR}/moc3"
-export OE_QMAKE_CXXFLAGS="${CXXFLAGS}"
-export OE_QMAKE_INCDIR_QT="${QTDIR}/include"
-export OE_QMAKE_LIBDIR_QT="${QTDIR}/lib"
-export OE_QMAKE_LIBS_QT="qt"
-export OE_QMAKE_LIBS_X11="-lXext -lX11 -lm"
diff --git a/classes/rm_work.bbclass b/classes/rm_work.bbclass
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/classes/rm_work.bbclass
diff --git a/classes/rootfs_ipk.bbclass b/classes/rootfs_ipk.bbclass
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/classes/rootfs_ipk.bbclass
diff --git a/classes/rootfs_ipk.oeclass b/classes/rootfs_ipk.oeclass
deleted file mode 100644
index 10c4fed119..0000000000
--- a/classes/rootfs_ipk.oeclass
+++ /dev/null
@@ -1,90 +0,0 @@
-#
-# Creates a root filesystem out of IPKs
-#
-# This rootfs can be mounted via root-nfs or it can be put into an cramfs/jffs etc.
-# See image_ipk.oeclass for a usage of this.
-#
-
-DEPENDS_prepend="ipkg-native ipkg-utils-native fakeroot-native "
-DEPENDS_append=" ${EXTRA_IMAGEDEPENDS}"
-
-PACKAGES = ""
-
-do_rootfs[nostamp] = 1
-do_rootfs[dirs] = ${TOPDIR}
-
-IPKG_ARGS = "-f ${T}/ipkg.conf -o ${IMAGE_ROOTFS}"
-
-ROOTFS_POSTPROCESS_COMMAND ?= ""
-
-# some default locales
-IMAGE_LINGUAS ?= "de-de fr-fr en-gb"
-
-LINGUAS_INSTALL = "${@" ".join(map(lambda s: "locale-base-%s" % s, oe.data.getVar('IMAGE_LINGUAS', d, 1).split()))}"
-
-real_do_rootfs () {
- set -x
-
- mkdir -p ${IMAGE_ROOTFS}/dev
-
- rm -f ${DEPLOY_DIR_IPK}/Packages
- touch ${DEPLOY_DIR_IPK}/Packages
- ipkg-make-index -r ${DEPLOY_DIR_IPK}/Packages -p ${DEPLOY_DIR_IPK}/Packages -l ${DEPLOY_DIR_IPK}/Packages.filelist -m ${DEPLOY_DIR_IPK}
- mkdir -p ${T}
- echo "src oe file:${DEPLOY_DIR_IPK}" > ${T}/ipkg.conf
- ipkgarchs="all any noarch ${TARGET_ARCH} ${IPKG_ARCHS} ${MACHINE}"
- priority=1
- for arch in $ipkgarchs; do
- echo "arch $arch $priority" >> ${T}/ipkg.conf
- priority=$(expr $priority + 5)
- done
- ipkg-cl ${IPKG_ARGS} update
- if [ ! -z "${LINGUAS_INSTALL}" ]; then
- ipkg-cl ${IPKG_ARGS} install glibc-localedata-i18n
- for i in ${LINGUAS_INSTALL}; do
- ipkg-cl ${IPKG_ARGS} install $i
- done
- fi
- if [ ! -z "${IPKG_INSTALL}" ]; then
- ipkg-cl ${IPKG_ARGS} install ${IPKG_INSTALL}
- fi
-
- export D=${IMAGE_ROOTFS}
- export IPKG_OFFLINE_ROOT=${IMAGE_ROOTFS}
- mkdir -p ${IMAGE_ROOTFS}/etc/ipkg/
- grep "^arch" ${T}/ipkg.conf >${IMAGE_ROOTFS}/etc/ipkg/arch.conf
-
- for i in ${IMAGE_ROOTFS}/usr/lib/ipkg/info/*.preinst; do
- if [ -f $i ] && ! sh $i; then
- ipkg-cl ${IPKG_ARGS} flag unpacked `basename $i .preinst`
- fi
- done
- for i in ${IMAGE_ROOTFS}/usr/lib/ipkg/info/*.postinst; do
- if [ -f $i ] && ! sh $i configure; then
- ipkg-cl ${IPKG_ARGS} flag unpacked `basename $i .postinst`
- fi
- done
-
- install -d ${IMAGE_ROOTFS}/${sysconfdir}
- echo ${BUILDNAME} > ${IMAGE_ROOTFS}/${sysconfdir}/version
-
- ${ROOTFS_POSTPROCESS_COMMAND}
-}
-
-fakeroot do_rootfs () {
- rm -rf ${IMAGE_ROOTFS}
- real_do_rootfs
-}
-
-# set '*' as the rootpassword so the images
-# can decide if they want it or not
-
-zap_root_password () {
- sed 's%^root:[^:]*:%root:*:%' < ${IMAGE_ROOTFS}/etc/passwd >${IMAGE_ROOTFS}/etc/passwd.new
- mv ${IMAGE_ROOTFS}/etc/passwd.new ${IMAGE_ROOTFS}/etc/passwd
-}
-
-# export the zap_root_password
-EXPORT_FUNCTIONS zap_root_password
-
-addtask rootfs before do_build after do_install
diff --git a/classes/rpm_core.bbclass b/classes/rpm_core.bbclass
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/classes/rpm_core.bbclass
diff --git a/classes/sdk.bbclass b/classes/sdk.bbclass
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/classes/sdk.bbclass
diff --git a/classes/sdk.oeclass b/classes/sdk.oeclass
deleted file mode 100644
index bd49c51225..0000000000
--- a/classes/sdk.oeclass
+++ /dev/null
@@ -1,22 +0,0 @@
-# SDK packages are built either explicitly by the user,
-# or indirectly via dependency. No need to be in 'world'.
-EXCLUDE_FROM_WORLD = "1"
-
-SDK_NAME = "${TARGET_ARCH}/oe"
-PACKAGE_ARCH = "${BUILD_ARCH}"
-
-HOST_ARCH = "${BUILD_ARCH}"
-HOST_VENDOR = "${BUILD_VENDOR}"
-HOST_OS = "${BUILD_OS}"
-HOST_PREFIX = "${BUILD_PREFIX}"
-HOST_CC_ARCH = "${BUILD_CC_ARCH}"
-
-export CPPFLAGS = "${BUILD_CPPFLAGS}"
-export CFLAGS = "${BUILD_CFLAGS}"
-export CXXFLAGS = "${BUILD_CFLAGS}"
-export LDFLAGS = "${BUILD_LDFLAGS}"
-
-prefix = "/usr/local/${SDK_NAME}"
-exec_prefix = "${prefix}"
-
-FILES_${PN} = "${prefix}"
diff --git a/classes/sip.bbclass b/classes/sip.bbclass
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/classes/sip.bbclass
diff --git a/classes/sip.oeclass b/classes/sip.oeclass
deleted file mode 100644
index 837a31675d..0000000000
--- a/classes/sip.oeclass
+++ /dev/null
@@ -1,53 +0,0 @@
-DEPENDS_prepend = "sip4-native python-sip "
-
-#EXTRA_SIPTAGS = "-tWS_QWS -tQtPE_1_6_0 -tQt_2_3_1"
-
-sip_do_generate() {
- if [ -z "${SIP_MODULES}" ]; then
- MODULES="`ls sip/*mod.sip`"
- else
- MODULES="${SIP_MODULES}"
- fi
-
- if [ -z "$MODULES" ]; then
- die "SIP_MODULES not set and no modules found in $PWD"
- else
- oenote "using modules '${SIP_MODULES}' and tags '${EXTRA_SIPTAGS}'"
- fi
-
- if [ -z "${EXTRA_SIPTAGS}" ]; then
- die "EXTRA_SIPTAGS needs to be set!"
- else
- SIPTAGS="${EXTRA_SIPTAGS}"
- fi
-
- if [ ! -z "${SIP_FEATURES}" ]; then
- FEATURES="-z ${SIP_FEATURES}"
- oenote "sip feature file: ${SIP_FEATURES}"
- fi
-
- for module in $MODULES
- do
- install -d ${module}/
- oenote "calling 'sip -I sip -I ${STAGING_SIPDIR} ${SIPTAGS} ${FEATURES} -c ${module} -b ${module}/${module}.pro.in sip/${module}/${module}mod.sip'"
- sip -I ${STAGING_SIPDIR} -I sip ${SIPTAGS} ${FEATURES} -c ${module} -b ${module}/${module}.sbf sip/${module}/${module}mod.sip \
- || die "Error calling sip on ${module}"
- cat ${module}/${module}.sbf | sed s,target,TARGET, \
- | sed s,sources,SOURCES, \
- | sed s,headers,HEADERS, \
- | sed s,"moc_HEADERS =","HEADERS +=", \
- >${module}/${module}.pro
- echo "TEMPLATE=lib" >>${module}/${module}.pro
- [ "${module}" = "qt" ] && echo "" >>${module}/${module}.pro
- [ "${module}" = "qtcanvas" ] && echo "" >>${module}/${module}.pro
- [ "${module}" = "qttable" ] && echo "" >>${module}/${module}.pro
- [ "${module}" = "qwt" ] && echo "" >>${module}/${module}.pro
- [ "${module}" = "qtpe" ] && echo "" >>${module}/${module}.pro
- [ "${module}" = "qtpe" ] && echo "LIBS+=-lqpe" >>${module}/${module}.pro
- true
- done
-}
-
-EXPORT_FUNCTIONS do_generate
-
-addtask generate after do_unpack do_patch before do_configure
diff --git a/classes/split_ipk_feeds.bbclass b/classes/split_ipk_feeds.bbclass
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/classes/split_ipk_feeds.bbclass
diff --git a/classes/split_ipk_feeds.oeclass b/classes/split_ipk_feeds.oeclass
deleted file mode 100644
index 31d46c4948..0000000000
--- a/classes/split_ipk_feeds.oeclass
+++ /dev/null
@@ -1,58 +0,0 @@
-#
-# Splits packages into feeds, depending on the "Section" entry in "Packages"
-#
-
-
-die () {
- echo "split_feed: ERROR: $1"
- exit 1
-}
-
-do_split_feed () {
- test -z "$FEED_PATTERN" && die "No feed pattern in FEED_PATTERN"
- test -z "$FEED_NAME" && die "No feed name in FEED_NAME"
- test -z "${DEPLOY_DIR_IPK}" && die "DEPLOY_DIR_IPK is empty, how do you do that?"
-
- echo "Rebuilding [${DEPLOY_DIR_IPK}/Packages]"
- touch ${DEPLOY_DIR_IPK}/Packages
- ipkg-make-index -r ${DEPLOY_DIR_IPK}/Packages -p ${DEPLOY_DIR_IPK}/Packages -l ${DEPLOY_DIR_IPK}/Packages.filelist -m ${DEPLOY_DIR_IPK}
-
- echo "Working on pattern [$FEED_PATTERN] for feed [$FEED_NAME]"
-
- # Don't we all love sed?
- cat "${DEPLOY_DIR_IPK}/Packages" |sed -n "/^Section/s/Section\:\ //p;/^Package/s/Package\:\ //p" |sed '$!N;s/\n/ /;s/\(.*\)\ \(.*\)/\2 \1/'| sort | egrep -i -- "$FEED_PATTERN" > feed-content.tmp
-
- if ! test -z "$EXCLUDE_FROM_FEED"
- then
- cat feed-content.tmp | egrep -iv -- "$EXCLUDE_FROM_FEED" | sed -n "s/\(.*\)\ \(.*\)/\2/p" > feed-content.tmp2
- else
- cat feed-content.tmp | sed -n "s/\(.*\)\ \(.*\)/\2/p" > feed-content.tmp2
- fi
- rm feed-content.tmp ; mv feed-content.tmp2 feed-content.tmp
-
- if ! test -d ${DEPLOY_DIR_IPK}/${FEED_NAME}
- then
- mkdir -p ${DEPLOY_DIR_IPK}/${FEED_NAME}
- else
- test "${DEPLOY_DIR_IPK}/${FEED_NAME}" = "/" && die "EMERGENCY BAIL-OUT"
- rm -rf ${DEPLOY_DIR_IPK}/${FEED_NAME}
- mkdir -p ${DEPLOY_DIR_IPK}/${FEED_NAME}
- fi
-
- for package in `cat feed-content.tmp`
- do
- cp ${DEPLOY_DIR_IPK}/${package}_*.ipk ${DEPLOY_DIR_IPK}/${FEED_NAME}
- done
-
- touch ${DEPLOY_DIR_IPK}/${FEED_NAME}/Packages
- ipkg-make-index -r ${DEPLOY_DIR_IPK}/${FEED_NAME}/Packages -p ${DEPLOY_DIR_IPK}/${FEED_NAME}/Packages -l ${DEPLOY_DIR_IPK}/${FEED_NAME}/Packages.filelist -m ${DEPLOY_DIR_IPK}/${FEED_NAME} || die "ipkg-make-index failed!" && echo "Packages done"
-
- echo "###"
- test -d ${DEPLOY_DIR_IPK}/${FEED_NAME}/morgue && rm -rf ${DEPLOY_DIR_IPK}/${FEED_NAME}/morgue
- echo "###"
-}
-
-addtask split_feed before do_build
-
-# Feed splitting should be done explicitly, not as part of world
-EXCLUDE_FROM_WORLD = "1"
diff --git a/classes/src_distribute.bbclass b/classes/src_distribute.bbclass
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/classes/src_distribute.bbclass
diff --git a/classes/src_distribute.oeclass b/classes/src_distribute.oeclass
deleted file mode 100644
index 9b10cd6986..0000000000
--- a/classes/src_distribute.oeclass
+++ /dev/null
@@ -1,41 +0,0 @@
-include conf/licenses.conf
-
-SRC_DISTRIBUTECOMMAND[func] = "1"
-python do_distribute_sources () {
- import copy
- l = copy.deepcopy(d)
- oe.data.update_data(l)
- licenses = (oe.data.getVar('LICENSE', d, 1) or "").split()
- if not licenses:
- oe.note("LICENSE not defined")
- src_distribute_licenses = (oe.data.getVar('SRC_DISTRIBUTE_LICENSES', d, 1) or "").split()
- # Explanation:
- # Space seperated items in LICENSE must *all* be distributable
- # Each space seperated item may be used under any number of | seperated licenses.
- # If any of those | seperated licenses are distributable, then that component is.
- # i.e. LICENSE = "GPL LGPL"
- # In this case, both components are distributable.
- # LICENSE = "GPL|QPL|Proprietary"
- # In this case, GPL is distributable, so the component is.
- valid = 1
- for l in licenses:
- lvalid = 0
- for i in l.split("|"):
- if i in src_distribute_licenses:
- lvalid = 1
- if lvalid != 1:
- valid = 0
- if valid == 0:
- oe.note("Licenses (%s) are not all listed in SRC_DISTRIBUTE_LICENSES, skipping source distribution" % licenses)
- return
- import re
- for s in (oe.data.getVar('A', d, 1) or "").split():
- s = re.sub(';.*$', '', s)
- cmd = oe.data.getVar('SRC_DISTRIBUTECOMMAND', d, 1)
- if not cmd:
- raise oe.build.FuncFailed("Unable to distribute sources, SRC_DISTRIBUTECOMMAND not defined")
- oe.data.setVar('SRC', s, d)
- oe.build.exec_func('SRC_DISTRIBUTECOMMAND', d)
-}
-
-addtask distribute_sources before do_build after do_fetch
diff --git a/classes/src_distribute_local.bbclass b/classes/src_distribute_local.bbclass
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/classes/src_distribute_local.bbclass
diff --git a/classes/src_distribute_local.oeclass b/classes/src_distribute_local.oeclass
deleted file mode 100644
index 5f0cef5bec..0000000000
--- a/classes/src_distribute_local.oeclass
+++ /dev/null
@@ -1,31 +0,0 @@
-inherit src_distribute
-
-# SRC_DIST_LOCAL possible values:
-# copy copies the files from ${A} to the distributedir
-# symlink symlinks the files from ${A} to the distributedir
-# move+symlink moves the files into distributedir, and symlinks them back
-SRC_DIST_LOCAL ?= "move+symlink"
-SRC_DISTRIBUTEDIR ?= "${DEPLOY_DIR}/sources"
-SRC_DISTRIBUTECOMMAND () {
- s="${SRC}"
- if [ ! -L "$s" ] && (echo "$s"|grep "^${DL_DIR}"); then
- :
- else
- exit 0;
- fi
- mkdir -p ${SRC_DISTRIBUTEDIR}
- case "${SRC_DIST_LOCAL}" in
- copy)
- test -e $s.md5 && cp -f $s.md5 ${SRC_DISTRIBUTEDIR}/
- cp -f $s ${SRC_DISTRIBUTEDIR}/
- ;;
- symlink)
- test -e $s.md5 && ln -sf $s.md5 ${SRC_DISTRIBUTEDIR}/
- ln -sf $s ${SRC_DISTRIBUTEDIR}/
- ;;
- move+symlink)
- mv $s ${SRC_DISTRIBUTEDIR}/
- ln -sf ${SRC_DISTRIBUTEDIR}/`basename $s` $s
- ;;
- esac
-}
diff --git a/classes/tmake.bbclass b/classes/tmake.bbclass
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/classes/tmake.bbclass
diff --git a/classes/update-alternatives.bbclass b/classes/update-alternatives.bbclass
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/classes/update-alternatives.bbclass
diff --git a/classes/update-alternatives.oeclass b/classes/update-alternatives.oeclass
deleted file mode 100644
index 9ac1de1143..0000000000
--- a/classes/update-alternatives.oeclass
+++ /dev/null
@@ -1,33 +0,0 @@
-# defaults
-ALTERNATIVE_PRIORITY = "10"
-ALTERNATIVE_LINK = "${bindir}/${ALTERNATIVE_NAME}"
-
-update_alternatives_postinst() {
-update-alternatives --install ${ALTERNATIVE_LINK} ${ALTERNATIVE_NAME} ${ALTERNATIVE_PATH} ${ALTERNATIVE_PRIORITY}
-}
-
-update_alternatives_postrm() {
-update-alternatives --remove ${ALTERNATIVE_NAME} ${ALTERNATIVE_PATH}
-}
-
-python __anonymous() {
- if oe.data.getVar('ALTERNATIVE_NAME', d) == None:
- raise oe.build.FuncFailed, "%s inherits update-alternatives but doesn't set ALTERNATIVE_NAME" % oe.data.getVar('FILE', d)
- if oe.data.getVar('ALTERNATIVE_PATH', d) == None:
- raise oe.build.FuncFailed, "%s inherits update-alternatives but doesn't set ALTERNATIVE_PATH" % oe.data.getVar('FILE', d)
-}
-
-python populate_packages_prepend () {
- pkg = oe.data.getVar('PN', d, 1)
- oe.note('adding update-alternatives calls to postinst/postrm for %s' % pkg)
- postinst = oe.data.getVar('pkg_postinst_%s' % pkg, d, 1) or oe.data.getVar('pkg_postinst', d, 1)
- if not postinst:
- postinst = '#!/bin/sh\n'
- postinst += oe.data.getVar('update_alternatives_postinst', d, 1)
- oe.data.setVar('pkg_postinst_%s' % pkg, postinst, d)
- postrm = oe.data.getVar('pkg_postrm_%s' % pkg, d, 1) or oe.data.getVar('pkg_postrm', d, 1)
- if not postrm:
- postrm = '#!/bin/sh\n'
- postrm += oe.data.getVar('update_alternatives_postrm', d, 1)
- oe.data.setVar('pkg_postrm_%s' % pkg, postrm, d)
-}
diff --git a/classes/update-rc.d.bbclass b/classes/update-rc.d.bbclass
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/classes/update-rc.d.bbclass
diff --git a/classes/update-rc.d.oeclass b/classes/update-rc.d.oeclass
deleted file mode 100644
index 6e1ce007ac..0000000000
--- a/classes/update-rc.d.oeclass
+++ /dev/null
@@ -1,47 +0,0 @@
-DEPENDS_append = " update-rc.d"
-RDEPENDS_append = " update-rc.d"
-
-INIT_D_DIR = "${sysconfdir}/init.d"
-
-updatercd_postinst() {
-if test "x$D" != "x"; then
- D="-r $D"
-else
- D="-s"
-fi
-update-rc.d $D ${INITSCRIPT_NAME} ${INITSCRIPT_PARAMS}
-}
-
-updatercd_postrm() {
-if test "x$D" != "x"; then
- D="-r $D"
-else
- ${INIT_D_DIR}/${INITSCRIPT_NAME} stop
-fi
-update-rc.d $D ${INITSCRIPT_NAME} remove
-}
-
-python __anonymous() {
- if oe.data.getVar('INITSCRIPT_NAME', d) == None:
- raise oe.build.FuncFailed, "%s inherits update-rc.d but doesn't set INITSCRIPT_NAME" % oe.data.getVar('FILE', d)
- if oe.data.getVar('INITSCRIPT_PARAMS', d) == None:
- raise oe.build.FuncFailed, "%s inherits update-rc.d but doesn't set INITSCRIPT_PARAMS" % oe.data.getVar('FILE', d)
-}
-
-python populate_packages_prepend () {
- pkg = oe.data.getVar('PN', d, 1)
- packages = (oe.data.getVar('PACKAGES', d, 1) or "").split()
- if not pkg in packages:
- pkg = packages[0]
- oe.note('adding update-rc.d calls to postinst/postrm for %s' % pkg)
- postinst = oe.data.getVar('pkg_postinst_%s' % pkg, d, 1) or oe.data.getVar('pkg_postinst', d, 1)
- if not postinst:
- postinst = '#!/bin/sh\n'
- postinst += oe.data.getVar('updatercd_postinst', d, 1)
- oe.data.setVar('pkg_postinst_%s' % pkg, postinst, d)
- postrm = oe.data.getVar('pkg_postrm_%s' % pkg, d, 1) or oe.data.getVar('pkg_postrm', d, 1)
- if not postrm:
- postrm = '#!/bin/sh\n'
- postrm += oe.data.getVar('updatercd_postrm', d, 1)
- oe.data.setVar('pkg_postrm_%s' % pkg, postrm, d)
-}
diff --git a/classes/xfce.bbclass b/classes/xfce.bbclass
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/classes/xfce.bbclass
diff --git a/classes/xfce.oeclass b/classes/xfce.oeclass
deleted file mode 100644
index 328b701f99..0000000000
--- a/classes/xfce.oeclass
+++ /dev/null
@@ -1,15 +0,0 @@
-# xfce.oeclass
-# Copyright (C) 2004, Advanced Micro Devices, Inc. All Rights Reserved
-# Released under the MIT license (see packages/COPYING)
-
-# Global class to make it easier to maintain XFCE packages
-
-HOMEPAGE="http://www.xfce.org"
-LICENSE="LGPL-2"
-
-SRC_URI="http://hannelore.f1.fhtw-berlin.de/mirrors/xfce4/xfce-${PV}/src/${PN}-${PV}.tar.gz"
-
-# Most, but not *all* packages use pkgconfig, so we can't include it here
-# too
-
-inherit autotools