Credit Goat for updates for Ubuntu build + txt
[goodguy/cinelerra.git] / cinelerra-5.1 / blds / 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 | arch | debian-testing | ubuntu-testing]"
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 patchelf boost-devel
59   ;;
60 "arch")
61     pacman -Syu gtk2 nasm yasm cmake fftw patchelf boost boost-libs \
62     base-devel libvdpau libva perl-xml-parser perl-carp libogg texinfo \
63     libsndfile
64  ;;
65 "suse" | "leap" | "tumbleweed")
66   zypper -n install nasm gcc gcc-c++ zlib-devel texinfo libpng16-devel \
67     freeglut-devel libXv-devel alsa-devel libbz2-devel ncurses-devel \
68     libXinerama-devel freetype-devel libXft-devel giflib-devel ctags \
69     bitstream-vera-fonts xorg-x11-fonts-core xorg-x11-fonts dejavu-fonts \
70     openexr-devel libavc1394-devel festival-devel libjpeg8-devel libdv-devel \
71     libdvdnav-devel libdvdread-devel libiec61883-devel libuuid-devel \
72     ilmbase-devel fftw3-devel libsndfile-devel libtheora-devel flac-devel \
73     libtiff-devel inkscape cmake patch libnuma-devel lzma-devel udftools git \
74     yasm autoconf automake rpm-build libjbig-devel libvdpau-devel libva-devel \
75     gtk2-devel libusb-1_0-devel libpulse-devel libtool python patchelf \
76     libboost_regex-devel libboost_filesystem-devel
77     if [ ! -f /usr/lib64/libtermcap.so && ! -L /usr/lib64/libtermcap.so ]; then
78       ln -s libtermcap.so.2 /usr/lib64/libtermcap.so
79     fi
80   ;;
81 #debian 32bit: export ac_cv_header_xmmintrin_h=no
82 "debian")
83   apt-get -f -y install apt-file sox nasm yasm g++ build-essential zlib1g-dev \
84     texinfo libpng-dev freeglut3-dev libxv-dev libasound2-dev libbz2-dev \
85     libncurses5-dev libxinerama-dev libfreetype6-dev libxft-dev libgif-dev \
86     libtiff5-dev exuberant-ctags ttf-bitstream-vera xfonts-75dpi xfonts-100dpi \
87     fonts-dejavu libopenexr-dev festival libfftw3-dev gdb libusb-1.0-0-dev \
88     libdc1394-22-dev libflac-dev libjbig-dev libvdpau-dev libva-dev \
89     inkscape libsndfile1-dev libtheora-dev cmake udftools libxml2-utils git \
90     autoconf automake debhelper libgtk2.0-dev libpulse-dev python \
91     patchelf libboost-filesystem-dev libboost-regex-dev fuse
92   ;;
93 #"ub16-10")
94 #  apt-get -y install libx264-dev libx265-dev libvpx-dev libmjpegtools-dev
95 "ubuntu" | "mint" | "ub14" | "ub15" | "ub16" | "ub17" | "ub18" )
96   apt-get -y install apt-file sox nasm yasm g++ build-essential libz-dev \
97     texinfo libpng-dev freeglut3-dev libxv-dev libasound2-dev libbz2-dev \
98     libncurses5-dev libxinerama-dev libfreetype6-dev libxft-dev libgif-dev \
99     libtiff5-dev exuberant-ctags ttf-bitstream-vera xfonts-75dpi xfonts-100dpi \
100     fonts-dejavu libopenexr-dev libavc1394-dev festival-dev fftw3-dev gdb \
101     libdc1394-22-dev libiec61883-dev libflac-dev libjbig-dev libusb-1.0-0-dev \
102     libvdpau-dev libva-dev libsndfile1-dev libtheora-dev cmake udftools \
103     libxml2-utils git inkscape autoconf automake debhelper libgtk2.0-dev \
104     libpulse-dev libtool python \
105     patchelf libboost-filesystem-dev libboost-regex-dev
106   ;;
107 #ubuntu testing for upcoming versions
108 "ubuntu-testing")
109   apt-get -y install apt-file sox nasm yasm g++ build-essential libz-dev \
110     texinfo libpng-dev freeglut3-dev libxv-dev libasound2-dev libbz2-dev \
111     libncurses5-dev libxinerama-dev libfreetype6-dev libxft-dev libgif-dev \
112     libtiff5-dev exuberant-ctags ttf-bitstream-vera xfonts-75dpi xfonts-100dpi \
113     fonts-dejavu libopenexr-dev libavc1394-dev festival-dev fftw3-dev gdb \
114     libdc1394-25 libdc1394-dev libiec61883-dev libflac-dev libjbig-dev libusb-1.0-0-dev \
115     libvdpau-dev libva-dev libsndfile1-dev libtheora-dev cmake udftools \
116     libxml2-utils git inkscape autoconf automake debhelper libgtk2.0-dev \
117     libpulse-dev libtool 2to3 python-is-python3 python2-minimal python2 dh-python \
118     patchelf libboost-filesystem-dev libboost-regex-dev libxml-parser-perl libimath-dev liblilv-dev
119   ;;
120 #debian testing for upcoming versions
121 "debian-testing")
122   apt-get -f -y install apt-file sox nasm yasm g++ build-essential zlib1g-dev \
123     texinfo libpng-dev freeglut3-dev libxv-dev libasound2-dev libbz2-dev \
124     libncurses5-dev libxinerama-dev libfreetype6-dev libxft-dev libgif-dev \
125     libtiff5-dev exuberant-ctags ttf-bitstream-vera xfonts-75dpi xfonts-100dpi \
126     fonts-dejavu libopenexr-dev festival libfftw3-dev gdb libusb-1.0-0-dev \
127     libdc1394-25 libdc1394-dev libflac-dev libjbig-dev libvdpau-dev libva-dev \
128     inkscape libsndfile1-dev libtheora-dev cmake udftools libxml2-utils git \
129     autoconf automake debhelper libgtk2.0-dev libpulse-dev 2to3 python-is-python3 python2-minimal python2 dh-python \
130     patchelf libboost-filesystem-dev libboost-regex-dev fuse
131   ;;
132
133 *)
134   echo "unknown os: $dir"
135   exit 1;
136   ;;
137 esac
138
139 mkdir -p "/home/$dir/git-repo"
140 chmod a+rwx -R "/home/$dir/git-repo"
141