rendered paste body#!/bin/sh -e
export localstatedir="/var"
export prefix="/usr"
export CPP="armeb-linux-gcc -E"
export mandir="/usr/share/man"
export STRIP="armeb-linux-strip"
export STAGING_SIPDIR="/myth/slug/dev/slugos/tmp/staging/i686-linux/usr/share/sip"
export PKG_CONFIG_SYSROOT_DIR="/myth/slug/dev/slugos/tmp/staging/armeb-linux"
export BUILD_CC="gcc"
export CONFIG_SITE="/myth/slug/dev/slugos/openembedded/site/endian-big /myth/slug/dev/slugos/openembedded/site/common-linux /myth/slug/dev/slugos/openembedded/site/common-glibc /myth/slug/dev/slugos/openembedded/site/arm-common /myth/slug/dev/slugos/openembedded/site/armeb-linux /myth/slug/dev/slugos/openembedded/site/common /myth/slug/dev/slugos/openembedded/site/common"
export BUILD_CXXFLAGS="-isystem/myth/slug/dev/slugos/tmp/staging/i686-linux/usr/include -O2 -fpermissive"
export OBJCOPY="armeb-linux-objcopy"
export AR="armeb-linux-ar"
export sharedstatedir="/usr/com"
export libexecdir="/usr/libexec"
export QTDIR="/myth/slug/dev/slugos/tmp/staging/armeb-linux/qt2"
export datadir="/usr/share"
export RANLIB="armeb-linux-ranlib"
export PSTAGING_ACTIVE="0"
export BUILD_CXX="g++"
export sysconfdir="/etc"
export LD="armeb-linux-ld"
export bindir="/usr/bin"
export TARGET_CXXFLAGS="-isystem/myth/slug/dev/slugos/tmp/staging/armeb-linux/usr/include -fexpensive-optimizations -fomit-frame-pointer -frename-registers -Os -fpermissive"
export MAKE="make"
export includedir="/usr/include"
export TARGET_CPPFLAGS="-isystem/myth/slug/dev/slugos/tmp/staging/armeb-linux/usr/include"
export MANIFEST="/myth/slug/dev/slugos/openembedded/packages/apcupsd/apcupsd-3.14.3/./manifest"
export OPIEDIR="/myth/slug/dev/slugos/tmp/staging/armeb-linux"
export LDFLAGS="-L/myth/slug/dev/slugos/tmp/staging/armeb-linux/usr/lib -Wl,-rpath-link,/myth/slug/dev/slugos/tmp/staging/armeb-linux/usr/lib -Wl,-O1"
export BUILD_LDFLAGS="-L/myth/slug/dev/slugos/tmp/staging/i686-linux/usr/lib -Wl,-rpath-link,/myth/slug/dev/slugos/tmp/staging/i686-linux/usr/lib -Wl,-rpath,/myth/slug/dev/slugos/tmp/staging/i686-linux/usr/lib -Wl,-O1"
unset TARGET_ARCH
export BUILD_F77="g77"
export OBJDUMP="armeb-linux-objdump"
export BUILD_LD="ld"
export oldincludedir="/usr/include"
export CCLD="armeb-linux-gcc -march=armv5te -mtune=xscale -mthumb-interwork -mno-thumb"
export SHELLCMDS="bash --rcfile $TERMRCFILE"
export QPEDIR="/myth/slug/dev/slugos/tmp/staging/armeb-linux"
export BUILD_CCLD="gcc"
export BBPATH="/myth/slug/dev/slugos/openembedded/packages/apcupsd:/myth/slug/dev/slugos/openembedded/conf/distro/include:/myth/slug/dev/slugos/openembedded/conf/distro/include:/myth/slug/dev/slugos/openembedded/conf/distro/include:/myth/slug/dev/slugos/openembedded/conf/machine/include:/myth/slug/dev/slugos/openembedded/conf/machine/include:/myth/slug/dev/slugos/openembedded/conf/machine/include:/myth/slug/dev/slugos:/myth/slug/dev/slugos/openembedded:/myth/slug/dev/slugos/bitbake"
export base_libdir="/lib"
export base_sbindir="/sbin"
export PATH="/myth/slug/dev/slugos/tmp/staging/i686-linux/usr/bin/armeb-linux:/myth/slug/dev/slugos/tmp/staging/i686-linux/usr/sbin:/myth/slug/dev/slugos/tmp/staging/i686-linux/usr/bin:/myth/slug/dev/slugos/tmp/cross/bin:/myth/slug/dev/slugos/tmp/staging/i686-linux/sbin:/myth/slug/dev/slugos/bitbake/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/local/bin:/usr/games"
export TARGET_CFLAGS="-isystem/myth/slug/dev/slugos/tmp/staging/armeb-linux/usr/include -fexpensive-optimizations -fomit-frame-pointer -frename-registers -Os"
export base_bindir="/bin"
export servicedir="/srv"
export BUILD_CPP="cpp"
export sbindir="/usr/sbin"
export CFLAGS="-isystem/myth/slug/dev/slugos/tmp/staging/armeb-linux/usr/include -fexpensive-optimizations -fomit-frame-pointer -frename-registers -Os"
export BUILD_AR="ar"
export F77="armeb-linux-g77 -march=armv5te -mtune=xscale -mthumb-interwork -mno-thumb"
export BUILD_CFLAGS="-isystem/myth/slug/dev/slugos/tmp/staging/i686-linux/usr/include -O2"
unset DISTRO
export STAGING_IDLDIR="/myth/slug/dev/slugos/tmp/staging/armeb-linux/usr/share/idl"
export QMAKE_MKSPEC_PATH="/myth/slug/dev/slugos/tmp/staging/i686-linux/usr/share/qmake"
export BUILD_STRIP="strip"
export exec_prefix="/usr"
export TARGET_LDFLAGS="-L/myth/slug/dev/slugos/tmp/staging/armeb-linux/usr/lib -Wl,-rpath-link,/myth/slug/dev/slugos/tmp/staging/armeb-linux/usr/lib -Wl,-O1"
export docdir="/usr/share/doc"
export PKG_CONFIG_DISABLE_UNINSTALLED="yes"
export infodir="/usr/share/info"
export libdir="/usr/lib"
export CC="armeb-linux-gcc -march=armv5te -mtune=xscale -mthumb-interwork -mno-thumb"
export CPPFLAGS="-isystem/myth/slug/dev/slugos/tmp/staging/armeb-linux/usr/include"
export palmqtdir="/usr/lib/opie"
export CXX="armeb-linux-g++ -march=armv5te -mtune=xscale -mthumb-interwork -mno-thumb"
export PKG_CONFIG_PATH="/myth/slug/dev/slugos/tmp/staging/armeb-linux/usr/lib/pkgconfig"
unset MACHINE
export palmtopdir="/usr/lib/opie"
export AS="armeb-linux-as"
export PATCH_GET="0"
export CXXFLAGS="-isystem/myth/slug/dev/slugos/tmp/staging/armeb-linux/usr/include -fexpensive-optimizations -fomit-frame-pointer -frename-registers -Os -fpermissive"
export PKG_CONFIG_DIR="/myth/slug/dev/slugos/tmp/staging/armeb-linux/usr/lib/pkgconfig"
export BUILD_RANLIB="ranlib"
export BUILD_CPPFLAGS="-isystem/myth/slug/dev/slugos/tmp/staging/i686-linux/usr/include"
oe_runconf_apcupsd() {
if [ -x /myth/slug/dev/slugos/tmp/work/armv5teb-linux/apcupsd-3.14.3-r0/apcupsd-3.14.3/configure ] ; then
LDFLAGS="-Wl,-O1 -L/myth/slug/dev/slugos/tmp/staging/armeb-linux/usr/lib"
cfgcmd="./configure \
--build=i686-linux \
--host=armeb-linux \
--target=armeb-linux \
--prefix=/usr \
--exec_prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/libexec \
--datadir=/usr/share \
--sysconfdir=/etc \
--sharedstatedir=/usr/com \
--localstatedir=/var \
--libdir=/usr/lib \
--includedir=/usr/include \
--oldincludedir=/usr/include \
--infodir=/usr/share/info \
--mandir=/usr/share/man \
--enable-mainainer-mode \
--with-distname=unknown --enable-usb \
$@"
oenote "Running $cfgcmd..."
$cfgcmd || oefatal "oe_runconf failed"
else
oefatal "no configure script found"
fi
}
do_fetchall() {
base_do_fetchall
}
die() {
oefatal "$*"
}
base_do_install() {
:
}
do_compile() {
base_do_compile
}
do_stage() {
base_do_stage
}
oe_runconf() {
if [ -x /myth/slug/dev/slugos/tmp/work/armv5teb-linux/apcupsd-3.14.3-r0/apcupsd-3.14.3/configure ] ; then
cfgcmd="/myth/slug/dev/slugos/tmp/work/armv5teb-linux/apcupsd-3.14.3-r0/apcupsd-3.14.3/configure \
--build=i686-linux \
--host=armeb-linux \
--target=armeb-linux \
--prefix=/usr \
--exec_prefix=/usr \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--libexecdir=/usr/libexec \
--datadir=/usr/share \
--sysconfdir=/etc \
--sharedstatedir=/usr/com \
--localstatedir=/var \
--libdir=/usr/lib \
--includedir=/usr/include \
--oldincludedir=/usr/include \
--infodir=/usr/share/info \
--mandir=/usr/share/man \
--enable-mainainer-mode \
--with-distname=unknown --enable-usb \
$@"
oenote "Running $cfgcmd..."
$cfgcmd || oefatal "oe_runconf failed"
else
oefatal "no configure script found"
fi
}
base_do_fetchall() {
:
}
base_do_package() {
:
}
autotools_stage_includes() {
if [ "${INHIBIT_AUTO_STAGE_INCLUDES}" != "1" ]
then
rm -rf /myth/slug/dev/slugos/tmp/work/armv5teb-linux/apcupsd-3.14.3-r0/temp-staging
mkdir -p /myth/slug/dev/slugos/tmp/work/armv5teb-linux/apcupsd-3.14.3-r0/temp-staging
make DESTDIR="/myth/slug/dev/slugos/tmp/work/armv5teb-linux/apcupsd-3.14.3-r0/temp-staging" install
cp -pPR /myth/slug/dev/slugos/tmp/work/armv5teb-linux/apcupsd-3.14.3-r0/temp-staging//usr/include/* /myth/slug/dev/slugos/tmp/staging/armeb-linux/usr/include
rm -rf /myth/slug/dev/slugos/tmp/work/armv5teb-linux/apcupsd-3.14.3-r0/temp-staging
fi
}
oewarn() {
echo "WARNING:" "$*"
}
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=`armeb-linux-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_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 /myth/slug/dev/slugos/tmp/work/armv5teb-linux/apcupsd-3.14.3-r0/image/etc/fstab
#
# TODO: Check argument number?
#
filename=`basename $3`
dirname=`dirname $3`
for o in `echo task_do_compile:local:nslu2be:nslu2:ixp4xx:slugos:linux:armeb:build-linux:fail-fast:pn-apcupsd:thumb-interwork | 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
}
package_stagefile_shell() {
if [ "$PSTAGING_ACTIVE" = "1" ]; then
srcfile=$1
destfile=`echo $srcfile | sed s#/myth/slug/dev/slugos/tmp#${PSTAGE_TMPDIR_STAGE}#`
destdir=`dirname $destfile`
mkdir -p $destdir
cp -dp $srcfile $destfile
fi
}
oefatal() {
echo "FATAL:" "$*"
exit 1
}
base_do_buildall() {
:
}
do_configure() {
oe_runconf_apcupsd
}
autotools_stage_all() {
if [ "${INHIBIT_AUTO_STAGE}" = "1" ]
then
return
fi
rm -rf /myth/slug/dev/slugos/tmp/work/armv5teb-linux/apcupsd-3.14.3-r0/temp-staging
mkdir -p /myth/slug/dev/slugos/tmp/work/armv5teb-linux/apcupsd-3.14.3-r0/temp-staging
oe_runmake DESTDIR="/myth/slug/dev/slugos/tmp/work/armv5teb-linux/apcupsd-3.14.3-r0/temp-staging" install
autotools_stage_dir /myth/slug/dev/slugos/tmp/work/armv5teb-linux/apcupsd-3.14.3-r0/temp-staging//usr/include /myth/slug/dev/slugos/tmp/staging/armeb-linux/usr/include
if [ "i686-linux" = "armeb-linux" ]; then
autotools_stage_dir /myth/slug/dev/slugos/tmp/work/armv5teb-linux/apcupsd-3.14.3-r0/temp-staging//usr/bin /myth/slug/dev/slugos/tmp/staging/armeb-linux/usr/bin
autotools_stage_dir /myth/slug/dev/slugos/tmp/work/armv5teb-linux/apcupsd-3.14.3-r0/temp-staging//usr/sbin /myth/slug/dev/slugos/tmp/staging/armeb-linux/usr/sbin
autotools_stage_dir /myth/slug/dev/slugos/tmp/work/armv5teb-linux/apcupsd-3.14.3-r0/temp-staging//bin /myth/slug/dev/slugos/tmp/staging/armeb-linux/bin
autotools_stage_dir /myth/slug/dev/slugos/tmp/work/armv5teb-linux/apcupsd-3.14.3-r0/temp-staging//sbin /myth/slug/dev/slugos/tmp/staging/armeb-linux/sbin
autotools_stage_dir /myth/slug/dev/slugos/tmp/work/armv5teb-linux/apcupsd-3.14.3-r0/temp-staging//usr/libexec /myth/slug/dev/slugos/tmp/staging/armeb-linux/usr/libexec
fi
if [ -d /myth/slug/dev/slugos/tmp/work/armv5teb-linux/apcupsd-3.14.3-r0/temp-staging//usr/lib ]
then
olddir=`pwd`
cd /myth/slug/dev/slugos/tmp/work/armv5teb-linux/apcupsd-3.14.3-r0/temp-staging//usr/lib
las=$(find . -name \*.la -type f)
cd $olddir
echo "Found la files: $las"
if [ -n "$las" ]; then
# If there are .la files then libtool was used in the
# build, so install them with magic mangling.
for i in $las
do
dir=$(dirname $i)
echo "oe_libinstall -C /myth/slug/dev/slugos/tmp/work/armv5teb-linux/apcupsd-3.14.3-r0/apcupsd-3.14.3 -so $(basename $i .la) /myth/slug/dev/slugos/tmp/staging/armeb-linux/usr/lib/${dir}"
oe_libinstall -C /myth/slug/dev/slugos/tmp/work/armv5teb-linux/apcupsd-3.14.3-r0/apcupsd-3.14.3 -so $(basename $i .la) /myth/slug/dev/slugos/tmp/staging/armeb-linux/usr/lib/${dir}
done
else
# Otherwise libtool wasn't used, and lib/ can be copied
# directly.
echo "cp -fpPR /myth/slug/dev/slugos/tmp/work/armv5teb-linux/apcupsd-3.14.3-r0/temp-staging//usr/lib/* /myth/slug/dev/slugos/tmp/staging/armeb-linux/usr/lib"
cp -fpPR /myth/slug/dev/slugos/tmp/work/armv5teb-linux/apcupsd-3.14.3-r0/temp-staging//usr/lib/* /myth/slug/dev/slugos/tmp/staging/armeb-linux/usr/lib
fi
fi
rm -rf /myth/slug/dev/slugos/tmp/work/armv5teb-linux/apcupsd-3.14.3-r0/temp-staging//usr/share/man || true
rm -rf /myth/slug/dev/slugos/tmp/work/armv5teb-linux/apcupsd-3.14.3-r0/temp-staging//usr/share/info || true
autotools_stage_dir /myth/slug/dev/slugos/tmp/work/armv5teb-linux/apcupsd-3.14.3-r0/temp-staging//usr/share /myth/slug/dev/slugos/tmp/staging/armeb-linux/usr/share
rm -rf /myth/slug/dev/slugos/tmp/work/armv5teb-linux/apcupsd-3.14.3-r0/temp-staging
}
oe_libinstall() {
# Purpose: Install a library, in all its forms
# Example
#
# oe_libinstall libltdl /myth/slug/dev/slugos/tmp/staging/armeb-linux/usr/lib/
# oe_libinstall -C src/libblah libblah /myth/slug/dev/slugos/tmp/work/armv5teb-linux/apcupsd-3.14.3-r0/image//usr/lib/
dir=""
libtool=""
silent=""
require_static=""
require_shared=""
staging_install=""
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
if echo "$destpath/" | egrep '^/myth/slug/dev/slugos/tmp/staging/armeb-linux/usr/lib/' >/dev/null
then
staging_install=1
fi
__runcmd () {
if [ -z "$silent" ]; then
echo >&2 "oe_libinstall: $*"
fi
$*
}
if [ -z "$dir" ]; then
dir=`pwd`
fi
dotlai=$libname.lai
dir=$dir`(cd $dir;find . -name "$dotlai") | sed "s/^\.//;s/\/$dotlai\$//;q"`
olddir=`pwd`
__runcmd cd $dir
lafile=$libname.la
# If such file doesn't exist, try to cut version suffix
if [ ! -f "$lafile" ]; then
libname1=`echo "$libname" | sed 's/-[0-9.]*$//'`
lafile1=$libname.la
if [ -f "$lafile1" ]; then
libname=$libname1
lafile=$lafile1
fi
fi
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
if [ -f "$dotlai" -a -n "$libtool" ]; then
if test -n "$staging_install"
then
# stop libtool using the final directory name for libraries
# in staging:
__runcmd rm -f $destpath/$libname.la
__runcmd sed -e 's/^installed=yes$/installed=no/' \
-e '/^dependency_libs=/s,/myth/slug/dev/slugos/tmp/work/armv5teb-linux/apcupsd-3.14.3-r0[[:alnum:]/\._+-]*/\([[:alnum:]\._+-]*\),/myth/slug/dev/slugos/tmp/staging/armeb-linux/usr/lib/\1,g' \
-e "/^dependency_libs=/s,\([[:space:]']+\)/usr/lib,\1/myth/slug/dev/slugos/tmp/staging/armeb-linux/usr/lib,g" \
$dotlai >$destpath/$libname.la
else
__runcmd install -m 0644 $dotlai $destpath/$libname.la
fi
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=`armeb-linux-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"
}
base_do_compile() {
if [ -e Makefile -o -e makefile ]; then
oe_runmake || die "make failed"
else
oenote "nothing to compile"
fi
}
oenote() {
echo "NOTE:" "$*"
}
nslu2_pack_image() {
slugimage -p \
-b /myth/slug/dev/slugos/tmp/staging/armeb-linux/usr/lib/nslu2-binaries/RedBoot \
-s /myth/slug/dev/slugos/tmp/staging/armeb-linux/usr/lib/nslu2-binaries/SysConf \
-k /myth/slug/dev/slugos/tmp/deploy/images/zImage-nslu2be.bin \
-L /myth/slug/dev/slugos/tmp/staging/armeb-linux/loader/apex-nslu2.bin \
-r Flashdisk:/myth/slug/dev/slugos/tmp/deploy/images/slugosbe-nslu2be-20080413234943.rootfs.jffs2 \
-m /myth/slug/dev/slugos/tmp/staging/armeb-linux/firmware/NPE-B \
-t /myth/slug/dev/slugos/tmp/staging/armeb-linux/usr/lib/nslu2-binaries/Trailer \
-o /myth/slug/dev/slugos/tmp/deploy/images/slugosbe-nslu2be-20080413234943-nslu2.bin
slugimage -F -p \
-b /myth/slug/dev/slugos/tmp/staging/armeb-linux/usr/lib/nslu2-binaries/RedBoot \
-s /myth/slug/dev/slugos/tmp/staging/armeb-linux/usr/lib/nslu2-binaries/SysConf \
-k /myth/slug/dev/slugos/tmp/deploy/images/zImage-nslu2be.bin \
-L /myth/slug/dev/slugos/tmp/staging/armeb-linux/loader/apex-nslu2-16mb.bin \
-r Flashdisk:/myth/slug/dev/slugos/tmp/deploy/images/slugosbe-nslu2be-20080413234943.rootfs.jffs2 \
-m /myth/slug/dev/slugos/tmp/staging/armeb-linux/firmware/NPE-B \
-t /myth/slug/dev/slugos/tmp/staging/armeb-linux/usr/lib/nslu2-binaries/Trailer \
-o /myth/slug/dev/slugos/tmp/deploy/images/slugosbe-nslu2be-20080413234943-nslu2-16mb.bin
}
base_do_configure() {
:
}
do_install() {
autotools_do_install
}
autotools_stage_dir() {
from="$1"
to="$2"
# This will remove empty directories so we can ignore them
rmdir "$from" 2> /dev/null || true
if [ -d "$from" ]; then
mkdir -p "$to"
cp -fpPR -t "$to" "$from"/*
fi
}
package_update_index_ipk() {
set -x
ipkgarchs="all any noarch armeb armv4b armv4tb armv5eb armv5teb ixp4xxbe nslu2be"
if [ ! -z "${DEPLOY_KEEP_PACKAGES}" ]; then
return
fi
touch /myth/slug/dev/slugos/tmp/deploy/ipk/Packages
ipkg-make-index -r /myth/slug/dev/slugos/tmp/deploy/ipk/Packages -p /myth/slug/dev/slugos/tmp/deploy/ipk/Packages -l /myth/slug/dev/slugos/tmp/deploy/ipk/Packages.filelist -m /myth/slug/dev/slugos/tmp/deploy/ipk
for arch in $ipkgarchs; do
if [ -e /myth/slug/dev/slugos/tmp/deploy/ipk/$arch/ ] ; then
touch /myth/slug/dev/slugos/tmp/deploy/ipk/$arch/Packages
ipkg-make-index -r /myth/slug/dev/slugos/tmp/deploy/ipk/$arch/Packages -p /myth/slug/dev/slugos/tmp/deploy/ipk/$arch/Packages -l /myth/slug/dev/slugos/tmp/deploy/ipk/$arch/Packages.filelist -m /myth/slug/dev/slugos/tmp/deploy/ipk/$arch/
fi
if [ -e /myth/slug/dev/slugos/tmp/deploy/ipk/i686-$arch-sdk/ ] ; then
touch /myth/slug/dev/slugos/tmp/deploy/ipk/i686-$arch-sdk/Packages
ipkg-make-index -r /myth/slug/dev/slugos/tmp/deploy/ipk/i686-$arch-sdk/Packages -p /myth/slug/dev/slugos/tmp/deploy/ipk/i686-$arch-sdk/Packages -l /myth/slug/dev/slugos/tmp/deploy/ipk/i686-$arch-sdk/Packages.filelist -m /myth/slug/dev/slugos/tmp/deploy/ipk/i686-$arch-sdk/
fi
done
}
do_package_write() {
:
}
package_generate_ipkg_conf() {
mkdir -p /myth/slug/dev/slugos/tmp/staging/i686-linux/etc/
echo "src oe file:/myth/slug/dev/slugos/tmp/deploy/ipk" > /myth/slug/dev/slugos/tmp/staging/i686-linux/etc/opkg.conf
echo "src oe file:/myth/slug/dev/slugos/tmp/deploy/ipk" > /myth/slug/dev/slugos/tmp/staging/i686-linux/etc/opkg-sdk.conf
ipkgarchs="all any noarch armeb armv4b armv4tb armv5eb armv5teb ixp4xxbe nslu2be"
priority=1
for arch in $ipkgarchs; do
echo "arch $arch $priority" >> /myth/slug/dev/slugos/tmp/staging/i686-linux/etc/opkg.conf
echo "arch i686-$arch-sdk $priority" >> /myth/slug/dev/slugos/tmp/staging/i686-linux/etc/opkg-sdk.conf
priority=$(expr $priority + 5)
if [ -e /myth/slug/dev/slugos/tmp/deploy/ipk/$arch/Packages ] ; then
echo "src oe-$arch file:/myth/slug/dev/slugos/tmp/deploy/ipk/$arch" >> /myth/slug/dev/slugos/tmp/staging/i686-linux/etc/opkg.conf
fi
if [ -e /myth/slug/dev/slugos/tmp/deploy/ipk/i686-$arch-sdk/Packages ] ; then
echo "src oe-i686-$arch-sdk file:/myth/slug/dev/slugos/tmp/deploy/ipk/i686-$arch-sdk" >> /myth/slug/dev/slugos/tmp/staging/i686-linux/etc/opkg-sdk.conf
fi
done
}
oedebug() {
test $# -ge 2 || {
echo "Usage: oedebug level \"message\""
exit 1
}
test ${OEDEBUG:-0} -ge $1 && {
shift
echo "DEBUG:" $*
}
}
autotools_do_configure() {
case apcupsd 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 /myth/slug/dev/slugos/tmp/work/armv5teb-linux/apcupsd-3.14.3-r0/apcupsd-3.14.3 -name configure.in -o -name configure.ac`; do
rm -f `dirname $ac`/configure
done )
if [ -e /myth/slug/dev/slugos/tmp/work/armv5teb-linux/apcupsd-3.14.3-r0/apcupsd-3.14.3/configure.in -o -e /myth/slug/dev/slugos/tmp/work/armv5teb-linux/apcupsd-3.14.3-r0/apcupsd-3.14.3/configure.ac ]; then
olddir=`pwd`
cd /myth/slug/dev/slugos/tmp/work/armv5teb-linux/apcupsd-3.14.3-r0/apcupsd-3.14.3
if [ x"default" = xdefault ]; then
acpaths=
for i in `find /myth/slug/dev/slugos/tmp/work/armv5teb-linux/apcupsd-3.14.3-r0/apcupsd-3.14.3 -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="default"
fi
AUTOV=`automake --version |head -n 1 |sed "s/.* //;s/\.[0-9]\+$//"`
automake --version
echo "AUTOV is $AUTOV"
install -d /myth/slug/dev/slugos/tmp/staging/armeb-linux/usr/share/aclocal
install -d /myth/slug/dev/slugos/tmp/staging/armeb-linux/usr/share/aclocal-$AUTOV
acpaths="$acpaths -I/myth/slug/dev/slugos/tmp/staging/armeb-linux/usr/share/aclocal-$AUTOV -I /myth/slug/dev/slugos/tmp/staging/armeb-linux/usr/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 --exclude=autopoint | 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 "^[AI][CT]_PROG_INTLTOOL" $CONFIGURE_AC >/dev/null; then
oenote Executing intltoolize --copy --force --automake
intltoolize --copy --force --automake
fi
oenote Executing autoreconf --verbose --install --force --exclude=autopoint $acpaths
mkdir -p m4
autoreconf -Wcross --verbose --install --force --exclude=autopoint $acpaths || oefatal "autoreconf execution failed."
cd $olddir
fi
;;
esac
if [ -e /myth/slug/dev/slugos/tmp/work/armv5teb-linux/apcupsd-3.14.3-r0/apcupsd-3.14.3/configure ]; then
oe_runconf
else
oenote "nothing to configure"
fi
}
ldconfig_postinst_fragment() {
if [ x"$D" = "x" ]; then
[ -x /sbin/ldconfig ] && /sbin/ldconfig
fi
}
autotools_do_install() {
oe_runmake 'DESTDIR=/myth/slug/dev/slugos/tmp/work/armv5teb-linux/apcupsd-3.14.3-r0/image' install
for i in `find /myth/slug/dev/slugos/tmp/work/armv5teb-linux/apcupsd-3.14.3-r0/image -name "*.la"` ; do \
sed -i -e s:/myth/slug/dev/slugos/tmp/staging/armeb-linux/usr/lib:/usr/lib:g $i
sed -i -e s:/myth/slug/dev/slugos/tmp/work/armv5teb-linux/apcupsd-3.14.3-r0/image::g $i
sed -i -e 's:-I/myth/slug/dev/slugos/tmp/work/armv5teb-linux/apcupsd-3.14.3-r0\S*: :g' $i
sed -i -e 's:-L/myth/slug/dev/slugos/tmp/work/armv5teb-linux/apcupsd-3.14.3-r0\S*: :g' $i
done
}
oe_runmake() {
if [ x"$MAKE" = x ]; then MAKE=make; fi
oenote make ${PARALLEL_MAKE} "$@"
make ${PARALLEL_MAKE} "$@" || die "oe_runmake failed"
}
base_do_stage() {
:
}
MIRRORS() {
ftp://ftp.debian.org/debian/pool/main http://snapshot.debian.net/archive/pool
ftp://ftp.debian.org/debian/pool ftp://ftp.de.debian.org/debian/pool
ftp://ftp.debian.org/debian/pool ftp://ftp.au.debian.org/debian/pool
ftp://ftp.debian.org/debian/pool ftp://ftp.cl.debian.org/debian/pool
ftp://ftp.debian.org/debian/pool ftp://ftp.hr.debian.org/debian/pool
ftp://ftp.debian.org/debian/pool ftp://ftp.fi.debian.org/debian/pool
ftp://ftp.debian.org/debian/pool ftp://ftp.hk.debian.org/debian/pool
ftp://ftp.debian.org/debian/pool ftp://ftp.hu.debian.org/debian/pool
ftp://ftp.debian.org/debian/pool ftp://ftp.ie.debian.org/debian/pool
ftp://ftp.debian.org/debian/pool ftp://ftp.it.debian.org/debian/pool
ftp://ftp.debian.org/debian/pool ftp://ftp.jp.debian.org/debian/pool
ftp://ftp.debian.org/debian/pool ftp://ftp.no.debian.org/debian/pool
ftp://ftp.debian.org/debian/pool ftp://ftp.pl.debian.org/debian/pool
ftp://ftp.debian.org/debian/pool ftp://ftp.ro.debian.org/debian/pool
ftp://ftp.debian.org/debian/pool ftp://ftp.si.debian.org/debian/pool
ftp://ftp.debian.org/debian/pool ftp://ftp.es.debian.org/debian/pool
ftp://ftp.debian.org/debian/pool ftp://ftp.se.debian.org/debian/pool
ftp://ftp.debian.org/debian/pool ftp://ftp.tr.debian.org/debian/pool
ftp://ftp.gnu.org/gnu ftp://mirrors.kernel.org/gnu
ftp://ftp.gnu.org/gnu ftp://ftp.matrix.com.br/pub/gnu
ftp://ftp.gnu.org/gnu ftp://ftp.cs.ubc.ca/mirror2/gnu
ftp://ftp.gnu.org/gnu ftp://sunsite.ust.hk/pub/gnu
ftp://ftp.gnu.org/gnu ftp://ftp.ayamura.org/pub/gnu
http://kernel.org/ http://www.kernel.org/pub
http://kernel.org/ ftp://ftp.us.kernel.org/pub
http://kernel.org/ ftp://ftp.uk.kernel.org/pub
http://kernel.org/ ftp://ftp.hk.kernel.org/pub
http://kernel.org/ ftp://ftp.au.kernel.org/pub
http://kernel.org/ ftp://ftp.jp.kernel.org/pub
ftp://ftp.gnupg.org/gcrypt/ ftp://ftp.franken.de/pub/crypt/mirror/ftp.gnupg.org/gcrypt/
ftp://ftp.gnupg.org/gcrypt/ ftp://ftp.surfnet.nl/pub/security/gnupg/
ftp://ftp.gnupg.org/gcrypt/ http://gulus.USherbrooke.ca/pub/appl/GnuPG/
ftp://dante.ctan.org/tex-archive ftp://ftp.fu-berlin.de/tex/CTAN
ftp://dante.ctan.org/tex-archive http://sunsite.sut.ac.jp/pub/archives/ctan/
ftp://dante.ctan.org/tex-archive http://ctan.unsw.edu.au/
ftp://ftp.gnutls.org/pub/gnutls ftp://ftp.gnutls.org/pub/gnutls/
ftp://ftp.gnutls.org/pub/gnutls ftp://ftp.gnupg.org/gcrypt/gnutls/
ftp://ftp.gnutls.org/pub/gnutls http://www.mirrors.wiretapped.net/security/network-security/gnutls/
ftp://ftp.gnutls.org/pub/gnutls ftp://ftp.mirrors.wiretapped.net/pub/security/network-security/gnutls/
ftp://ftp.gnutls.org/pub/gnutls http://josefsson.org/gnutls/releases/
http://ftp.info-zip.org/pub/infozip/src/ http://mirror.switch.ch/ftp/mirror/infozip/src/
http://ftp.info-zip.org/pub/infozip/src/ ftp://sunsite.icm.edu.pl/pub/unix/archiving/info-zip/src/
ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://ftp.cerias.purdue.edu/pub/tools/unix/sysutils/lsof/
ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://ftp.tau.ac.il/pub/unix/admin/
ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://ftp.cert.dfn.de/pub/tools/admin/lsof/
ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://ftp.fu-berlin.de/pub/unix/tools/lsof/
ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://ftp.kaizo.org/pub/lsof/
ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://ftp.tu-darmstadt.de/pub/sysadmin/lsof/
ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://ftp.tux.org/pub/sites/vic.cc.purdue.edu/tools/unix/lsof/
ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://gd.tuwien.ac.at/utils/admin-tools/lsof/
ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://sunsite.ualberta.ca/pub/Mirror/lsof/
ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://the.wiretapped.net/pub/security/host-security/lsof/
http://www.apache.org/dist http://archive.apache.org/dist
ftp://.*/.* http://sources.nslu2-linux.org/sources/
https?://.*/.* http://sources.nslu2-linux.org/sources/
}
cd /myth/slug/dev/slugos/tmp/work/armv5teb-linux/apcupsd-3.14.3-r0/apcupsd-3.14.3
do_compile