×
INDI Library v1.8.5 Released (19 Apr 2020)

April 2020 release of INDI Library v1.8.5 introduces new drivers while providing fixes and improvements to existing devices and core framework.

Building one driver only

6 months 4 weeks ago
ChrisRowland
Platinum Boarder
Platinum Boarder
Posts: 517
Karma: 9
More
Topic Author
Building one driver only #48066
I'm in the process of updating a driver and I need to install and run my local copy on a Pi Zero running Raspbian.

I'm developing on a Pi 4 and I've committed and pushed to my own repository.

I can clone this to the Pi Zero, in ~/Projects/indi

I can build following the process in AstroPi3 Raspbian but it takes for ever and I only want the indi server and my driver.
the build process is:
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=RelWithDebInfo ~/Projects/indi
make
sudo make install

I've tried:
make indi_celestron_gps

and this seems to just build indi_celestron_gps and it's dependencies but:

sudo make install

then builds all the things not built in the first run of make and

sudo make install indi_celestron_gps

seems to do the same.

would only build the celestron driver and it's dependencies?
Would I need to do something with the make install step?

Chris

Please Log in or Create an account to join the conversation.

6 months 4 weeks ago 6 months 4 weeks ago by Marc2b.
Marc2b
Expert Boarder
Expert Boarder
Posts: 119
Karma: 1
More
Building one driver only #48069
Try this:

cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=RelWithDebInfo ~/Projects/indi

then go to your build directory

make indi_celestron_gps #(just like you did!)

when build is over, a little shell script with something like

~~~~~~~~~~~~~~~~~~~~~
#!/bin/sh
sudo cp -av indi_celestron_gps /your_bin_directory #( generally /usr/bin )
sudo cp -av libindidriver.so.* /your_lib_directory #( generally /usr/lib )
sudo ldconfig -v /your_lib_directory #( so the cache is updated )
~~~~~~~~~~~~~~~~~~~~~

Adapt to your own locations and that should do it. :)

- Marc
The following user(s) said Thank You ChrisRowland

Please Log in or Create an account to join the conversation.

6 months 3 weeks ago
ChrisRowland
Platinum Boarder
Platinum Boarder
Posts: 517
Karma: 9
More
Topic Author
Building one driver only #48180
Thanks for the help, this is what i ended up with, it will update the sources from my personal repositiory, buid and distribute.
Lifted the sudo check from AstroPi3, thanks.
There are a couple of reads that give me a chance to review what's going on, they can be commented out of course.
#!/bin/bash

if [ "$(whoami)" != "root" ]; then
        echo "Please run this script with sudo due to the fact that it must do a number of sudo tasks.  Exiting now."
        exit 1
elif [ -z "$BASH_VERSION" ]; then
        echo "Please run this script in a BASH shell because it is a script written using BASH commands.  Exiting now."
        exit 1
else
        echo "You are running BASH $BASH_VERSION as the root user."
fi

export USERHOME=$(sudo -u $SUDO_USER -H bash -c 'echo $HOME')

echo "kill indi server because it seems to upset things"
pkill indiserver

echo "get the latest sources"
cd $USERHOME/Projects/indi
git pull

# set the build directory
cd $USERHOME/Projects/indi-build

# read -p "run cmake"
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=RelWithDebInfo $USERHOME/Projects/indi

# read -p "$ make indi_celestron_gps"
make indi_celestron_gps

read -p "distribute the required files"

sudo cp -av indi_celestron_gps /usr/bin
sudo cp -av libindidriver.so.* /usr/lib
read -p "update the configuration"
sudo ldconfig -v /usr/lib

Please Log in or Create an account to join the conversation.

Time to create page: 0.269 seconds