-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure
executable file
·91 lines (82 loc) · 3.92 KB
/
configure
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
#!/bin/bash
echo "PWD = \$(shell pwd)/archive" > Makefile
echo -e "" >> Makefile
echo "all:" >> Makefile
DOCKER_ENVIRONMENT=$(grep 'docker' /proc/1/cgroup)
apt-get --version > /dev/null 2>&1
if [ $? == 0 ]
then
echo -e "\t-@apt-get update --yes" >> Makefile
echo -e "\t-@apt-get upgrade --yes" >> Makefile
echo -e "\t-@apt-get autoremove --yes zlib1g-dev" >> Makefile
echo -e "\t-@apt-get autoremove --yes libbz2-dev" >> Makefile
echo -e "\t-@apt-get autoremove --yes liblzma-dev" >> Makefile
echo -e "\t-@apt-get autoremove --yes libexpat1-dev" >> Makefile
echo -e "\t-@apt-get autoremove --yes libxml2-dev" >> Makefile
echo -e "\t-@apt-get autoremove --yes libfreetype6-dev" >> Makefile
echo -e "\t-@apt-get autoremove --yes libfribidi-dev" >> Makefile
echo -e "\t-@apt-get autoremove --yes libfontconfig1-dev" >> Makefile
echo -e "\t-@apt-get autoremove --yes libass-dev" >> Makefile
echo -e "\t-@apt-get autoremove --yes libfdk-aac-dev" >> Makefile
echo -e "\t-@apt-get autoremove --yes libmp3lame-dev" >> Makefile
echo -e "\t-@apt-get autoremove --yes libtheora-dev" >> Makefile
echo -e "\t-@apt-get autoremove --yes libvorbis-dev" >> Makefile
echo -e "\t-@apt-get autoremove --yes libogg-dev" >> Makefile
echo -e "\t-@apt-get autoremove --yes libxvidcore-dev" >> Makefile
echo -e "\t-@apt-get autoremove --yes libvpx-dev" >> Makefile
echo -e "\t-@apt-get autoremove --yes libx264.*-dev" >> Makefile
echo -e "\t-@apt-get autoremove --yes libx265.*-dev" >> Makefile
echo -e "\t-@apt-get autoremove --yes libbluray-dev" >> Makefile
echo -e "\t-@apt-get install --yes pkg-config" >> Makefile
echo -e "\t-@apt-get install --yes cmake" >> Makefile
echo -e "\t-@apt-get install --yes yasm" >> Makefile
echo -e "\t-@apt-get install --yes gperf" >> Makefile
fi
# FIXME: add cmake to other distributions
yum --version > /dev/null 2>&1
if [ $? = 0 ]
then
echo -e "\t-@yum makecache" >> Makefile
echo -e "\t-@yum --assumeyes update" >> Makefile
echo -e "\t-@yum --assumeyes install pkgconfig" >> Makefile
echo -e "\t-@yum --assumeyes install gperf" >> Makefile
echo -e "\t-@yum --assumeyes install nasm" >> Makefile
echo -e "\t-@yum --assumeyes install cmake" >> Makefile
echo -e "\t-@yum --assumeyes install glibc-static" >> Makefile
echo -e "\t-@yum --assumeyes install perl-core" >> Makefile
echo -e "\t-@yum --assumeyes install unbound" >> Makefile
echo -e "\t-@yum --assumeyes groupinstall 'Development Tools'" >> Makefile
echo -e "\t-@amazon-linux-extras install -y epel" >> Makefile
echo -e "\t-@yum --assumeyes install yasm" >> Makefile
# Operations specific to docker environment
if [ -n "$DOCKER_ENVIRONMENT" ]
then
echo -e "\t-@bash ./docker-prerequisites.bash" >> Makefile
fi
fi
zypper --version > /dev/null 2>&1
if [ $? = 0 ]
then
echo -e "\t-@zypper --non-interactive --no-gpg-checks update" >> Makefile
echo -e "\t-@zypper --non-interactive install pkg-config" >> Makefile
fi
if [ "$(uname -o)" = "Msys" ]
then
echo -e "\t@mkdir -p /usr/local" >> Makefile
echo -e "\t@pacman -S --noconfirm grep" >> Makefile
echo -e "\t@pacman -S --noconfirm sed" >> Makefile
echo -e "\t@pacman -S --noconfirm awk" >> Makefile
echo -e "\t@pacman -S --noconfirm diffutils" >> Makefile
echo -e "\t@pacman -S --noconfirm cmake" >> Makefile
echo -e "\t@pacman -S --noconfirm yasm" >> Makefile
echo -e "\t@pacman -S --noconfirm gcc" >> Makefile
echo -e "\t@pacman -S --noconfirm pkg-config" >> Makefile
echo -e "\t@pacman -S --noconfirm python" >> Makefile
echo -e "\t@pacman -S --noconfirm perl" >> Makefile
echo -e "\t@pacman -S --noconfirm gperf" >> Makefile
fi
echo -e "\t@./build.sh" >> Makefile
echo -e "" >> Makefile
echo -e "clean:" >> Makefile
echo -e "\t@rm -r -f build/usr/bin/* *.tar.gz *.changes *.dsc *.deb *.rpm *.zip *.exe" >> Makefile
echo -e "\t@rm -r -f src/*" >> Makefile