Repository navigation
Expand file tree
/
Copy pathbuild.sh
More file actions
28 lines (27 loc) · 1.52 KB
/
Copy pathbuild.sh
File metadata and controls
28 lines (27 loc) · 1.52 KB
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
#!/bin/sh
set -eu
HERE=$(cd "$(dirname "$0")" && pwd)
OUT=${PBOUT:-/opt/pipbox/gst}
B=/var/tmp/pbbuild
R=$B/root
mkdir -p "$B/debs" "$R" "$OUT"
if [ ! -f "$R/usr/include/gstreamer-1.0/gst/video/gstvideofilter.h" ]; then
(cd "$B/debs" && apt-get -o APT::Sandbox::User=root download libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libglib2.0-dev \
&& for d in *.deb; do dpkg -x "$d" "$R"; done)
fi
gcc -O2 -Wall -fPIC -shared -DPACKAGE=\"irl4you-pip\" "$HERE/gstpbpip.c" -o "$OUT/libgstpbpip.so.new" \
-I"$R/usr/include/gstreamer-1.0" -I"$R/usr/lib/aarch64-linux-gnu/gstreamer-1.0/include" \
-I"$R/usr/include/glib-2.0" -I"$R/usr/lib/aarch64-linux-gnu/glib-2.0/include" \
-l:libgstvideo-1.0.so.0 -l:libgstbase-1.0.so.0 -l:libgstreamer-1.0.so.0 \
-l:libgobject-2.0.so.0 -l:libglib-2.0.so.0
mv -f "$OUT/libgstpbpip.so.new" "$OUT/libgstpbpip.so"
echo "Baustein gebaut: $OUT/libgstpbpip.so"
if [ -f "$HERE/gstpbpixel.c" ]; then
gcc -O2 -Wall -fPIC -shared -DPACKAGE=\"irl4you-pip\" "$HERE/gstpbpixel.c" -o "$OUT/libgstpbpixel.so.new" \
-I"$R/usr/include/gstreamer-1.0" -I"$R/usr/lib/aarch64-linux-gnu/gstreamer-1.0/include" \
-I"$R/usr/include/glib-2.0" -I"$R/usr/lib/aarch64-linux-gnu/glib-2.0/include" \
-l:libgstvideo-1.0.so.0 -l:libgstbase-1.0.so.0 -l:libgstreamer-1.0.so.0 \
-l:libgobject-2.0.so.0 -l:libglib-2.0.so.0 \
&& mv -f "$OUT/libgstpbpixel.so.new" "$OUT/libgstpbpixel.so" && echo "Baustein gebaut: $OUT/libgstpbpixel.so" \
|| echo "WARNUNG: Der Datenschutz-Baustein konnte nicht gebaut werden."
fi