summaryrefslogtreecommitdiff
path: root/libs/libmdbx/src/package.sh
blob: d7f9ab297ab09ce976e4e08677288ae5c9e5a335 (plain)
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
#!/bin/bash
set -e

CONFIG=$1

if [[ -z "${CONFIG}" ]]; then
    CONFIG=Debug
fi

DIRNAME=`dirname ${BASH_SOURCE[0]}`
DIRNAME=`readlink --canonicalize ${DIRNAME}`

if [[ -r /opt/rh/devtoolset-6/enable ]]; then
    source /opt/rh/devtoolset-6/enable
fi

mkdir -p cmake-build-${CONFIG}
pushd  cmake-build-${CONFIG} &> /dev/null
if [[ ! -r Makefile ]]; then
    cmake .. -DCMAKE_BUILD_TYPE=${CONFIG}
fi
rm -f *.rpm
make -j8 package || exit 1
rm -f *-Unspecified.rpm
popd &> /dev/null