-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.sh
executable file
·60 lines (51 loc) · 1.36 KB
/
build.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
#!/bin/bash
set -e
release="Release"
prefix="/usr/local"
if [ "$(uname -o)" = "GNU/Linux" ];then
prefix="/usr"
fi
args_array=("$@")
for arg in "${args_array[@]}";do
case "$arg" in
release=*) release="${arg#*=}"; shift ;;
prefix=*) prefix="${arg#*=}"; shift ;;
-D*|-U*) true ;;
*) echo "Invalid argument: $arg"
exit 1 ;;
esac
done
if [ "$prefix" != "/usr" ] && [ "$prefix" != "/usr/local" ];then
echo ""
echo "WARNING: you will have to setup PATH and LD_LIBRARY_PATH like this:"
echo ""
echo " export PATH=\"\${PATH}:$prefix/bin\""
echo " export LD_LIBRARY_PATH=\"\${LD_LIBRARY_PATH}:$prefix/lib\""
echo ""
sleep 3;
export PATH="${PATH}:$prefix/bin"
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:$prefix/lib"
fi
sudo=""
if [ "$(id -u)" != "0" ];then
if ! which sudo ;then
echo "Sudo is not available"
exit 1
fi
sudo="sudo"
fi
packs=("ariya-icons" "kdelibs" "kde-workspace")
source "$(dirname $0)/fetch.sh"
for p in "${packs[@]}";do
# rm -rf "$p-build"
mkdir -p "$p-build" && cd "$p-build"
cmake "../$p" \
-DCMAKE_BUILD_TYPE="$release" \
-DENABLE_TESTING=OFF \
-DCMAKE_SKIP_INSTALL_RPATH=ON \
-DCMAKE_INSTALL_PREFIX="$prefix" \
-DSYSCONF_INSTALL_DIR=/etc
make
$sudo make install
cd ..
done