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.

101 lines
3.7KB

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