File: build.sh

package info (click to toggle)
keyman 18.0.245-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 21,316 kB
  • sloc: python: 52,784; cpp: 21,278; sh: 7,633; ansic: 4,823; xml: 3,617; perl: 959; makefile: 139; javascript: 138
file content (50 lines) | stat: -rwxr-xr-x 1,310 bytes parent folder | download | duplicates (2)
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
#!/bin/bash

# Build Keyman for Linux: core ibus-keyman

# It must be run from the keyman/linux directory

set -e

BASEDIR=$(pwd)

INSTALLDIR=${INSTALLDIR:-"/usr/local"}

CONFIGUREONLY=${CONFIGUREONLY:="no"}
BUILDONLY=${BUILDONLY:="no"}

if [[ "${CONFIGUREONLY}" != "no" && "${BUILDONLY}" != "no" ]]; then
	echo "Only use one of CONFIGUREONLY and BUILDONLY"
	exit 1
fi

if [[ "${BUILDONLY}" == "no" ]]; then
	cd "$BASEDIR"
	../core/build.sh --no-tests configure:arch

	# While we can't pass extra parameters to the configure action
	# we need these extra commands
	cd ../core/build/arch/release
	echo "reconfiguring Keyman Core meson with prefix ${INSTALLDIR}"
	meson configure -Dprefix="${INSTALLDIR}" && ninja reconfigure

	# We need to build core first before we can configure ibus-keyman!
	cd "$BASEDIR"
	../core/build.sh build:arch

	cd "$BASEDIR/ibus-keyman"
	./build.sh clean configure -- --prefix="${INSTALLDIR}"
fi

if [[ "${CONFIGUREONLY}" == "no" ]]; then
	echo "building Keyman Core"
	cd "$BASEDIR"
	# May 2021: For now, running tests here as well. We could move this elsewhere
	# in the future if we want to split out the tests, but they run in a couple of seconds
	# at present.
	../core/build.sh build:arch test:arch

	echo "building ibus-keyman"
	cd "$BASEDIR/ibus-keyman"
	./build.sh build
fi