add @ladyada's libgpiod install instrux to script
This commit is contained in:
parent
91b7905615
commit
9cf7522fa8
1 changed files with 44 additions and 0 deletions
44
libgpiod.sh
Executable file
44
libgpiod.sh
Executable file
|
|
@ -0,0 +1,44 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Instructions!
|
||||
# cd ~
|
||||
# wget https://raw.githubusercontent.com/adafruit/Raspberry-Pi-Installer-Scripts/master/libgpiod.sh
|
||||
# chmod +x libgpiod.sh
|
||||
# ./adafruit-pitft.sh
|
||||
|
||||
|
||||
echo "Installing build requirements - this may take a few minutes!"
|
||||
echo
|
||||
|
||||
sudo apt-get update && sudo apt-get install -y \
|
||||
autoconf \
|
||||
autoconf-archive \
|
||||
automake \
|
||||
build-essential \
|
||||
git \
|
||||
libtool \
|
||||
pkg-config \
|
||||
python3 \
|
||||
python3-dev \
|
||||
python3-setuptools \
|
||||
raspberrypi-kernel-headers \
|
||||
swig3.0 \
|
||||
wget
|
||||
|
||||
build_dir=`mktemp -d /tmp/libgpiod.XXXX`
|
||||
echo "Cloning libgpiod repository to $build_dir"
|
||||
echo
|
||||
|
||||
cd "$build_dir"
|
||||
git clone git://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git .
|
||||
|
||||
echo "Building libgpiod"
|
||||
echo
|
||||
|
||||
export PYTHON_VERSION=3
|
||||
./autogen.sh --enable-tools=yes --prefix=/usr/local/ --enable-bindings-python CFLAGS="-I/usr/include/python3.5/" \
|
||||
&& make \
|
||||
&& sudo make install \
|
||||
&& sudo ldconfig
|
||||
|
||||
exit 0
|
||||
Loading…
Reference in a new issue