You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

152 lines
4.3KB

  1. #!/bin/bash
  2. set -e
  3. mkdir -p binaries
  4. mkdir -p binaries/debs
  5. rm -f binaries/*.xz
  6. # --------------------------------------------------------------------------------------------------------------------------------
  7. # set vars
  8. DISTRHO_VERSION=20140825-1kxstudio3
  9. REPO_FILES_URL=https://launchpad.net/~kxstudio-debian/+archive/ubuntu/plugins/+files/
  10. export XZ_OPT=9
  11. # --------------------------------------------------------------------------------------------------------------------------------
  12. # download debs
  13. function downloadDeb() {
  14. cd binaries/debs
  15. cp -v /var/cache/apt/archives/"$1"_1%3a"$2"_amd64.deb "$1"_"$2"_amd64.deb || true
  16. cp -v /var/cache/apt/archives/"$1"_1%3a"$2"_i386.deb "$1"_"$2"_i386.deb || true
  17. wget -c "$REPO_FILES_URL""$1"_"$2"_amd64.deb
  18. wget -c "$REPO_FILES_URL""$1"_"$2"_i386.deb
  19. cd ../..
  20. }
  21. function downloadDebDistrho() {
  22. downloadDeb "$1-lv2" "$DISTRHO_VERSION"
  23. downloadDeb "$1-vst" "$DISTRHO_VERSION"
  24. }
  25. downloadDeb distrho-mini-series 20140826-1kxstudio1
  26. downloadDeb distrho-mverb 20140826-1kxstudio1
  27. downloadDeb distrho-nekobi 20140826-1kxstudio1
  28. downloadDeb distrho-prom 20140826-1kxstudio1
  29. downloadDebDistrho arctican-plugins
  30. downloadDebDistrho dexed
  31. downloadDebDistrho distrho-plugin-ports
  32. downloadDebDistrho drowaudio-plugins
  33. downloadDebDistrho easyssp
  34. downloadDebDistrho juced-plugins
  35. downloadDebDistrho klangfalter
  36. downloadDebDistrho lufsmeter
  37. downloadDebDistrho luftikus
  38. downloadDebDistrho obxd
  39. downloadDebDistrho pitcheddelay
  40. downloadDebDistrho tal-plugins
  41. downloadDebDistrho wolpertinger
  42. # --------------------------------------------------------------------------------------------------------------------------------
  43. # extract debs and pack them
  44. function compressFolderAsTarXZ() {
  45. rm -f "$1.tar" "$1.tar.xz"
  46. tar cJf "$1.tar.xz" "$1"
  47. rm -r "$1"
  48. }
  49. function extractDebAndPackIt_DPF() {
  50. cd binaries
  51. mkdir -p tmp
  52. rm -rf tmp/*
  53. NAME="$1"
  54. mkdir -p "$NAME-linux32bit"
  55. dpkg -x debs/"$1"_*_i386.deb tmp
  56. mv tmp/usr/lib/*/*.so tmp/usr/lib/lv2/*.lv2/ "$NAME-linux32bit"
  57. mv tmp/usr/lib/dssi/*-dssi/ "$NAME-linux32bit" || true
  58. cp "README-DPF" "$NAME-linux32bit/README"
  59. compressFolderAsTarXZ "$NAME-linux32bit"
  60. rm -rf tmp/*
  61. mkdir -p "$NAME-linux64bit"
  62. dpkg -x debs/"$1"_*_amd64.deb tmp
  63. mv tmp/usr/lib/*/*.so tmp/usr/lib/lv2/*.lv2/ "$NAME-linux64bit"
  64. mv tmp/usr/lib/dssi/*-dssi/ "$NAME-linux64bit" || true
  65. cp "README-DPF" "$NAME-linux64bit/README"
  66. compressFolderAsTarXZ "$NAME-linux64bit"
  67. rm -rf tmp/*
  68. cd ..
  69. }
  70. function extractDebAndPackIt_DISTRHO() {
  71. cd binaries
  72. mkdir -p tmp
  73. rm -rf tmp/*
  74. if [ "$2" != "" ]; then
  75. NAME="$2"
  76. else
  77. NAME="$1"
  78. fi
  79. mkdir -p "$NAME-linux32bit"
  80. dpkg -x debs/"$1"-lv2_*_i386.deb tmp
  81. dpkg -x debs/"$1"-vst_*_i386.deb tmp
  82. mv tmp/usr/lib/*/*.so tmp/usr/lib/lv2/*.lv2/ "$NAME-linux32bit"
  83. cp "README-DISTRHO" "$NAME-linux32bit/README"
  84. if [ "$2" == "stereosourceseparation" ]; then
  85. rm -r */JuceDemoPlugin.* */Vex.*
  86. elif [ "$2" == "vex" ]; then
  87. rm -r */JuceDemoPlugin.* */StereoSourceSeparation.*
  88. fi
  89. compressFolderAsTarXZ "$NAME-linux32bit"
  90. rm -rf tmp/*
  91. mkdir -p "$NAME-linux64bit"
  92. dpkg -x debs/"$1"-lv2_*_amd64.deb tmp
  93. dpkg -x debs/"$1"-vst_*_amd64.deb tmp
  94. mv tmp/usr/lib/*/*.so tmp/usr/lib/lv2/*.lv2/ "$NAME-linux64bit"
  95. cp "README-DISTRHO" "$NAME-linux64bit/README"
  96. if [ "$2" == "stereosourceseparation" ]; then
  97. rm -r */JuceDemoPlugin.* */Vex.*
  98. elif [ "$2" == "vex" ]; then
  99. rm -r */JuceDemoPlugin.* */StereoSourceSeparation.*
  100. fi
  101. compressFolderAsTarXZ "$NAME-linux64bit"
  102. rm -rf tmp/*
  103. cd ..
  104. }
  105. extractDebAndPackIt_DPF distrho-mini-series
  106. extractDebAndPackIt_DPF distrho-mverb
  107. extractDebAndPackIt_DPF distrho-nekobi
  108. extractDebAndPackIt_DPF distrho-prom
  109. extractDebAndPackIt_DISTRHO arctican-plugins
  110. extractDebAndPackIt_DISTRHO dexed
  111. extractDebAndPackIt_DISTRHO distrho-plugin-ports stereosourceseparation
  112. extractDebAndPackIt_DISTRHO distrho-plugin-ports vex
  113. extractDebAndPackIt_DISTRHO drowaudio-plugins
  114. extractDebAndPackIt_DISTRHO easyssp
  115. extractDebAndPackIt_DISTRHO juced-plugins
  116. extractDebAndPackIt_DISTRHO klangfalter
  117. extractDebAndPackIt_DISTRHO lufsmeter
  118. extractDebAndPackIt_DISTRHO luftikus
  119. extractDebAndPackIt_DISTRHO obxd
  120. extractDebAndPackIt_DISTRHO pitcheddelay
  121. extractDebAndPackIt_DISTRHO tal-plugins
  122. extractDebAndPackIt_DISTRHO wolpertinger
  123. # --------------------------------------------------------------------------------------------------------------------------------