Commit 51183ef1 authored by Ciro Santilli's avatar Ciro Santilli

Global install option

parent 0e0afc1b
......@@ -10,16 +10,28 @@ I'd rather have a single Git repo, but without official support, maintaining a m
Build and install locally under this repository:
./ubuntu-15.10-local-install.sh
./ubuntu-15.10-install.sh
Run daemon and client on background:
Run daemon and client that were installed locally on the background:
./ubuntu-15.10-run.sh
Stdout and stderr go to `daemon.log` and `client-gnome.log`.
Stop daemon and client:
./ubuntu-15.10-stop.sh
Install globally for all users instead:
./ubuntu-15.10-install.sh -g
Run global install:
gnome-ring
This already starts the daemon for us.
## Ubuntu 15.10 host Android device
This script does not automate the installation of any Android development tools.
......
......@@ -2,7 +2,31 @@
# Build and install to a local prefix under this repository.
set -e
# Flags:
# -g: install globally instead for all users
set -ex
global=false
while getopts g OPT; do
case "$OPT" in
g)
global='true'
;;
\?)
exit 1
;;
esac
done
make_install() {
if $1; then
sudo make install
else
make install
fi
}
./ubuntu-15.10-dependencies.sh
......@@ -18,27 +42,34 @@ cd native
make -j$(nproc)
cd "${DAEMON}"
./autogen.sh
./configure --prefix="${INSTALL}/daemon"
if $global; then
./configure
else
./configure --prefix="${INSTALL}/daemon"
fi
make -j$(nproc)
make install
make_install $global
cd "${TOP}/lrc"
mkdir -p build
cd build
if $global; then
cmake .. -DCMAKE_BUILD_TYPE=Debug
else
cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX="${INSTALL}/lrc" -DRING_BUILD_DIR="${DAEMON}/src"
fi
# If we don't use -DENABLE_STATIC here and on the client,
# we'd have to point LD_LIBRARY_PATH to the directory containing libringclient.so
cmake .. \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX="${INSTALL}/lrc" \
-DRING_BUILD_DIR="${DAEMON}/src"
make
make install
make_install $global
cd "${TOP}/client-gnome"
mkdir -p build
cd build
cmake .. \
-DCMAKE_INSTALL_PREFIX="${INSTALL}/client-gnome" \
-DLibRingClient_DIR="${INSTALL}/lrc/lib/cmake/LibRingClient"
if $global; then
cmake ..
else
cmake .. -DCMAKE_INSTALL_PREFIX="${INSTALL}/client-gnome" -DLibRingClient_DIR="${INSTALL}/lrc/lib/cmake/LibRingClient"
fi
make
make install
make_install $global
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment