Advertisement
Guest User

Untitled

a guest
Feb 15th, 2018
308
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.77 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. # Copyright 2012, 2015  Patrick J. Volkerding, Sebeka, Minnesota, USA
  4. # All rights reserved.
  5. #
  6. # Redistribution and use of this script, with or without modification, is
  7. # permitted provided that the following conditions are met:
  8. #
  9. # 1. Redistributions of this script must retain the above copyright
  10. #    notice, this list of conditions and the following disclaimer.
  11. #
  12. #  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
  13. #  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  14. #  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
  15. #  EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  16. #  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  17. #  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
  18. #  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  19. #  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
  20. #  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  21. #  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  22.  
  23. # Modified again by Eric Fernandes Ferreira <candelabrus@gmail.com> for my personal Audio Project
  24.  
  25. # Set to 1 if you'd like to install/upgrade package as they are built.
  26. # This is recommended.
  27. INST=1
  28. TMP=${TMP:-/tmp}
  29.  
  30. # This is the original directory where you started this script
  31. AUDIOROOT=$(pwd)
  32. for dir in \
  33.   ladspa_sdk \
  34.   speex \
  35.   portaudio \
  36.   fluidsynth \
  37.   libmp4v2 \
  38.   faac \
  39.   faad2 \
  40.   lame \
  41.   twolame \
  42.   x264 \
  43.   x265 \
  44.   xvidcore \
  45.   SDL2 \
  46.   SDL2_gfx \
  47.   libwebp \
  48.   SDL2_image \
  49.   smpeg2 \
  50.   libmodplug \
  51.   SDL2_mixer \
  52.   SDL2_net \
  53.   SDL2_ttf \
  54.   OpenAL \
  55.   opus \
  56.   libbluray \
  57.   libass \
  58.   gsm \
  59.   libbs2b \
  60.   libgme \
  61.   ffmpeg \
  62.   libcue \
  63.   libdv \
  64.   gst-plugins-good0 \
  65.   gst-plugins-good \
  66.   ; do
  67.   # Get the package name
  68.   package=$(echo $dir | cut -f2- -d /)
  69.  
  70.   # Change to package directory
  71.   cd $AUDIOROOT/$dir || exit 1
  72.  
  73.   # Get the version
  74.   version=$(cat ${package}.SlackBuild | grep "VERSION:" | head -n1 | cut -d "-" -f2 | rev | cut -c 2- | rev)
  75.  
  76.   # Get the build
  77.   build=$(cat ${package}.SlackBuild | grep "BUILD:" | cut -d "-" -f2 | rev | cut -c 2- | rev)
  78.  
  79.   # The real build starts here
  80.   sh ${package}.SlackBuild || exit 1
  81.   if [ "$INST" = "1" ]; then
  82.     PACKAGE=`ls $TMP/${package}-${version}-*-${build}*.tgz`
  83.     if [ -f "$PACKAGE" ]; then
  84.       upgradepkg --install-new --reinstall "$PACKAGE"
  85.     else
  86.       echo "Error:  package to upgrade "$PACKAGE" not found in $TMP"
  87.       exit 1
  88.     fi
  89.   fi
  90.   # back to original directory
  91.   cd $AUDIOROOT
  92. done
  93.  
  94. # Configurations
  95. echo default_driver=pulse > /etc/libao.conf
  96. mkdir -p /etc/openal
  97. echo "drivers = pulse" > /etc/openal/alsoft.conf
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement