forked from sailfishos/qtmozembed
-
Notifications
You must be signed in to change notification settings - Fork 1
/
link_to_system.sh
executable file
·48 lines (39 loc) · 928 Bytes
/
link_to_system.sh
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
#!/bin/sh
TARGET_DIR=$1
if [ "$TARGET_DIR" = "" ]; then
echo "TARGET_DIR ex: /usr"
TARGET_DIR=/usr
fi
OBJPREFIX=$2
if [ "$OBJPREFIX" = "" ]; then
BARCH=`uname -m`
OBJPREFIX=objdir-$BARCH
fi
PREFIX=$TARGET_DIR/lib
mkdir -p $PREFIX
FILES_LIST="
$OBJPREFIX/src/libqtembedwidget.so
$OBJPREFIX/src/libqtembedwidget.so.1
$OBJPREFIX/src/libqtembedwidget.so.1.0
$OBJPREFIX/src/libqtembedwidget.so.1.0.0
"
for str in $FILES_LIST; do
fname="${str##*/}"
rm -f $PREFIX/$fname;
ln -s $(pwd)/$str $PREFIX/$fname;
done
rm -f $PREFIX/pkgconfig/qtembedwidget.pc;
ln -s $(pwd)/$OBJPREFIX/pkgconfig/qtembedwidget.pc $PREFIX/pkgconfig/qtembedwidget.pc
PREFIX=$TARGET_DIR/include
mkdir -p $PREFIX
FILES_LIST="
src/EmbedQtKeyUtils.h
src/qdeclarativemozview.h
src/qgraphicsmozview.h
src/qmozcontext.h
"
for str in $FILES_LIST; do
fname="${str##*/}"
rm -f $PREFIX/$fname;
ln -s $(pwd)/$str $PREFIX/$fname;
done