summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x.ci/buildlib.sh1
-rw-r--r--.gitlab-ci.yml26
-rw-r--r--packages/SDL.sh17
-rw-r--r--packages/SDL_gfx.sh8
-rw-r--r--[-rwxr-xr-x]packages/SDL_image.sh26
-rw-r--r--packages/SDL_mixer.sh11
-rw-r--r--packages/SDL_net.sh10
-rw-r--r--packages/SDL_ttf.sh9
-rw-r--r--[-rwxr-xr-x]packages/cmake.sh19
-rw-r--r--packages/cppcheck.sh6
-rw-r--r--[-rwxr-xr-x]packages/curl.sh28
-rw-r--r--[-rwxr-xr-x]packages/libpng.sh28
-rw-r--r--[-rwxr-xr-x]packages/libxml2.sh29
-rw-r--r--packages/manaplus.sh6
-rw-r--r--[-rwxr-xr-x]packages/physfs.sh26
-rw-r--r--[-rwxr-xr-x]packages/qemu.sh45
-rw-r--r--[-rwxr-xr-x]packages/virglrenderer.sh25
-rw-r--r--[-rwxr-xr-x]packages/zlib.sh26
-rw-r--r--packages/zlib_ng.sh9
-rw-r--r--scripts/include/common.sh176
20 files changed, 320 insertions, 211 deletions
diff --git a/.ci/buildlib.sh b/.ci/buildlib.sh
index bfcbeb7..18ece90 100755
--- a/.ci/buildlib.sh
+++ b/.ci/buildlib.sh
@@ -7,6 +7,7 @@ cd /usr/local/spm
export installname="${1}_${2}"
export envname="env"
+export srcbranch="$2"
./.ci/run.sh ./getsrc.sh "$1" || exit 1
./.ci/run.sh ./build.sh "$1" || exit 1
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 4251a4e..38302ee 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -20,7 +20,7 @@ variables:
# self tests
-test:commands:
+test:commands1:
stage: test
script:
- ./.ci/install.sh git-core bash gcc g++ make autoconf automake autopoint gettext
@@ -28,10 +28,33 @@ test:commands:
- ls src/zlib
- ./.ci/run.sh ./build.sh zlib
- ls bin/zlib
+ - ls tmp/zlib
+ - grep "1.2.10" ./bin/zlib/lib/pkgconfig/zlib.pc
- ./.ci/run.sh ./clean.sh zlib
- mkdir bin/zlib
- ./.ci/run.sh ./clean.sh zlib
- ./.ci/run.sh ./updatesrc.sh zlib
+ variables:
+ srcbranch: v1.2.10
+ <<: *job-artifacts
+
+test:commands2:
+ stage: test
+ script:
+ - ./.ci/install.sh git-core bash gcc g++ make autoconf automake autopoint gettext
+ zlib1g-dev libtool
+ - ./.ci/run.sh ./getsrc.sh curl
+ - ls src/curl
+ - ./.ci/run.sh ./build.sh curl
+ - ls bin/curl
+ - ls tmp/curl
+ - grep "7.51" ./bin/curl/lib/pkgconfig/libcurl.pc
+ - ./.ci/run.sh ./clean.sh curl
+ - mkdir bin/curl
+ - ./.ci/run.sh ./clean.sh curl
+ - ./.ci/run.sh ./updatesrc.sh curl
+ variables:
+ srcbranch: curl-7_51_0
<<: *job-artifacts
# zlib builds
@@ -162,6 +185,7 @@ zlib_v1.2.10:
- ./.ci/buildlib.sh zlib v1.2.10
<<: *job-artifacts
+
zlib_v1.2.11:
stage: build
script:
diff --git a/packages/SDL.sh b/packages/SDL.sh
new file mode 100644
index 0000000..4b47b5a
--- /dev/null
+++ b/packages/SDL.sh
@@ -0,0 +1,17 @@
+SRCTYPE=hg
+SRCURL=http://hg.libsdl.org/SDL/
+DEFAULT_BRANCH="SDL-1.2"
+
+ENV_PATH="bin"
+ENV_LD_LIBRARY_PATH="lib"
+ENV_PKG_CONFIG_PATH="lib/pkgconfig"
+ENV_MANPATH="share/man"
+
+BUILD_TYPE="configure"
+SRC_INIT_COMMAND="./autogen.sh"
+CONFIGURE_FLAGS="--disable-rpath --enable-sdl-dlopen --disable-loadso \
+ --disable-video-ggi \
+ --disable-nas --disable-esd --disable-arts \
+ --disable-alsa-shared --disable-pulseaudio-shared \
+ --disable-x11-shared \
+ --enable-video-directfb"
diff --git a/packages/SDL_gfx.sh b/packages/SDL_gfx.sh
new file mode 100644
index 0000000..0e44dc2
--- /dev/null
+++ b/packages/SDL_gfx.sh
@@ -0,0 +1,8 @@
+SRCURL=https://github.com/ferzkopp/SDL_gfx.git
+DEFAULT_BRANCH="SDL-1.2"
+
+ENV_LD_LIBRARY_PATH="lib"
+ENV_PKG_CONFIG_PATH="lib/pkgconfig"
+
+BUILD_TYPE="configure"
+SRC_INIT_COMMAND="./autogen.sh"
diff --git a/packages/SDL_image.sh b/packages/SDL_image.sh
index 37ad7d8..0e8f8cc 100755..100644
--- a/packages/SDL_image.sh
+++ b/packages/SDL_image.sh
@@ -1,20 +1,10 @@
-#!/bin/bash
+SRCTYPE=hg
+SRCURL=http://hg.libsdl.org/SDL_image/
+DEFAULT_BRANCH="SDL-1.2"
-function package_build {
-# run_git_switch_branch v1.2.11
- run_autoreconf -i
- run_configure --disable-jpg-shared --disable-tif-shared --disable-png-shared --disable-webp-shared
+ENV_LD_LIBRARY_PATH="lib"
+ENV_PKG_CONFIG_PATH="lib/pkgconfig"
- run_make
- run_make_install
-}
-
-function package_get_source {
-# run_git_clone https://
- echo nothing
-}
-
-function package_use {
- env_lib_library_path "lib"
- env_pkg_config_path "lib/pkgconfig"
-}
+BUILD_TYPE="configure"
+SRC_INIT_COMMAND="./autogen.sh"
+CONFIGURE_FLAGS="--disable-jpg-shared --disable-tif-shared --disable-png-shared --disable-webp-shared"
diff --git a/packages/SDL_mixer.sh b/packages/SDL_mixer.sh
new file mode 100644
index 0000000..7f53d17
--- /dev/null
+++ b/packages/SDL_mixer.sh
@@ -0,0 +1,11 @@
+SRCTYPE=hg
+SRCURL=http://hg.libsdl.org/SDL_mixer/
+DEFAULT_BRANCH="SDL-1.2"
+
+ENV_LD_LIBRARY_PATH="lib"
+ENV_PKG_CONFIG_PATH="lib/pkgconfig"
+
+BUILD_TYPE="configure"
+SRC_INIT_COMMAND="./autogen.sh"
+CONFIGURE_FLAGS="--disable-music-mp3 \
+ --disable-music-mod-shared --disable-music-ogg-shared --disable-music-mp3-shared --disable-music-flac-shared --disable-music-fluidsynth-shared"
diff --git a/packages/SDL_net.sh b/packages/SDL_net.sh
new file mode 100644
index 0000000..5b55d35
--- /dev/null
+++ b/packages/SDL_net.sh
@@ -0,0 +1,10 @@
+SRCTYPE=hg
+SRCURL=http://hg.libsdl.org/SDL_net/
+DEFAULT_BRANCH="SDL-1.2"
+
+ENV_LD_LIBRARY_PATH="lib"
+ENV_PKG_CONFIG_PATH="lib/pkgconfig"
+
+BUILD_TYPE="configure"
+SRC_INIT_COMMAND="./autogen.sh"
+CONFIGURE_FLAGS="--disable-gui"
diff --git a/packages/SDL_ttf.sh b/packages/SDL_ttf.sh
new file mode 100644
index 0000000..4e3696b
--- /dev/null
+++ b/packages/SDL_ttf.sh
@@ -0,0 +1,9 @@
+SRCTYPE=hg
+SRCURL=http://hg.libsdl.org/SDL_ttf/
+DEFAULT_BRANCH="SDL-1.2"
+
+ENV_LD_LIBRARY_PATH="lib"
+ENV_PKG_CONFIG_PATH="lib/pkgconfig"
+
+BUILD_TYPE="configure"
+SRC_INIT_COMMAND="./autogen.sh"
diff --git a/packages/cmake.sh b/packages/cmake.sh
index e54720d..9d43972 100755..100644
--- a/packages/cmake.sh
+++ b/packages/cmake.sh
@@ -1,17 +1,6 @@
-#!/bin/bash
+SRCURL=git://cmake.org/cmake.git
+DEFAULT_BRANCH="v3.7.2"
-function package_build {
- run_git_switch_branch master
- run_cmake
+ENV_PATH="bin"
- run_make
- run_make_install
-}
-
-function package_get_source {
- run_git_clone git://cmake.org/cmake.git
-}
-
-function package_use {
- env_path "bin"
-}
+BUILD_TYPE="cmake"
diff --git a/packages/cppcheck.sh b/packages/cppcheck.sh
new file mode 100644
index 0000000..cfdae90
--- /dev/null
+++ b/packages/cppcheck.sh
@@ -0,0 +1,6 @@
+SRCURL=https://github.com/danmar/cppcheck.git
+
+ENV_PATH="bin:share/CppCheck"
+
+BUILD_TYPE="cmake"
+CONFIGURE_FLAGS="-DHAVE_RULES=ON"
diff --git a/packages/curl.sh b/packages/curl.sh
index 1d6385d..58ba51e 100755..100644
--- a/packages/curl.sh
+++ b/packages/curl.sh
@@ -1,24 +1,10 @@
-#!/bin/bash
+SRCURL=https://github.com/curl/curl.git
-function package_build {
- run_git_switch_branch master
+ENV_PATH="bin:lib:include"
+ENV_LD_LIBRARY_PATH="lib"
+ENV_PKG_CONFIG_PATH="lib/pkgconfig"
+ENV_MANPATH="share/man"
- run_autoreconf -i
- run_configure
+ENABLE_SAME_DIR_BUILD="true"
- run_make
- run_make_install
-}
-
-function package_get_source {
- run_git_clone https://github.com/curl/curl.git
-}
-
-function package_use {
- env_path "bin"
- env_path "lib"
- env_path "include"
- env_man "share/man"
- env_lib_library_path "lib"
- env_pkg_config_path "lib/pkgconfig"
-}
+BUILD_TYPE="automake"
diff --git a/packages/libpng.sh b/packages/libpng.sh
index f13ae15..9da9556 100755..100644
--- a/packages/libpng.sh
+++ b/packages/libpng.sh
@@ -1,24 +1,8 @@
-#!/bin/bash
+SRCURL=git://git.code.sf.net/p/libpng/code
-function package_build {
- run_git_switch_branch master
+ENV_PATH="bin:lib:include"
+ENV_LD_LIBRARY_PATH="lib"
+ENV_PKG_CONFIG_PATH="lib/pkgconfig"
+ENV_MANPATH="share/man"
- run_autoreconf -i
- run_configure
-
- run_make
- run_make_install
-}
-
-function package_get_source {
- run_git_clone git://git.code.sf.net/p/libpng/code
-}
-
-function package_use {
- env_path "bin"
- env_path "lib"
- env_path "include"
- env_man "share/man"
- env_lib_library_path "lib"
- env_pkg_config_path "lib/pkgconfig"
-}
+BUILD_TYPE="automake"
diff --git a/packages/libxml2.sh b/packages/libxml2.sh
index a37ac60..0496bdf 100755..100644
--- a/packages/libxml2.sh
+++ b/packages/libxml2.sh
@@ -1,24 +1,9 @@
-#!/bin/bash
+SRCURL=git://git.gnome.org/libxml2
-function package_build {
- run_git_switch_branch master
+ENV_PATH="bin:lib:include"
+ENV_LD_LIBRARY_PATH="lib"
+ENV_PKG_CONFIG_PATH="lib/pkgconfig"
+ENV_MANPATH="share/man"
- run_autoreconf -i
- run_configure --with-python-install-dir="${bindir}/lib/python"
-
- run_make
- run_make_install
-}
-
-function package_get_source {
- run_git_clone git://git.gnome.org/libxml2
-}
-
-function package_use {
- env_path "bin"
- env_path "lib"
- env_path "include"
- env_man "share/man"
- env_lib_library_path "lib"
- env_pkg_config_path "lib/pkgconfig"
-}
+BUILD_TYPE="automake"
+CONFIGURE_FLAGS="--with-python-install-dir="${bindir}/lib/python""
diff --git a/packages/manaplus.sh b/packages/manaplus.sh
new file mode 100644
index 0000000..1b784f1
--- /dev/null
+++ b/packages/manaplus.sh
@@ -0,0 +1,6 @@
+SRCURL=https://gitlab.com/manaplus/manaplus.git
+
+ENV_PATH="bin"
+ENV_MANPATH="share/man"
+
+BUILD_TYPE="automake"
diff --git a/packages/physfs.sh b/packages/physfs.sh
index d32d303..9addbb0 100755..100644
--- a/packages/physfs.sh
+++ b/packages/physfs.sh
@@ -1,21 +1,9 @@
-#!/bin/bash
+SRCTYPE=hg
+SRCURL=https://hg.icculus.org/icculus/physfs/
+DEFAULT_BRANCH="stable-2.0"
-function package_build {
- run_hg_switch_branch stable-2.0
- run_cmake
+ENV_PATH="bin:lib:include"
+ENV_LD_LIBRARY_PATH="lib"
+ENV_PKG_CONFIG_PATH="lib/pkgconfig"
- run_make
- run_make_install
-}
-
-function package_get_source {
- run_hg_clone https://hg.icculus.org/icculus/physfs/
-}
-
-function package_use {
- env_path "bin"
- env_path "lib"
- env_path "include"
- env_lib_library_path "lib"
- env_pkg_config_path "lib/pkgconfig"
-}
+BUILD_TYPE="cmake"
diff --git a/packages/qemu.sh b/packages/qemu.sh
index 8e86740..169fb1b 100755..100644
--- a/packages/qemu.sh
+++ b/packages/qemu.sh
@@ -1,30 +1,15 @@
-#!/bin/bash
-
-function package_build {
- run_git_switch_branch master
- run_configure \
- --target-list=x86_64-linux-user,x86_64-softmmu \
- --disable-nettle \
- --enable-spice \
- --enable-vte \
- --audio-drv-list=sdl,alsa \
- --enable-virglrenderer \
- --enable-sdl \
- --with-sdlabi=2.0
-
- run_make
- run_make_install
-}
-
-function package_get_source {
- run_git_clone git://git.qemu-project.org/qemu.git
-}
-
-function package_deps {
- run_add_dep virglrenderer
-}
-
-function package_use {
- env_bin "bin"
- env_man "share/man"
-}
+SRCURL=git://git.qemu-project.org/qemu.git
+
+ENV_PATH="bin"
+ENV_MANPATH="share/man"
+
+BUILD_TYPE="configure"
+CONFIGURE_FLAGS="\
+ --target-list=x86_64-linux-user,x86_64-softmmu \
+ --disable-nettle \
+ --enable-spice \
+ --enable-vte \
+ --audio-drv-list=sdl,alsa \
+ --enable-virglrenderer \
+ --enable-sdl \
+ --with-sdlabi=2.0"
diff --git a/packages/virglrenderer.sh b/packages/virglrenderer.sh
index 5ce3ba8..30eeabc 100755..100644
--- a/packages/virglrenderer.sh
+++ b/packages/virglrenderer.sh
@@ -1,20 +1,9 @@
-#!/bin/bash
+SRCURL=git://people.freedesktop.org/~airlied/virglrenderer
-function package_build {
- run_git_switch_branch master
- run_autoreconf -v --install
- run_configure
- run_make
- run_make_install
-}
+ENV_PATH="bin"
+ENV_LD_LIBRARY_PATH="lib"
+ENV_PKG_CONFIG_PATH="lib/pkgconfig"
+ENV_MANPATH="share/man"
-function package_get_source {
- run_git_clone git://people.freedesktop.org/~airlied/virglrenderer
-}
-
-function package_use {
- env_path "bin"
- env_lib_library_path "lib"
- env_pkg_config_path "lib/pkgconfig"
- env_man "share/man"
-}
+BUILD_TYPE="automake"
+AUTORECONF_FLAGS="-v --install"
diff --git a/packages/zlib.sh b/packages/zlib.sh
index b95f940..4a8c662 100755..100644
--- a/packages/zlib.sh
+++ b/packages/zlib.sh
@@ -1,21 +1,9 @@
-#!/bin/bash
+SRCURL=https://github.com/madler/zlib.git
+DEFAULT_BRANCH="v1.2.11"
-function package_build {
- run_git_switch_branch v1.2.11
- run_configure
+ENV_PATH="bin:lib:include"
+ENV_LD_LIBRARY_PATH="lib"
+ENV_PKG_CONFIG_PATH="lib/pkgconfig"
+ENV_MANPATH="share/man"
- run_make
- run_make_install
-}
-
-function package_get_source {
- run_git_clone https://github.com/madler/zlib.git
-}
-
-function package_use {
- env_path "lib"
- env_path "include"
- env_man "share/man"
- env_lib_library_path "lib"
- env_pkg_config_path "lib/pkgconfig"
-}
+BUILD_TYPE="configure"
diff --git a/packages/zlib_ng.sh b/packages/zlib_ng.sh
new file mode 100644
index 0000000..49af866
--- /dev/null
+++ b/packages/zlib_ng.sh
@@ -0,0 +1,9 @@
+SRCURL=https://github.com/Dead2/zlib-ng.git
+DEFAULT_BRANCH="develop"
+
+ENV_PATH="bin:lib:include"
+ENV_LD_LIBRARY_PATH="lib"
+ENV_PKG_CONFIG_PATH="lib/pkgconfig"
+ENV_MANPATH="share/man"
+
+BUILD_TYPE="configure"
diff --git a/scripts/include/common.sh b/scripts/include/common.sh
index e286f5d..0df1bba 100644
--- a/scripts/include/common.sh
+++ b/scripts/include/common.sh
@@ -55,6 +55,9 @@ function common_package_init {
fi
export packagefile="${package}.sh"
+ export SRCTYPE="git"
+ export DEFAULT_BRANCH="master"
+ export AUTORECONF_FLAGS="-i"
if [ ! -f "../packages/${packagefile}" ]; then
echo "Error: Package '${package}' not exists."
@@ -70,22 +73,6 @@ function common_run_package {
check_error $?
}
-function common_use_package {
- cd "${scriptsdir}"
- check_error $?
- export envfile="../env/run${envname}.sh"
- echo "#!/bin/bash" >"${envfile}"
- check_error $?
- echo "" >>"${envfile}"
- echo "package_use"
- package_use
- check_error $?
- echo "\$*" >>"${envfile}"
- check_error $?
- chmod 0755 "${envfile}"
- check_error $?
-}
-
function env_path {
echo "export PATH=${bindir}/$1:\$PATH" >>"${envfile}"
check_error $?
@@ -107,29 +94,59 @@ function env_man {
}
function run_autoreconf {
+ flags="$*"
+ if [[ "${flags}" == "" ]]; then
+ flags="${AUTORECONF_FLAGS}"
+ fi
cd "${srcdir}"
check_error $?
echo "make distclean"
make distclean
- echo "autoreconf $*"
- autoreconf $*
+ echo "autoreconf ${flags}"
+ autoreconf ${flags}
+ unset flags
+ return 0
+}
+
+function run_src_script {
+ cd "${srcdir}"
+ check_error $?
+ echo $*
+ $*
check_error $?
}
+function run_enable_same_dir_build {
+ echo "copy sources from $srcdir to ${builddir}"
+ cp -r "$srcdir" "${builddir}/.."
+ export srcdir="$builddir"
+ echo "change src dir to $srcdir"
+}
+
function run_configure {
+ flags="$*"
+ if [[ "${flags}" == "" ]]; then
+ flags="${CONFIGURE_FLAGS}"
+ fi
cd "${builddir}"
check_error $?
- echo "configure --prefix=\"${bindir}\" $*"
- "$srcdir"/configure --prefix="${bindir}" $*
+ echo "configure --prefix=\"${bindir}\" ${flags}"
+ "$srcdir"/configure --prefix="${bindir}" ${flags}
check_error $?
+ unset flags
}
function run_cmake {
+ flags="$*"
+ if [[ "${flags}" == "" ]]; then
+ flags="${CONFIGURE_FLAGS}"
+ fi
cd "${builddir}"
check_error $?
- echo "cmake -DCMAKE_INSTALL_PREFIX:PATH=\"${bindir}\" \"$srcdir\" $*"
- cmake -DCMAKE_INSTALL_PREFIX:PATH="${bindir}" "$srcdir" $*
+ echo "cmake -DCMAKE_INSTALL_PREFIX:PATH=\"${bindir}\" \"$srcdir\" ${flags}"
+ cmake -DCMAKE_INSTALL_PREFIX:PATH="${bindir}" "$srcdir" ${flags}
check_error $?
+ unset flags
}
function run_make {
@@ -156,6 +173,17 @@ function run_hg_clone {
check_error $?
}
+function run_clone {
+ if [[ "${SRCTYPE}" == "git" ]]; then
+ run_git_clone $1
+ elif [[ "${SRCTYPE}" == "hg" ]]; then
+ run_hg_clone $1
+ else
+ echo "Error: unknown SRCTYPE: ${SRCTYPE}"
+ exit 1
+ fi
+}
+
function run_git_switch_branch {
cd "${srcdir}"
check_error $?
@@ -179,17 +207,81 @@ function run_hg_switch_branch {
check_error $?
}
+function run_switch_branch {
+ branch="$1"
+ if [[ "${DEFAULT_BRANCH}" == "" ]]; then
+ echo "Error: source branch not set."
+ exit 1
+ fi
+ if [[ "${branch}" == "" ]]; then
+ branch="${DEFAULT_BRANCH}"
+ fi
+
+ if [[ "${SRCTYPE}" == "git" ]]; then
+ run_git_switch_branch ${branch}
+ elif [[ "${SRCTYPE}" == "hg" ]]; then
+ run_hg_switch_branch ${branch}
+ else
+ echo "Error: unknown SRCTYPE: ${SRCTYPE}"
+ exit 1
+ fi
+ unset branch
+}
+
+function repack_paths {
+ if [[ "$1" == "" ]]; then
+ return
+ fi
+ IFS=":"
+ packedpaths=""
+ for var in $1
+ do
+ packedpaths="${packedpaths}${bindir}/$var:"
+ done
+ unset IFS
+ echo "export $2=${packedpaths}\$$2" >>"${envfile}"
+ check_error $?
+}
+
function package_use {
- env_path "bin"
- env_lib_library_path "lib"
+ echo "package_use"
+ repack_paths "$ENV_PATH" "PATH"
+ repack_paths "$ENV_LD_LIBRARY_PATH" "LD_LIBRARY_PATH"
+ repack_paths "$ENV_PKG_CONFIG_PATH" "PKG_CONFIG_PATH"
+ repack_paths "$ENV_MANPATH" "MANPATH"
+}
+
+function common_use_package {
+ cd "${scriptsdir}"
+ check_error $?
+ export envfile="../env/run${envname}.sh"
+ echo "#!/bin/bash" >"${envfile}"
+ check_error $?
+ echo "" >>"${envfile}"
+ package_use
+ check_error $?
+ echo "\$*" >>"${envfile}"
+ check_error $?
+ chmod 0755 "${envfile}"
+ check_error $?
+}
+
+function package_get_source {
+ echo "package_get_source"
+ run_clone "${SRCURL}"
}
function package_update_source {
+ echo "package_update_source"
cd "../src/${package}"
if [ -d .git ]; then
echo "git fetch origin"
- git fetch origin
- return
+ git fetch --all
+ check_error $?
+ run_switch_branch
+ echo "git pull --rebase"
+ git pull --rebase --all
+ return 0
fi
if [ -d .hg ]; then
echo "hg pull"
@@ -203,3 +295,35 @@ function common_clean_destination {
echo "clean ${bindir}"
rm -rf "${bindir}"
}
+
+function package_build {
+ echo "package_build"
+ run_switch_branch
+
+ if [[ "$ENABLE_SAME_DIR_BUILD" != "" ]]; then
+ run_enable_same_dir_build
+ fi
+ if [[ "$SRC_INIT_COMMAND" != "" ]]; then
+ run_src_script "$SRC_INIT_COMMAND"
+ fi
+
+ case "$BUILD_TYPE" in
+ automake)
+ run_autoreconf
+ run_configure
+ ;;
+ configure)
+ run_configure
+ ;;
+ cmake)
+ run_cmake
+ ;;
+ *)
+ echo "Error: unknown BUILD_TYPE. Valid values: automake, configure, cmake"
+ exit 1
+ ;;
+ esac
+
+ run_make
+ run_make_install
+}