2013-09-06 07:40:52 +00:00
|
|
|
#!/bin/sh
|
2014-02-20 16:11:43 +00:00
|
|
|
#
|
|
|
|
# Simple package build script.
|
|
|
|
# For example to build the kernel do: ./pkgbuild kernel
|
|
|
|
#
|
|
|
|
# Please note that if the package has already been unpacked in src/
|
|
|
|
# then it will not be unpacked again. This is to make it easy
|
|
|
|
# to build new packages by first hacking src/<pkg> until it can be
|
|
|
|
# successfully compiled. If you want to force unpacking of the package
|
|
|
|
# simply rm the unpacked directory. Similarly if you want to force
|
|
|
|
# re-downloading of the package, simply rm the packed version as well.
|
2013-09-05 11:31:58 +00:00
|
|
|
|
2014-02-17 16:01:37 +00:00
|
|
|
umask 022
|
|
|
|
|
2013-09-05 11:31:58 +00:00
|
|
|
if test -z "$1"; then
|
2014-02-17 16:01:37 +00:00
|
|
|
echo usage: $0 pkg... 1>&2
|
2013-09-05 11:31:58 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2013-09-17 14:26:52 +00:00
|
|
|
. ./prepare-env
|
2013-09-07 14:31:43 +00:00
|
|
|
|
2014-02-14 12:22:37 +00:00
|
|
|
if test "$(uname -m)" != "$arch"; then
|
2013-09-25 11:20:03 +00:00
|
|
|
echo You need an $arch host to build morpheus 1>&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2013-09-26 15:24:53 +00:00
|
|
|
. ./prepare-root
|
2013-09-26 19:38:43 +00:00
|
|
|
mkdir -p src
|
2013-09-26 15:24:53 +00:00
|
|
|
|
2013-09-26 17:03:03 +00:00
|
|
|
while [ $# -gt 0 ]; do
|
2014-02-17 16:01:37 +00:00
|
|
|
./build "pkgs/$1"
|
2013-09-26 17:03:03 +00:00
|
|
|
shift
|
|
|
|
done
|