-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathget_ffmpeg-full_arch
More file actions
66 lines (57 loc) · 2.49 KB
/
get_ffmpeg-full_arch
File metadata and controls
66 lines (57 loc) · 2.49 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
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
65
66
#!/bin/bash
## Semi-automatic script to download build and install ffmpeg-full on arch linux
## Req.: grep hash head tail wc git wget make gcc... Use: ./get_ffmpeg-full_arch
## Author Andrew S. Licence GPL
## https://github.com/quarkscript/Build_from_source
## https://gitlab.com/quarkscript/arch_linux_scripts/tree/master/pkgs_builds_scripts
if [ ! -f sfslib ]; then
## get required Simple_func_scripts from github source
wget https://raw.githubusercontent.com/quarkscript/Simple_func_scripts/master/sfslib
fi
if [ ! -f sfslib ]; then
## get required Simple_func_scripts from gitlab source
wget https://gitlab.com/quarkscript/arch_linux_scripts/raw/master/pkgs_builds_scripts/sfslib
fi
## patch sfslib to make no asks, required for ocheb-builds
#cat sfslib | sed 's/sudo pacman/yes | sudo pacman/g' >sfslib. ; mv -f sfslib. sfslib
chmod +x sfslib
if [ ! -x sfslib ]; then
echo '
There is some problem of getting required sfslib
you may download it manually from one of sourses:
https://github.com/quarkscript/Build_from_source
https://gitlab.com/quarkscript/arch_linux_scripts/tree/master/pkgs_builds_scripts
Build process interrupted'
exit 1
fi
./sfslib cxx_flags
## For make a local hardware independent builds uncomment next line
#echo "">cxxflags.txt
## modding conditions, it cannot be written directly because in that case it will exec before writed
mod_condition_0='$(find -maxdepth 1 -type d | grep ffmpeg-full -q)'
mod_condition_1='$(pacman -Qqe | grep -xq chromaprint)'
## modscript
cat<<EOEFF>modscript
#!/bin/bash
## global mod for all aur-packages
## local mods for specified aur-packages
## mod ffmpeg-full PKGBUILD
if $mod_condition_0; then
## switch from chromaprint-fftw to chromaprint if it already installed
if $mod_condition_1; then
./sfslib mcolif 'ffmpeg-full/PKGBUILD' 'chromaprint-fftw' 'chromaprint-fftw' 'chromaprint'
fi
fi
EOEFF
chmod +x modscript
## by default aurget tries to remove sha and pgp checks in all used PKGBUILDs
## it lower security but in same time it lower build fail probability
## if you want more secure and you are sure that all used PKGBUILDs updated
## to its appropriate sourcecode then use nonempty use_checks variable
use_checks=''
./sfslib aurget ffmpeg-full '' "./modscript" "$use_checks"
## as intelmedia propose
if ( $(lspci | grep VGA | grep Intel -q) ); then
cat /etc/profile.d/intel-media.sh | sed -e 's/#export LIBVA_DRIVER_NAME=iHD/export LIBVA_DRIVER_NAME=iHD/g'>intel-media.sh
sudo mv -f intel-media.sh /etc/profile.d/intel-media.sh
fi