From: Rene Wagner Date: Sun, 21 May 2006 12:09:43 +0000 (+0200) Subject: contrib: drop unused (and buggy) buildscripts X-Git-Tag: familiar-v0.8.4-rc3~76 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=93d3b2f663f5dd6e23a059f159b8f3e4b3426b2d;p=familiar-h63xx-build.git contrib: drop unused (and buggy) buildscripts Signed-off-by: Rene Wagner --- diff --git a/org.handhelds.familiar/contrib/buildscripts/familiar/build-fam.sh b/org.handhelds.familiar/contrib/buildscripts/familiar/build-fam.sh deleted file mode 100755 index 8c39c9f..0000000 --- a/org.handhelds.familiar/contrib/buildscripts/familiar/build-fam.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -#jornada56x and jornada7xx don't build -for i in h3600 h3900 h2200 h6300 ipaq-pxa270 simpad ; do - echo "MACHINE = \"$i\"" > conf/auto.conf - bitbake nano fuse fuse-module bitbake kernel-module-wlags49-h1-cs kernel-module-wlags49-h2-cs -k - echo "bitbaking $i" - #clean .bbs which emit multiple packages which don't all have the same arch - bitbake -c clean matchbox-panel task-bootstrap meta-gpe meta-opie gpe-image opie-image sysvinit tslib base-passwd prism3-support opie-button-settings - bitbake bootstrap-image ; bitbake gpe-image ; bitbake opie-image ; done - -echo "MACHINE = \"h3600\"" > conf/auto.conf -bitbake meta-sdk - diff --git a/org.handhelds.familiar/contrib/buildscripts/openzaurus/build-oz.sh b/org.handhelds.familiar/contrib/buildscripts/openzaurus/build-oz.sh deleted file mode 100644 index b1ce4bf..0000000 --- a/org.handhelds.familiar/contrib/buildscripts/openzaurus/build-oz.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash - -for machine in collie c7x0 borzoi poodle tosa akita spitz ; -do - echo "MACHINE = \"$machine\"" > conf/auto.conf - echo "MACHINE = \"$machine\"" - -# clean recipes which: -# - emit multiple packages which don't all have the same arch -# - depend on virtual/kernel in some way - bitbake -c clean matchbox-panel task-bootstrap meta-gpe meta-opie gpe-image \ - opie-image pivotroot-image sysvinit tslib base-passwd \ - opie-button-settings zaurus-updater virtual/kernel initscripts \ - keymaps base-files hostap-modules orinoco-modules \ - kernel-module-wlags49-h1-cs kernel-module-wlags49-h2-cs - - if [ $machine == "collie" ]; then - bitbake -c openzaurus-sa collie-kernel-24-8 collie-kernel-32-0 \ - collie-kernel-32-32 collie-kernel-40-24 collie-kernel-48-16 \ - collie-kernel-58-6 collie-kernel-64-0 - fi - - if [ $machine == "poodle" ]; then - bitbake -c openzaurus-pxa poodle-kernel poodle255-kernel poodle-kernels - fi - - bitbake nano bitbake kernel-module-wlags49-h1-cs kernel-module-wlags49-h2-cs -k - - if [ $machine == "spitz" ]; then - bitbake bootstrap-image gpe-image opie-image pivotboot-image e-image e-image-core - else - bitbake bootstrap-image gpe-image opie-image e-image e-image-core - fi -done - -echo "MACHINE = \"collie\"" > conf/auto.conf -bitbake meta-sdk - diff --git a/org.handhelds.familiar/contrib/buildscripts/openzaurus/feed-split/ipkg-split-feeds-koen-subfeeds b/org.handhelds.familiar/contrib/buildscripts/openzaurus/feed-split/ipkg-split-feeds-koen-subfeeds deleted file mode 100644 index a11e1aa..0000000 --- a/org.handhelds.familiar/contrib/buildscripts/openzaurus/feed-split/ipkg-split-feeds-koen-subfeeds +++ /dev/null @@ -1,152 +0,0 @@ -#!/usr/bin/python2.3 -# Given a Package and a package, write a script which copies -# the packages into a 'base' feed and 'x' feed. - -import sys, os -import ipkg -import getopt -import re -import stat - -sys.stderr.write("Remember now, this program doesn't copy package-specific files correctly\n") -progname = os.path.basename(sys.argv[0]) -verbose = 0 - -def usage(): - sys.stderr.write("%s [-h] Packages basefeed xfeed ofeed \n" % (progname)) - sys.exit(-1) - -(opts, remaining_args) = getopt.getopt(sys.argv[1:], "hv") -for (optkey, optval) in opts: - if optkey == '-h': - usage() - if optkey == '-v': - verbose = 1 - -if len(remaining_args) != 4: - usage() - -packagefiles, basefeed, xfeed, ofeed = remaining_args - -packagedir = os.path.dirname(packagefiles) - -pkgs = ipkg.Packages() -for p in packagefiles.split(','): - pkgs.read_packages_file(p) - -package = None - -alldepends = {} - -print pkgs.packages.keys() -for name in pkgs.packages.keys(): - depends = pkgs.packages[name].depends - alldepends[name] = [] - if depends: - for d1 in depends.split(","): - d1 = re.sub(r'\(.*?\)', '', d1) - for depend in d1.split(" "): - alldepends[name].append(depend) - alldepends[name] = filter(None, alldepends[name]) - # for 'provides:', create a duplicate name. Merge all packages. - provides = pkgs.packages[name].provides - if provides: - p1 = re.sub(r' +', '', provides) - for p2 in p1.split(','): - if alldepends.has_key(p2): - for pkg in alldepends[name]: - if not pkg in alldepends[p2]: - alldepends[p2].append(pkg) - else: - alldepends[p2] = alldepends[name] - #print name,alldepends[name] - -def add_depends(p): - skip = 0 - if not len(p): - print "# got led to a null package name" - return 1 - if not alldepends.has_key(p): - print "# %s not found in Packages" % p - return 0 - for p1 in alldepends[p]: - if not len(p1): - print "# found a null package name in alldepends", p, alldepends[p] - elif skip: - skip = 0 - elif p1 == '|':# choose the first of alternative packages. - skip = 1 - elif p1[-1] == '*': - searchfor = p1[0:-1] - searchforlen = len(searchfor) - for p2 in pkgs.packages.keys(): - if p2[0:searchforlen] == searchfor: - depends.append(p2) - break # any one will do. - else: - if not p1 in depends: - depends.append(p1) - if not add_depends(p1): return 0 - return 1 - -def get_target_in_subfeeds (subfeeds, target, package): - for regex, (match_group, sub_target) in subfeeds.items(): - if match_group: - m = re.match (regex, package) - if m: - sub_target_extra_qualifier = m.group(1) - return os.path.join (target, sub_target % (sub_target_extra_qualifier)) - else: - if re.match (regex, package): - return os.path.join (target, sub_target) - return target - -packages = pkgs.packages.keys() -packages.sort() - -subfeeds = {".*-dev(_.*)?":(False, "dev"),".*-locale-(.*)(_.*)?":(True, "locale/%s"), ".*-doc(_.*)?":(False, "doc")} - -for p in packages: - depends = [] - if not add_depends(p): - print "# dropping %s" % p - print "# ",pkgs.packages[p].maintainer - continue - if verbose: print '# package:',p,' depends on:', depends - - x = p.startswith('gpe-') - x += p.startswith('gconv-') - x += p.startswith('gtk') - x += p.startswith('xserver') - x += 'libx11-6' in depends - x += 'gtk+' in depends - x += 'xserver' in depends - - o = p.startswith('opie') - o += p.startswith('qt') - o += p.startswith('qp') - o += 'libqte1' in depends - o += 'libqte2' in depends - o += 'libqpe1' in depends - - if x: - tofn = get_target_in_subfeeds (subfeeds, xfeed, p) - elif o: - tofn = get_target_in_subfeeds (subfeeds, ofeed, p) - else: - tofn = get_target_in_subfeeds (subfeeds, basefeed, p) - - - fromfn = os.path.join(packagedir, pkgs.packages[p].filename) - tofn = os.path.join(tofn, pkgs.packages[p].filename) - fromstat = os.stat(fromfn) - - try: - tostat = os.stat(tofn) - except: - tostat = None - - if 0 or (not tostat or tostat[stat.ST_SIZE] != fromstat[stat.ST_SIZE] or - tostat[stat.ST_MTIME] != fromstat[stat.ST_MTIME]): - print "mkdir -p `dirname %s`" % (tofn) - print "cp -af ",fromfn,tofn diff --git a/org.handhelds.familiar/contrib/buildscripts/openzaurus/feed-split/ipkg.py b/org.handhelds.familiar/contrib/buildscripts/openzaurus/feed-split/ipkg.py deleted file mode 100644 index e852a2c..0000000 --- a/org.handhelds.familiar/contrib/buildscripts/openzaurus/feed-split/ipkg.py +++ /dev/null @@ -1,391 +0,0 @@ -#!/usr/bin/env python -# Copyright (C) 2001 Alexander S. Guy -# Andern Research Labs -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. */ -# -# Copyright 2001, Russell Nelson -# Added reading in of packages. -# Added missing package information fields. -# Changed render_control() to __repr__(). -# -# Current Issues: -# The API doesn't validate package information fields. It should be -# throwing exceptions in the right places. -# Executions of tar could silently fail. -# Executions of tar *do* fail, and loudly, because you have to specify a full filename, -# and tar complains if any files are missing, and the ipkg spec doesn't require -# people to say "./control.tar.gz" or "./control" when they package files. -# It would be much better to require ./control or disallow ./control (either) -# rather than letting people pick. Some freedoms aren't worth their cost. - -import tempfile -import os -import sys -import glob -import md5 -import re -import string -import commands -from stat import ST_SIZE - -class Package: - """A class for creating objects to manipulate (e.g. create) ipkg - packages.""" - def __init__(self, fn=None): - self.package = None - self.version = None - self.architecture = None - self.maintainer = None - self.source = None - self.description = None - self.depends = None - self.provides = None - self.replaces = None - self.conflicts = None - self.recommends = None - self.suggests = None - self.section = None - self.filename_header = None - self.file_list = [] - self.md5 = None - self.size = None - self.installed_size = None - self.filename = None - self.isdeb = 0 - - if fn: - # see if it is deb format - f = open(fn, "r") - magic = f.read(4) - f.close() - if (magic == "! '2': - # when using Python 2.0 or newer - self.md5 = sum.hexdigest() - else: - self.md5 = string.join(map((lambda x:"%02x" % ord(x)),sum.digest()),'') - stat = os.stat(fn) - self.size = stat[ST_SIZE] - self.filename = os.path.basename(fn) - ## sys.stderr.write(" extracting control.tar.gz from %s\n"% (fn,)) - if self.isdeb: - control = os.popen("ar p "+fn+" control.tar.gz | tar xfzO - '*control'","r") - else: - control = os.popen("tar xfzO "+fn+" '*control.tar.gz' | tar xfzO - '*control'","r") - line = control.readline() - while 1: - if not line: break - line = string.rstrip(line) - lineparts = re.match(r'([\w-]*?):\s*(.*)', line) - if lineparts: - name = string.lower(lineparts.group(1)) - value = lineparts.group(2) - while 1: - line = control.readline() - if not line: break - if line[0] != ' ': break - line = string.rstrip(line) - value = value + '\n' + line - # don't allow package to override its own filename - if name == "filename": - self.filename_header = value - else: - if self.__dict__.has_key(name): - self.__dict__[name] = value - else: - line = control.readline() - control.close() - if self.isdeb: - data = os.popen("ar p "+fn+" data.tar.gz | tar tfz -","r") - else: - data = os.popen("tar xfzO "+fn+" '*data.tar.gz' | tar tfz -","r") - while 1: - line = data.readline() - if not line: break - self.file_list.append(string.rstrip(line)) - data.close() - - self.scratch_dir = None - self.file_dir = None - self.meta_dir = None - - def read_control(self, control): - import os - - line = control.readline() - while 1: - if not line: break - line = string.rstrip(line) - lineparts = re.match(r'([\w-]*?):\s*(.*)', line) - if lineparts: - name = string.lower(lineparts.group(1)) - value = lineparts.group(2) - while 1: - line = control.readline() - if not line: break - if line[0] != ' ': break - value = value + '\n' + line - if name == 'size': - self.size = int(value) - elif self.__dict__.has_key(name): - self.__dict__[name] = value - if line[0] == '\n': - return # consumes one blank line at end of package descriptoin - else: - line = control.readline() - pass - return - - def _setup_scratch_area(self): - self.scratch_dir = "%s/%sipkg" % (tempfile.gettempdir(), - tempfile.gettempprefix()) - self.file_dir = "%s/files" % (self.scratch_dir) - self.meta_dir = "%s/meta" % (self.scratch_dir) - - os.mkdir(self.scratch_dir) - os.mkdir(self.file_dir) - os.mkdir(self.meta_dir) - - def set_package(self, package): - self.package = package - - def get_package(self): - return self.package - - def set_version(self, version): - self.version = version - - def get_version(self): - return self.version - - def set_architecture(self, architecture): - self.architecture = architecture - - def get_architecture(self): - return self.architecture - - def set_maintainer(self, maintainer): - self.maintainer = maintainer - - def get_maintainer(self): - return self.maintainer - - def set_source(self, source): - self.source = source - - def get_source(self): - return self.source - - def set_description(self, description): - self.description = description - - def get_description(self): - return self.description - - def set_depends(self, depends): - self.depends = depends - - def get_depends(self, depends): - return self.depends - - def set_provides(self, provides): - self.provides = provides - - def get_provides(self, provides): - return self.provides - - def set_replaces(self, replaces): - self.replaces = replaces - - def get_replaces(self, replaces): - return self.replaces - - def set_conflicts(self, conflicts): - self.conflicts = conflicts - - def get_conflicts(self, conflicts): - return self.conflicts - - def set_suggests(self, suggests): - self.suggests = suggests - - def get_suggests(self, suggests): - return self.suggests - - def set_section(self, section): - self.section = section - - def get_section(self, section): - return self.section - - def get_file_list(self): - return self.file_list - - def write_package(self, dirname): - buf = self.render_control() - file = open("%s/control" % self.meta_dir, 'w') - file.write(buf) - - self._setup_scratch_area() - cmd = "cd %s ; tar cvfz %s/control.tar.gz control" % (self.meta_dir, - self.scratch_dir) - - cmd_out, cmd_in, cmd_err = os.popen3(cmd) - - while cmd_err.readline() != "": - pass - - cmd_out.close() - cmd_in.close() - cmd_err.close() - - bits = "control.tar.gz" - - if self.file_list: - cmd = "cd %s ; tar cvfz %s/data.tar.gz" % (self.file_dir, - self.scratch_dir) - - cmd_out, cmd_in, cmd_err = os.popen3(cmd) - - while cmd_err.readline() != "": - pass - - cmd_out.close() - cmd_in.close() - cmd_err.close() - - bits = bits + " data.tar.gz" - - file = "%s_%s_%s.ipk" % (self.package, self.version, self.architecture) - cmd = "cd %s ; tar cvfz %s/%s %s" % (self.scratch_dir, - dirname, - file, - bits) - - cmd_out, cmd_in, cmd_err = os.popen3(cmd) - - while cmd_err.readline() != "": - pass - - cmd_out.close() - cmd_in.close() - cmd_err.close() - - def __repr__(self): - out = "" - - # XXX - Some checks need to be made, and some exceptions - # need to be thrown. -- a7r - - if self.package: out = out + "Package: %s\n" % (self.package) - if self.version: out = out + "Version: %s\n" % (self.version) - if self.depends: out = out + "Depends: %s\n" % (self.depends) - if self.provides: out = out + "Provides: %s\n" % (self.provides) - if self.replaces: out = out + "Replaces: %s\n" % (self.replaces) - if self.conflicts: out = out + "Conflicts: %s\n" % (self.conflicts) - if self.suggests: out = out + "Suggests: %s\n" % (self.suggests) - if self.recommends: out = out + "Recommends: %s\n" % (self.recommends) - if self.section: out = out + "Section: %s\n" % (self.section) - if self.architecture: out = out + "Architecture: %s\n" % (self.architecture) - if self.maintainer: out = out + "Maintainer: %s\n" % (self.maintainer) - if self.md5: out = out + "MD5Sum: %s\n" % (self.md5) - if self.size: out = out + "Size: %d\n" % int(self.size) - if self.installed_size: out = out + "InstalledSize: %d\n" % int(self.installed_size) - if self.filename: out = out + "Filename: %s\n" % (self.filename) - if self.source: out = out + "Source: %s\n" % (self.source) - if self.description: out = out + "Description: %s\n" % (self.description) - out = out + "\n" - - return out - - def __del__(self): - # XXX - Why is the `os' module being yanked out before Package objects - # are being destroyed? -- a7r - pass - -class Packages: - """A currently unimplemented wrapper around the ipkg utility.""" - def __init__(self): - self.packages = {} - return - - def add_package(self, pkg): - package = pkg.package - arch = pkg.architecture - #name = ("%s:%s" % (package, arch)) - name = ("%s" % (package)) - if (not self.packages.has_key(name)): - self.packages[name] = pkg - (s, outtext) = commands.getstatusoutput("ipkg-compare-versions %s '>' %s" % (pkg.version, self.packages[name].version)) - if (s == 0): - self.packages[name] = pkg - return 0 - else: - return 1 - - def read_packages_file(self, fn): - f = open(fn, "r") - while 1: - pkg = Package() - pkg.read_control(f) - if pkg.get_package(): - self.add_package(pkg) - else: - break - f.close() - return - - def write_packages_file(self, fn): - f = open(fn, "w") - names = self.packages.keys() - names.sort() - for name in names: - f.write(self.packages[name].__repr__()) - return - - def keys(self): - return self.packages.keys() - - def __getitem__(self, key): - return self.packages[key] - -if __name__ == "__main__": - package = Package() - - package.set_package("FooBar") - package.set_version("0.1-fam1") - package.set_architecture("arm") - package.set_maintainer("Testing ") - package.set_depends("libc") - package.set_description("A test of the APIs.") - - print "<" - sys.stdout.write(package) - print ">" - - package.write_package("/tmp") - diff --git a/org.handhelds.familiar/contrib/buildscripts/openzaurus/feed-split/split-world.sh b/org.handhelds.familiar/contrib/buildscripts/openzaurus/feed-split/split-world.sh deleted file mode 100644 index 26abd00..0000000 --- a/org.handhelds.familiar/contrib/buildscripts/openzaurus/feed-split/split-world.sh +++ /dev/null @@ -1,81 +0,0 @@ -#!/bin/bash -FEED_BASEDIR=`pwd` - -mkdir -p base x11 opie locale perl python - -cd world - -#moving armv5te files out of the way -#rm *armv5te* -f - -#regenerate Package index -echo "regenerating world index" -rm Packages* -f ; ipkg-make-index -p Packages -l Packages.filelist -L ../locale -v . ; mv Packages Packages.old ; rm Packages.gz -f ; grep -v Source Packages.old > Packages ; gzip -c9 Packages >Packages.gz ; rm Packages.old -f - -cd $FEED_BASEDIR - -#produce a splitscript -echo "making a splitscript" -python ipkg-split-feeds-koen-subfeeds world/Packages base/ x11/ opie/ > dump - -echo "moving machine files out of the way" -for machine in collie c7x0 akita borzoi tosa poodle spitz ; -do - mkdir -p machine/$machine - mv world/*_$machine.ipk machine/$machine/ -done - -echo "executing split script" -cat dump | sed -e '1d' | sh - -mv base/dev/* base/ -mv base/doc/* base/ - -mv base/perl* perl/ -mv base/locale/*/perl* perl/ -mv base/python* python/ - -mv opie/dev/* opie/ -mv opie/doc/* opie/ - -mv x11/dev/* x11/ -mv x11/doc/* x11/ - -rm -rf base/doc base/dev base/locale -rm -rf opie/doc opie/dev -rm -rf x11/doc x11/dev - - -#regenerate indices for the rest of the feeds -echo "rebuilding final indices" -for feed in base x11 opie perl python ; -do - cd $feed ; - rm Packages* -f ; - ipkg-make-index -p Packages -l Packages.filelist -L ../locale -m . ; mv Packages Packages.old ; rm Packages.gz -f ; grep -v Source Packages.old > Packages ; gzip -c9 Packages >Packages.gz ; rm Packages.old -f - cd $FEED_BASEDIR -done - -cd $FEED_BASEDIR - -cd machine -for feed in * ; -do - cd $feed ; - rm Packages* -f ; - ipkg-make-index -p Packages -l Packages.filelist -L ../locale -m . ; mv Packages Packages.old ; rm Packages.gz -f ; grep -v Source Packages.old > Packages ; gzip -c9 Packages >Packages.gz ; rm Packages.old -f - cd .. -done - -cd $FEED_BASEDIR - -cd locale -for feed in * ; -do - cd $feed ; - rm Packages* -f ; - ipkg-make-index -p Packages -l Packages.filelist -m . ; mv Packages Packages.old ; rm Packages.gz -f ; grep -v Source Packages.old > Packages ; gzip -c9 Packages >Packages.gz ; rm Packages.old -f - cd .. -done - -cd $FEED_BASEDIR