-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathget_ffmpeg-full_arch.old
More file actions
executable file
·179 lines (155 loc) · 5.71 KB
/
get_ffmpeg-full_arch.old
File metadata and controls
executable file
·179 lines (155 loc) · 5.71 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
#!/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
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
mkdir aur_depends
cp cxxflags.txt aur_depends
cp aur_depends ffmpeg -r
## add a custom aur links
#aur_ffdep='https://aur.archlinux.org/intel-media-driver.git https://aur.archlinux.org/hm.git '
aur_ffdep='https://aur.archlinux.org/hm.git '
cd ffmpeg
git clone https://aur.archlinux.org/ffmpeg-full.git
## switch to chromaprint if chromaprint-fftw isn't option
if $(pacman -Qqe | grep -xq chromaprint); then
../sfslib mcolif 'ffmpeg-full/PKGBUILD' 'chromaprint-fftw' 'chromaprint-fftw' 'chromaprint'
fi
echo "">deps1
echo "">deps2
../sfslib edfpb "ffmpeg-full/PKGBUILD"
cat deps2 >>deps1
cat deps1 >>ffmpeg_full_req
../sfslib edfpb "ffmpeg-full/PKGBUILD" "depends='"
cat deps2 >>deps1
cat deps1 >>ffmpeg_full_req
../sfslib edfpb "ffmpeg-full/PKGBUILD" "depends_x86_64="
cat deps2 >>deps1
cat deps1 >>ffmpeg_full_req
../sfslib edfpb "ffmpeg-full/PKGBUILD" "makedepends"
cat deps2 >>deps1
cat deps1 >>ffmpeg_full_req
## rm already included to aur-list
#cat ffmpeg_full_req | sed 's/ hm / /g' | sed 's/ intel-media-driver / /g' >ffmpeg_full_req
echo "
Searching required packages in the official repository,
if they aren't there, then they are in the AUR..."
for i in $(../sfslib s_un_pk "$(cat ffmpeg_full_req)"); do
aur_ffdep+="https://aur.archlinux.org/$i.git "
done
cd ../aur_depends
for i in $(echo $aur_ffdep )
do
git clone $i
done
echo "">deps1
echo "">deps2
for i in $(ls -d */ | sed -e 's/\///g')
do
../sfslib edfpb "$i/PKGBUILD"
cat deps2 >>deps1
cat deps1 >>aur_dep_list
../sfslib edfpb "$i/PKGBUILD" "checkdepends=("
cat deps2 >>deps1
cat deps1 >>aur_dep_list
../sfslib edfpb "$i/PKGBUILD" "makedepends"
cat deps2 >>deps1
cat deps1 >>aur_dep_list
done
## get aur req packs
../sfslib rmdtpi "aur_dep_list"
#req_pack_list=$(cat aur_dep_list.req | sed 's/intel-media-driver//g' | sed 's/ hm / /g')
req_pack_list=$(cat aur_dep_list.req | sed 's/ hm / /g')
if [ "$req_pack_list" != "" ]
then
echo !!!
echo build aur depends of ffmpeg-full require absent packages:
echo $req_pack_list
echo !!! super-user password is required to install it
sudo pacman -S --needed $req_pack_list
fi
## firstly make and install intel-media-driver
make_and_install_intel_md(){
mkdir 1
mv -f intel-media-driver 1/
cp cxxflags.txt 1/
cd 1
../../sfslib mpbsmpks -u
if $(ls | grep -q pkg.tar.xz); then
echo !!!
echo super-user password is required to install intel-media-driver
sudo pacman -U *pkg.tar.xz
fi
cd ..
mv -f 1 ../inteldriver
}
## this block is organized as a function because it can be
## simply ignored in case of build another ffmpeg-pkg variants
#make_and_install_intel_md
## due to PKGBUILD can be written in non unique way, some mods of some PKGBUILDs need to be applied manual...
../sfslib mcolif 'libilbc/PKGBUILD' 'make' 'make' "make -j$(($(grep 'model name' /proc/cpuinfo --count)+1))"
../sfslib mcolif 'libopenmpt-svn/PKGBUILD' 'make ' 'make ' "make -j$(($(grep 'model name' /proc/cpuinfo --count)+1)) "
## rm sha checks from ndi-sdk, its a not good idia actually
../sfslib skipsha 'ndi-sdk/PKGBUILD'
#../sfslib mcolif 'ndi-sdk/PKGBUILD' 'sha256sums' 'sha256sums' 'sha256sums=(SKIP) forget_it'
## rm -j1 from hm cause it unneded
../sfslib mcolif 'hm/PKGBUILD' 'make ' '-j1' " "
## make and install other req. aur packages
../sfslib mpbsmpks -u
if $(ls | grep -q pkg.tar.xz); then
echo !!!
echo super-user password is required to install aur deps of ffmpeg-full
sudo pacman -U *pkg.tar.xz
fi
cd ../ffmpeg
../sfslib rmdtpi "ffmpeg_full_req"
req_pack_list_ffmpeg=$(cat ffmpeg_full_req.req)
if [ "$req_pack_list_ffmpeg" != "" ]
then
echo !!!
echo build ffmpeg-full require absent packages:
echo $req_pack_list_ffmpeg
echo !!!
echo super-user password is required to install it
sudo pacman -S --needed $req_pack_list_ffmpeg
fi
## remove pgp and sha checks... because sourcecode updates mutch faster then a PKGBUILDs
../sfslib mcolif 'ffmpeg-full/PKGBUILD' '{,.asc}' '{,.asc}' ' "rmasc"'
echo 'removed pgp signature' >ffmpeg-full/rmasc
../sfslib skipsha 'ffmpeg-full/PKGBUILD'
## make and install ffmpeg-full
extrafl='--extra-cxxflags=" '
extrafl+=$(cat cxxflags.txt)
extrafl+=' " \'
../sfslib adnlalwp 'ffmpeg-full/PKGBUILD' 'prefix=' "$extrafl"
../sfslib mpbsmpks
echo !!!
echo super-user password is required for install ffmpeg-full
sudo pacman -U *pkg.tar.xz
## 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