summarylogtreecommitdiffstats
path: root/010-intel-media-stack-bin-fix-install.patch
blob: 64c438df2fb0d3fd1b8b0480ec39455fc79b7336 (plain)
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
diff -Naurp a/install_media.sh b/install_media.sh
--- a/install_media.sh	2019-07-09 15:14:08.000000000 +0000
+++ b/install_media.sh	2020-06-07 12:51:16.920145955 +0000
@@ -21,6 +21,8 @@
 # this notice or any other notice embedded in Materials by Intel or Intel's
 # suppliers or licensors in any way.
 
+pkgdir=
+
 # Set Bash color
 ECHO_PREFIX_INFO="\033[1;32;40mINFO...\033[0;0m"
 ECHO_PREFIX_ERROR="\033[1;31;40mError...\033[0;0m"
@@ -87,21 +89,21 @@ fi
 
 # Install MSDK
 if [ -d $MEDIASDK_DIR ]; then
-    try_command rm -fr /$MEDIASDK_DIR
-    try_command mkdir -p /$MEDIASDK_DIR
-    try_command cp -dfr $MEDIASDK_DIR/* /$MEDIASDK_DIR
-    echo -e $ECHO_PREFIX_INFO "MediaSDK installed successfully in /$MEDIASDK_DIR!"
+    try_command rm -fr ${pkgdir}/$MEDIASDK_DIR
+    try_command mkdir -p ${pkgdir}/$MEDIASDK_DIR
+    try_command cp -dfr $MEDIASDK_DIR/* ${pkgdir}/$MEDIASDK_DIR
+    echo -e $ECHO_PREFIX_INFO "MediaSDK installed successfully in ${pkgdir}/$MEDIASDK_DIR!"
 else
     echo -e $ECHO_PREFIX_ERROR "MediaSDK missed in this package!"
 fi
 
 echo -e $ECHO_PREFIX_INFO "Installing Config files..."
 if [ -f etc/profile.d/intel-mediasdk.sh ]; then
-    try_command cp -f etc/profile.d/intel-mediasdk.* /etc/profile.d/
-    echo -e  $ECHO_PREFIX_INFO "The LIBVA_DRIVERS_PATH/LIBVA_DRIVER_NAME will be exported through /etc/profile.d/intel-mediasdk.(c)sh for intel media solution. Please reboot to make it effective."
+    try_command cp -f etc/profile.d/intel-mediasdk.* ${pkgdir}/etc/profile.d/
+    echo -e  $ECHO_PREFIX_INFO "The LIBVA_DRIVERS_PATH/LIBVA_DRIVER_NAME will be exported through ${pkgdir}/etc/profile.d/intel-mediasdk.(c)sh for intel media solution."
 fi
 if [ -f etc/profile.d/intel-mediasdk-devel.sh ]; then
-    try_command cp -f etc/profile.d/intel-mediasdk-devel.* /etc/profile.d/
+    try_command cp -f etc/profile.d/intel-mediasdk-devel.* ${pkgdir}/etc/profile.d/
 fi
 
 # !!! IMPORTANT !!!
@@ -109,11 +111,8 @@ fi
 #    'ldconfig'
 # missing anything
 if [ -d etc/ld.so.conf.d ]; then
-    try_command mkdir -p /etc/ld.so.conf.d
-    try_command cp -dfr etc/ld.so.conf.d/* /etc/ld.so.conf.d/
-    echo -e $ECHO_PREFIX_INFO "Calling ldconfig after all user-space drivers and config files are in place..."
-    try_command ldconfig
-    echo -e $ECHO_PREFIX_INFO "Calling to ldconfig is done."
+    try_command mkdir -p ${pkgdir}/etc/ld.so.conf.d
+    try_command cp -dfr etc/ld.so.conf.d/* ${pkgdir}/etc/ld.so.conf.d/
 fi
 
-echo -e $ECHO_PREFIX_INFO "Package installation Done. Please Reboot."
+echo -e $ECHO_PREFIX_INFO "Package installation Done."