External, Non-PPA KXStudio Repository
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.

92 lines
3.5KB

  1. #!/usr/bin/make -f
  2. VERSION=$(shell ls | grep \.run | head -n 1 | awk 'sub("-","\n")' | tail -n 1 | awk 'sub("-x86","\n")' | head -n 1)
  3. GCC5=$(shell cat debian/changelog | head -n 1 | grep -q v5 && echo true)
  4. ifeq ($(shell dpkg-architecture -qDEB_HOST_ARCH),amd64)
  5. ARDOUR_FILE=Ardour-$(VERSION)-x86_64.run
  6. else
  7. ARDOUR_FILE=Ardour-$(VERSION)-x86.run
  8. endif
  9. DEB_PKG_VER=0.10.0+git20180711
  10. override_dh_auto_install:
  11. chmod +x $(ARDOUR_FILE)
  12. ./$(ARDOUR_FILE) --target ./tmp --noexec
  13. chmod -x $(ARDOUR_FILE)
  14. ifeq ($(GCC5),true)
  15. cd tmp && \
  16. tar -xf *-gcc5-$(VERSION).tar
  17. else
  18. cd tmp && \
  19. tar -xf *-gcc4-$(VERSION).tar
  20. endif
  21. rm tmp/Ardour_*-*/bin/ardour5
  22. rm tmp/Ardour_*-*/bin/*.uninstall.sh
  23. rm -r tmp/Ardour_*-*/etc/bash_completion.d
  24. rm -r tmp/Ardour_*-*/etc/fonts
  25. rm -r tmp/Ardour_*-*/etc/gtk-2.0
  26. rm -r tmp/Ardour_*-*/etc/xml
  27. rm -r tmp/Ardour_*-*/lib/libfreetype.so.6
  28. rm -r tmp/Ardour_*-*/lib/libsuil*
  29. rm -r tmp/Ardour_*-*/lib/LV2/3D_delay.lv2
  30. rm -r tmp/Ardour_*-*/lib/LV2/dyno-mite.lv2
  31. rm -r tmp/Ardour_*-*/lib/LV2/gvplus.lv2
  32. rm -r tmp/Ardour_*-*/lib/LV2/lv2core.lv2
  33. rm -r tmp/Ardour_*-*/lib/LV2/Micro-Glide.lv2
  34. rm -r tmp/Ardour_*-*/lib/LV2/XT-*.lv2
  35. ifeq ($(GCC5),true)
  36. ifeq ($(shell dpkg-architecture -qDEB_HOST_ARCH),amd64)
  37. wget https://launchpad.net/~kxstudio-debian/+archive/ubuntu/gcc5-deps/+files/suil-libs_$(DEB_PKG_VER)v5_amd64.deb
  38. wget https://launchpad.net/~kxstudio-debian/+archive/ubuntu/gcc5-deps/+files/suil-static_$(DEB_PKG_VER)v5_amd64.deb
  39. else
  40. wget https://launchpad.net/~kxstudio-debian/+archive/ubuntu/gcc5-deps/+files/suil-libs_$(DEB_PKG_VER)v5_i386.deb
  41. wget https://launchpad.net/~kxstudio-debian/+archive/ubuntu/gcc5-deps/+files/suil-static_$(DEB_PKG_VER)v5_i386.deb
  42. endif
  43. else
  44. ifeq ($(shell dpkg-architecture -qDEB_HOST_ARCH),amd64)
  45. wget https://launchpad.net/~kxstudio-debian/+archive/ubuntu/libs/+files/suil-libs_$(DEB_PKG_VER)_amd64.deb
  46. wget https://launchpad.net/~kxstudio-debian/+archive/ubuntu/libs/+files/suil-static_$(DEB_PKG_VER)_amd64.deb
  47. else
  48. wget https://launchpad.net/~kxstudio-debian/+archive/ubuntu/libs/+files/suil-libs_$(DEB_PKG_VER)_i386.deb
  49. wget https://launchpad.net/~kxstudio-debian/+archive/ubuntu/libs/+files/suil-static_$(DEB_PKG_VER)_i386.deb
  50. endif
  51. endif
  52. dpkg -x suil-libs_*.deb deb-libs
  53. dpkg -x suil-static_*.deb deb-libs
  54. install -m 644 \
  55. deb-libs/opt/kxstudio/lib/suil-0/libsuil_* \
  56. deb-libs/opt/kxstudio/lib/suil-shared/libsuil-0.so.0 \
  57. tmp/Ardour_*-*/lib/
  58. install -d $(CURDIR)/debian/ardour/usr/lib/lv2
  59. install -d $(CURDIR)/debian/ardour/usr/share/icons/hicolor/16x16/apps
  60. install -d $(CURDIR)/debian/ardour/usr/share/icons/hicolor/22x22/apps
  61. install -d $(CURDIR)/debian/ardour/usr/share/icons/hicolor/32x32/apps
  62. install -d $(CURDIR)/debian/ardour/usr/share/icons/hicolor/48x48/apps
  63. mv tmp/Ardour_*-*/lib/LV2/*.lv2 $(CURDIR)/debian/ardour/usr/lib/lv2/
  64. rm -rf tmp/Ardour_*-*/lib/LV2
  65. cp debian/app*16px.png $(CURDIR)/debian/ardour/usr/share/icons/hicolor/16x16/apps/application-x-ardour.png
  66. cp debian/app*22px.png $(CURDIR)/debian/ardour/usr/share/icons/hicolor/22x22/apps/application-x-ardour.png
  67. cp debian/app*32px.png $(CURDIR)/debian/ardour/usr/share/icons/hicolor/32x32/apps/application-x-ardour.png
  68. cp debian/app*48px.png $(CURDIR)/debian/ardour/usr/share/icons/hicolor/48x48/apps/application-x-ardour.png
  69. override_dh_auto_clean:
  70. chmod -x $(ARDOUR_FILE) || true
  71. rm -rf ./tmp deb-libs *.deb
  72. override_dh_strip:
  73. dh_strip --dbg-package=ardour-dbg
  74. override_dh_shlibdeps:
  75. env LD_LIBRARY_PATH=$(CURDIR)/debian/ardour/opt/ardour/lib:$(LD_LIBRARY_PATH) dh_shlibdeps
  76. %:
  77. dh $@