-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathpbp-install-libcamera
executable file
·64 lines (52 loc) · 1.4 KB
/
pbp-install-libcamera
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/sh
### Package: pbp-install-libcamera
### Version: v20200724.2300
### Author: Michael Gan "xmixahlx" [email protected]
### License: GPLv3
### Script Dependencies: (none)
## PBPTOOLSDIR
if [ -z $PBPTOOLSDIR ]; then
PBPTOOLSDIR="`pwd`"
fi
## VARS
DATE=`date +%Y%m%d%H%M%S`
RESDIR=$PBPTOOLSDIR/resources
DEVDIR=$PBPTOOLSDIR/upstream
GITREPO=git://git.linuxtv.org
GITTREE=libcamera
GITBRANCH=master
PKGDIR=$GITTREE\_$GITBRANCH
## DEPS
# Provide INSTALLDEPS=debian to install dependencies.
if [ $INSTALLDEPS ]; then
if [ $INSTALLDEPS = debian ]; then
sudo apt-get -y install build-essential coreutils libc-bin git meson \
python3-sphinx doxygen python3-yaml pkg-config libudev-dev libgnutls28-dev \
openssl libboost-dev qtbase5-dev libqt5core5a libqt5gui5 libqt5widgets5
libgstreamer-plugins-base1.0-dev libtiff-dev qt5-default libgnutls28-dev \
libgstreamer1.0-dev qttools5-dev-tools graphviz
fi
fi
## PREP
set -e
mkdir -p $DEVDIR
cd $DEVDIR
## GIT
[ -d $PKGDIR ] || git clone --depth=1 $GITREPO/$GITTREE.git --branch=$GITBRANCH $PKGDIR
cd $PKGDIR
git clean -f
git reset --hard HEAD
git pull
## CLEAN
rm -Rf tmpbuild
## CONFIGURE
meson tmpbuild --buildtype=release --prefix=/usr/local --libdir=/usr/local/lib/aarch64-linux-gnu \
-Ddocumentation=true -Dqcam=enabled -Dgstreamer=enabled -Dv4l2=true
## BUILD
ninja -C tmpbuild
## INSTALL
sudo ninja -C tmpbuild install
sudo ldconfig
## EXIT
exit
## ENJOY