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?
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