-
Notifications
You must be signed in to change notification settings - Fork 3
/
common.sh
52 lines (45 loc) · 1.03 KB
/
common.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
BASEDIR="`pwd`"
WORKDIR="$BASEDIR/WORKDIR"
ROOTDIR="$WORKDIR/APP_ROOT"
APPS_DIR="$BASEDIR/apps"
PACKAGE_OUT_DIR="$WORKDIR/PACKAGES"
PACKAGE_IN_DIR="$BASEDIR/support_packages"
RUNTIME_DIR="$BASEDIR/runtimes"
# Dirty evil hacks to pull the raw package contents into the root dir
# without considering dependencies and all that jazz.
function extract_install()
{
mkdir tmp
pushd tmp
eopkg fetch $*
uneopkg *.eopkg
cp -Rva install/* "$ROOTDIR/."
popd
rm -rf tmp
}
function extract_install_local()
{
mkdir tmp
pushd tmp
cp -v $1 .
uneopkg *.eopkg
cp -Rva install/* "$ROOTDIR/."
popd
rm -rf tmp
}
# Build a single package
function build_one()
{
local pkg="$1"
local workdir="$PACKAGE_OUT_DIR/$pkg"
local sourcedir="$PACKAGE_IN_DIR/$pkg"
mkdir -p "$workdir"
mkdir -p "$sourcedir"
pushd $workdir
solbuild -p unstable-x86_64 build $sourcedir/package.yml
rm -fv *dbginfo*.eopkg || :
rm -fv *-devel*.eopkg || :
mv *.eopkg "$PACKAGE_OUT_DIR/."
popd
}