-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgegl.sh
49 lines (43 loc) · 1.31 KB
/
gegl.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
#!/bin/bash
#Created by Sam Gleske
#Ubuntu 16.04.4 LTS
#Linux 4.13.0-41-generic x86_64
#GNU bash, version 4.3.48(1)-release (x86_64-pc-linux-gnu)
set -xeo pipefail
PRODUCT=gegl
REPOSITORY=https://gitlab.gnome.org/GNOME/"${PRODUCT}"
initial_workspace="$PWD"
# dependencies
if [ -z "${SKIP_MAKE_BUILD:-}" ]; then
pushd "$PREFIX"
tar -xzf /data/babl-internal.tar.gz
popd
fi
#clone if not already
if [ ! -d "${PRODUCT}" ]; then
GIT_ARGS=()
if [ -d /export/"${PRODUCT}".git ]; then
GIT_ARGS=(--reference /export/"${PRODUCT}".git)
fi
git clone "${GIT_ARGS[@]}" "${REPOSITORY}"
fi
cd "${PRODUCT}"/
if [ -n "${GEGL_BRANCH}" -a -z "${SKIP_MAKE_BUILD:-}" -a -z "${JOB_NAME:-}" ]; then
git checkout "${GEGL_BRANCH}"
fi
#build and install (runs by default)
if [ -z "${SKIP_MAKE_BUILD:-}" ]; then
./autogen.sh
./configure --prefix="$PREFIX"
make "-j$(nproc)" install
fi
#run tests (runs by default)
[ -n "${SKIP_MAKE_CHECK:-}" ] || make "-j$(nproc)" check
#run distcheck (disabled by default)
[ -z "${INCLUDE_DISTCHECK:-}" ] || make distcheck
# package binaries for use in GIMP build
pushd "$PREFIX"
tar -czvf ~1/"${PRODUCT}"-internal.tar.gz lib/*"${PRODUCT}"* lib/pkgconfig/"${PRODUCT}"* include/"${PRODUCT}"* bin share
popd
cp -f "${PRODUCT}"-internal.tar.gz /data/
cd "${initial_workspace}"