8c0b3511cac6a97de41bd8bbd1f589ad77422d92
[goodguy/cinelerra.git] / bld_prepare.sh
1 #!/bin/bash
2 #  need lv2 plugins (eg. lv2-calf-plugin)
3
4 if [ `id -u` -ne 0 ]; then
5   echo "you must be root"
6 fi
7
8 if [ $# -ne 1 ]; then
9   echo "usage: $0 <os>"
10   echo "  <os> = [centos | suse | ubuntu | fedora | mint | debian]"
11 fi
12
13 dir="$1"
14
15
16 case "$dir" in
17 "centos")
18   yum -y install nasm libavc1394-devel libusbx-devel flac-devel \
19     libjpeg-devel libdv-devel libdvdnav-devel libdvdread-devel \
20     libtheora-devel libiec61883-devel uuid-devel giflib-devel \
21     ncurses-devel ilmbase-devel fftw-devel OpenEXR-devel \
22     libsndfile-devel libXft-devel libXinerama-devel libXv-devel \
23     xorg-x11-fonts-misc xorg-x11-fonts-cyrillic xorg-x11-fonts-Type1 \
24     xorg-x11-fonts-ISO8859-1-100dpi xorg-x11-fonts-ISO8859-1-75dpi \
25     libpng-devel bzip2-devel zlib-devel kernel-headers libtiff-devel \
26     libavc1394 festival-devel libiec61883-devel flac-devel inkscape \
27     libsndfile-devel libtheora-devel linux-firmware ivtv-firmware \
28     libvorbis-devel texinfo xz-devel lzma-devel cmake udftools git \
29     autoconf automake rpm-build jbigkit-devel libvdpau-devel libva-devel \
30     alsa-lib-devel gtk2-devel pulseaudio-libs-devel libtool python
31     yasm=yasm-1.3.0-3.fc24.x86_64.rpm
32     release=http://archives.fedoraproject.org/pub/fedora/linux/releases/24
33     url=$release/Everything/x86_64/os/Packages/y/$yasm
34     wget -P /tmp $url
35     yum -y install /tmp/$yasm
36     rm -f /tmp/$yasm
37   ;;
38 #"fedora3*")
39 #  dnf group install "Development Tools"
40 #  ... rpm-build lzma-sdk-devel libtool ...
41 "fedora")
42   dnf group install "Development Tools"
43   dnf -y --best --allowerasing \
44     install nasm yasm libavc1394-devel libusbx-devel flac-devel \
45     libjpeg-devel libdv-devel libdvdnav-devel libdvdread-devel \
46     libtheora-devel libiec61883-devel esound-devel uuid-devel \
47     giflib-devel ncurses-devel ilmbase-devel fftw-devel OpenEXR-devel \
48     libsndfile-devel libXft-devel libXinerama-devel libXv-devel \
49     xorg-x11-fonts-misc xorg-x11-fonts-cyrillic xorg-x11-fonts-Type1 \
50     xorg-x11-fonts-ISO8859-1-100dpi xorg-x11-fonts-ISO8859-1-75dpi \
51     libpng-devel bzip2-devel zlib-devel kernel-headers libavc1394 \
52     festival-devel libdc1394-devel libiec61883-devel esound-devel \
53     flac-devel libsndfile-devel libtheora-devel linux-firmware \
54     ivtv-firmware libvorbis-devel texinfo xz-devel cmake git \
55     ctags patch gcc-c++ perl-XML-XPath libtiff-devel python dvdauthor \
56     gettext-devel inkscape udftools autoconf automake numactl-devel \
57     jbigkit-devel libvdpau-devel libva-devel gtk2-devel mesa-vdpau-drivers \
58     pulseaudio-libs-devel libtool
59   ;;
60 "suse" | "leap" | "tumbleweed")
61   zypper -n install nasm gcc gcc-c++ zlib-devel texinfo libpng16-devel \
62     freeglut-devel libXv-devel alsa-devel libbz2-devel ncurses-devel \
63     libXinerama-devel freetype-devel libXft-devel giflib-devel ctags \
64     bitstream-vera-fonts xorg-x11-fonts-core xorg-x11-fonts dejavu-fonts \
65     openexr-devel libavc1394-devel festival-devel libjpeg8-devel libdv-devel \
66     libdvdnav-devel libdvdread-devel libiec61883-devel libuuid-devel \
67     ilmbase-devel fftw3-devel libsndfile-devel libtheora-devel flac-devel \
68     libtiff-devel inkscape cmake patch libnuma-devel lzma-devel udftools git \
69     yasm autoconf automake rpm-build libjbig-devel libvdpau-devel libva-devel \
70     gtk2-devel libusb-1_0-devel libpulse-devel libtool python
71     if [ ! -f /usr/lib64/libtermcap.so ]; then
72       ln -s libtermcap.so.2 /usr/lib64/libtermcap.so
73     fi
74   ;;
75 #debian 32bit: export ac_cv_header_xmmintrin_h=no
76 "debian")
77   apt-get -f -y install apt-file sox nasm yasm g++ build-essential zlib1g-dev \
78     texinfo libpng-dev freeglut3-dev libxv-dev libasound2-dev libbz2-dev \
79     libncurses5-dev libxinerama-dev libfreetype6-dev libxft-dev libgif-dev \
80     libtiff5-dev exuberant-ctags ttf-bitstream-vera xfonts-75dpi xfonts-100dpi \
81     fonts-dejavu libopenexr-dev festival libfftw3-dev gdb libusb-1.0-0-dev \
82     libdc1394-22-dev libflac-dev libjbig-dev libvdpau-dev libva-dev \
83     inkscape libsndfile1-dev libtheora-dev cmake udftools libxml2-utils git \
84     autoconf automake debhelper libgtk2.0-dev libpulse-dev python
85   ;;
86 #"ub16-10")
87 #  apt-get -y install libx264-dev libx265-dev libvpx-dev libmjpegtools-dev
88 "ubuntu" | "mint" | "ub14" | "ub15" | "ub16" | "ub17" | "ub18" )
89   apt-get -y install apt-file sox nasm yasm g++ build-essential libz-dev \
90     texinfo libpng-dev freeglut3-dev libxv-dev libasound2-dev libbz2-dev \
91     libncurses5-dev libxinerama-dev libfreetype6-dev libxft-dev libgif-dev \
92     libtiff5-dev exuberant-ctags ttf-bitstream-vera xfonts-75dpi xfonts-100dpi \
93     fonts-dejavu libopenexr-dev libavc1394-dev festival-dev fftw3-dev gdb \
94     libdc1394-22-dev libiec61883-dev libflac-dev libjbig-dev libusb-1.0-0-dev \
95     libvdpau-dev libva-dev libsndfile1-dev libtheora-dev cmake udftools \
96     libxml2-utils git inkscape autoconf automake debhelper libgtk2.0-dev \
97     libpulse-dev libtool python
98   ;;
99  *)
100   echo "unknown os: $dir"
101   exit 1;
102   ;;
103 esac
104
105 mkdir -p "/home/$dir/git-repo"
106 chmod a+rwx -R "/home/$dir/git-repo"
107