[Pkg-running-devel] [openambit] 81/131: Fixed readme and added install script

Christian Perrier bubulle at moszumanska.debian.org
Thu Jul 17 20:19:13 UTC 2014


This is an automated email from the git hooks/post-receive script.

bubulle pushed a commit to branch master
in repository openambit.

commit ecaac025ceabb43e8d2b50bbc702b780cfa68f9a
Author: Emil Ljungdahl <emil at kratern.se>
Date:   Wed Jan 29 23:42:13 2014 +0100

    Fixed readme and added install script
---
 README     | 40 +++++++++++++++++++++++++++++++---------
 build.sh   | 12 ++++++++++--
 install.sh |  3 +++
 3 files changed, 44 insertions(+), 11 deletions(-)

diff --git a/README b/README
index 24214b1..d8ea771 100644
--- a/README
+++ b/README
@@ -3,20 +3,38 @@ OPENAMBIT
 
 The openambit source repository contains of several parts.
 Each part is briefly described below.
-For now there is really no good reason for installing the
-application, running it from the build directory is quite
-sufficient. Thus, the building instructions below has left
-out the installation parts.
+Most people would like to use both the device communication
+library (libambit) and the GUI (openambit). The build / install
+scripts described below makes your life easier if you are
+like most people.
+You can choose to run the GUI from the build folder or install
+it to your system.
 
 BUILD SCRIPT
 ============
-cd YOUR/git/REPO/loaction
-./buils.sh
+Builds libambit and openambit in one command
+> cd YOUR/git/REPO/loaction
+> ./build.sh
+
+
+BUILD AND INSTALL SCRIPT
+========================
+Builds and install libambit and openambit in one command.
+Note that the script will try to run sudo to install things.
+> cd YOUR/git/REPO/loaction
+> ./install.sh
 
 
 DEPENDENCIES
 ============
-sudo apt-get install libudev-dev libusb-1.0-0-dev libqjson-dev
+To be able to build libambit and openambit the following libraries
+(and their header files) needs to be available:
+ - libudev
+ - libusb
+ - libqjson
+
+For debian-based systems:
+> sudo apt-get install libudev-dev libusb-1.0-0-dev libqjson-dev
 
 
 src/libambit
@@ -28,6 +46,8 @@ Build instructions:
 > cd libambit-build
 > cmake ../src/libambit
 > make
+Optionally:
+> sudo make install
 
 
 src/openambit
@@ -39,10 +59,12 @@ Build instructions:
 First build libambit as instructed above
 > mkdir openambit-build
 > cd openambit-build
-> qmake ../src/openambit
+> cmake ../src/openambit
 > make
+Optionally:
+> sudo make install
 
-Run the application:
+Run the application without installing:
 > cd openambit-build
 > LD_LIBRARY_PATH=../libambit-build ./openambit
 
diff --git a/build.sh b/build.sh
index 55e50cd..50245c7 100755
--- a/build.sh
+++ b/build.sh
@@ -8,12 +8,20 @@ cd $SOURCE_LOCATION
 echo "------building libambit------"
 mkdir -p libambit-build
 cd libambit-build
-cmake -DCMAKE_BUILD_TYPE=Debug ../src/libambit
+cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr ../src/libambit
 make -j$CORES
+if [ "$DO_INSTALL" == "1" ]; then
+    echo "------installing libambit------"
+    sudo make install
+fi
 
 cd $SOURCE_LOCATION
 echo "------building openambit------"
 mkdir -p openambit-build
 cd openambit-build
-cmake -DCMAKE_BUILD_TYPE=Debug ../src/openambit
+cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr ../src/openambit
 make -j$CORES
+if [ "$DO_INSTALL" == "1" ]; then
+    echo "------installing openambit------"
+    sudo make install
+fi
diff --git a/install.sh b/install.sh
new file mode 100755
index 0000000..d88ce43
--- /dev/null
+++ b/install.sh
@@ -0,0 +1,3 @@
+export DO_INSTALL=1
+
+./build.sh

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-running/openambit.git



More information about the Pkg-running-devel mailing list