Skip to content
Snippets Groups Projects
Commit 51183ef1 authored by Ciro Santilli's avatar Ciro Santilli
Browse files

Global install option

parent 0e0afc1b
No related branches found
No related tags found
No related merge requests found
...@@ -10,16 +10,28 @@ I'd rather have a single Git repo, but without official support, maintaining a m ...@@ -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: 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 ./ubuntu-15.10-run.sh
Stdout and stderr go to `daemon.log` and `client-gnome.log`.
Stop daemon and client: Stop daemon and client:
./ubuntu-15.10-stop.sh ./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 ## Ubuntu 15.10 host Android device
This script does not automate the installation of any Android development tools. This script does not automate the installation of any Android development tools.
......
...@@ -2,7 +2,31 @@ ...@@ -2,7 +2,31 @@
# Build and install to a local prefix under this repository. # 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 ./ubuntu-15.10-dependencies.sh
...@@ -18,27 +42,34 @@ cd native ...@@ -18,27 +42,34 @@ cd native
make -j$(nproc) make -j$(nproc)
cd "${DAEMON}" cd "${DAEMON}"
./autogen.sh ./autogen.sh
if $global; then
./configure
else
./configure --prefix="${INSTALL}/daemon" ./configure --prefix="${INSTALL}/daemon"
fi
make -j$(nproc) make -j$(nproc)
make install make_install $global
cd "${TOP}/lrc" cd "${TOP}/lrc"
mkdir -p build mkdir -p build
cd 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, # 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 # 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
make install make_install $global
cd "${TOP}/client-gnome" cd "${TOP}/client-gnome"
mkdir -p build mkdir -p build
cd build cd build
cmake .. \ if $global; then
-DCMAKE_INSTALL_PREFIX="${INSTALL}/client-gnome" \ cmake ..
-DLibRingClient_DIR="${INSTALL}/lrc/lib/cmake/LibRingClient" else
cmake .. -DCMAKE_INSTALL_PREFIX="${INSTALL}/client-gnome" -DLibRingClient_DIR="${INSTALL}/lrc/lib/cmake/LibRingClient"
fi
make make
make install make_install $global
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment