-
Notifications
You must be signed in to change notification settings - Fork 18
/
bootstrap.sh
executable file
·118 lines (104 loc) · 4.03 KB
/
bootstrap.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
#!/bin/bash
# Copyright 2007-2018 Zuse Institute Berlin
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
## update version ##
VERSION=`cat VERSION`
VERSION_NOPLUS=`echo "${VERSION}" | tr + _`
if [[ "$VERSION" == *git* ]]; then
## maven snapshot versions must have revision incremented by 1 so that
## maven sees them as a newer version than the release
VERSION_NOGIT=${VERSION%+git*}
MAJOR_MINOR=${VERSION_NOGIT%.*}
REVISION=${VERSION_NOGIT##*.}
((REVISION++))
VERSION_MAVEN="$MAJOR_MINOR.$REVISION-SNAPSHOT"
else
VERSION_MAVEN=$VERSION
fi
## echo "Setting Scalaris version to ${VERSION}..."
## sed -e "s/-define(SCALARIS_VERSION, \".*\")\\./-define(SCALARIS_VERSION, \"${VERSION}\")./g" \
## -i include/scalaris.hrl
## sed -e "s/AC_INIT(scalaris, .*, scalaris@googlegroups.com)/AC_INIT(scalaris, ${VERSION}, scalaris@googlegroups.com)/g" \
## -i configure.ac
## sed -e "s/public static final String version = \".*\";/public static final String version = \"${VERSION}\";/g" \
## -i contrib/wikipedia/src/de/zib/scalaris/examples/wikipedia/bliki/WikiServlet.java
## sed -e "s/version='.*',/version='${VERSION}',/g" \
## -i python-api/setup.py
## sed -e "s/SCALARIS_VERSION=\".*\"/SCALARIS_VERSION=\"${VERSION}\"/g" \
## -i contrib/packages/*/checkout.sh
## sed -e "s/%define pkg_version .*/%define pkg_version ${VERSION}/g" \
## -i contrib/packages/*/*.spec
## sed -e "s/Version: .*-.*/Version: ${VERSION}-1/g" \
## -i contrib/packages/*/*.dsc
## sed -e "0,/(.*-.*)/s//(${VERSION}-1)/" \
## -i contrib/packages/*/debian.changelog
## sed -e "0,/<version>.*<\/version>/s//<version>${VERSION_MAVEN}<\/version>/" \
## -i java-api/pom.xml contrib/datanucleus/scalaris-datanucleus-store/pom.xml
## sed -e "s/module scalaris .*;/module scalaris ${VERSION_NOPLUS};/g" \
## -i contrib/systemd/scalaris.te
## if [[ "$VERSION" == *git* ]]; then
## RELEASE="unstable"
## else
## RELEASE="stable"
## fi
## sed -e "0,/u*n*stable;/s//${RELEASE};/" \
## -i contrib/packages/*/debian.changelog
## echo "done"
## sed -e "s/pkgver=.*/pkgver=${VERSION}/g" \
## -i contrib/packages/*/PKGBUILD
##########
if [ -z `which automake` ]
then
echo "automake is missing."
echo "Please install automake."
exit
fi
if [ -z `which aclocal` ]
then
echo "aclocal is missing."
echo "Please install automake."
exit
fi
# pretend to use automake
touch Makefile.am NEWS READ COPYING README INSTALL
if [ ! -d python3-api ]
then
mkdir python3-api
touch python3-api/scalaris.in
fi
cp Makefile.in Makefile.in.bak
echo "Creating configure script"
autoreconf --verbose --force --install # -Wall
echo ""
echo "A ./configure file should be created."
echo "Please proceed with calling './configure'"
# undo automake
rm Makefile.am NEWS READ COPYING README INSTALL
mv Makefile.in.bak Makefile.in
ACLOCAL=`which aclocal`
ACLOCAL_BIN_DIRECTORY=`dirname $ACLOCAL`
ACLOCAL_BASE_DIRECTORY=`dirname $ACLOCAL_BIN_DIRECTORY`
ACLOCAL_SHARE_DIRECTORY="$ACLOCAL_BASE_DIRECTORY/share/aclocal"
#echo $ACLOCAL_BIN_DIRECTORY
#echo $ACLOCAL_BASE_DIRECTORY
#echo $ACLOCAL_SHARE_DIRECTORY
if [ -e "$ACLOCAL_SHARE_DIRECTORY/intlmacosx.m4" ]; then
#echo "found aclocal directory"
if [ ! -e "$ACLOCAL_SHARE_DIRECTORY/ax_boost_system.m4" ]; then
echo ""
echo "for the save creation of the configure file, it is helpful to have the autoconf-archive package installed"
echo "autoconf-archive seems to be missing on your system"
echo "we checked for $ACLOCAL_SHARE_DIRECTORY/ax_boost_system.m4, but it does not exist"
fi
fi