From 76fe042652e8619e2b7b6c36fa6d80abccebd487 Mon Sep 17 00:00:00 2001 From: Peter Deltchev Date: Thu, 21 May 2015 20:43:44 -0700 Subject: [PATCH] T16: Added ffmpeg compilation to the Vagrant provisioning script, and upped the number of cores to speed it up. --- Vagrantfile | 5 ++++- vagrant/install.sh | 24 ++++++++++++++++++++---- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index fe30e3cb..1f03c75a 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -1,6 +1,9 @@ Vagrant.configure("2") do |config| config.vm.box = 'laravel/homestead' - + config.vm.provider "virtualbox" do |v| + v.cpus = 4 + end + config.vm.network :private_network, ip: "192.168.33.11" config.vm.synced_folder ".", "/vagrant", type: "nfs" diff --git a/vagrant/install.sh b/vagrant/install.sh index 85279fcc..2c67ecd8 100755 --- a/vagrant/install.sh +++ b/vagrant/install.sh @@ -1,8 +1,24 @@ -sudo add-apt-repository -y ppa:kirillshkrogalev/ffmpeg-next sudo apt-get update -sudo apt-get install -y ffmpeg + +echo "Installing tagging tools" sudo apt-get install -y AtomicParsley flac vorbis-tools -sudo add-apt-repository -y --remove ppa:kirillshkrogalev/ffmpeg-next + +echo "Installing ffmpeg dependencies" +sudo apt-get install -y pkg-config yasm libfaac-dev libmp3lame-dev libvorbis-dev + + +if type ffmpeg &>/dev/null; then + echo "ffmpeg is installed!" +else + echo "ffmpeg is not installed; compiling..." + cd /tmp + wget "https://ffmpeg.org/releases/ffmpeg-2.6.3.tar.bz2" + tar -xjf "ffmpeg-2.6.3.tar.bz2" + cd "ffmpeg-2.6.3" + ./configure --enable-gpl --enable-encoder=flac --enable-encoder=alac --enable-libmp3lame --enable-libvorbis --enable-libfaac --enable-nonfree + make -j4 + sudo make install +fi mkdir /vagrant/logs /vagrant/vagrant/copy-and-restart-configs.sh @@ -15,4 +31,4 @@ composer install cp -r /vagrant/vagrant/config/* "/vagrant/app/config/local" php artisan migrate -php artisan db:seed \ No newline at end of file +php artisan db:seed