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.

73 lines
2.3KB

  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. override_dh_auto_install:
  15. chmod +x $(ARDOUR_FILE)
  16. ./$(ARDOUR_FILE) --target ./tmp --noexec
  17. chmod -x $(ARDOUR_FILE)
  18. ifeq ($(GCC5),true)
  19. cd tmp && \
  20. tar -xf *-gcc5-$(VERSION).tar
  21. else
  22. cd tmp && \
  23. tar -xf *-gcc4-$(VERSION).tar
  24. endif
  25. # cd tmp && \
  26. # tar -xf *.tar
  27. rm tmp/Ardour_*-*/bin/ardour5
  28. rm tmp/Ardour_*-*/bin/*.uninstall.sh
  29. rm -r tmp/Ardour_*-*/etc/bash_completion.d
  30. rm -r tmp/Ardour_*-*/etc/fonts
  31. rm -r tmp/Ardour_*-*/etc/gtk-2.0
  32. rm -r tmp/Ardour_*-*/etc/xml
  33. rm -r tmp/Ardour_*-*/lib/LV2/3D_delay.lv2
  34. rm -r tmp/Ardour_*-*/lib/LV2/dyno-mite.lv2
  35. rm -r tmp/Ardour_*-*/lib/LV2/gvplus.lv2
  36. rm -r tmp/Ardour_*-*/lib/LV2/lv2core.lv2
  37. rm -r tmp/Ardour_*-*/lib/LV2/Micro-Glide.lv2
  38. rm -r tmp/Ardour_*-*/lib/LV2/XT-*.lv2
  39. install -d $(CURDIR)/debian/ardour/usr/lib/lv2
  40. install -d $(CURDIR)/debian/ardour/usr/share/icons/hicolor/16x16/apps
  41. install -d $(CURDIR)/debian/ardour/usr/share/icons/hicolor/22x22/apps
  42. install -d $(CURDIR)/debian/ardour/usr/share/icons/hicolor/32x32/apps
  43. install -d $(CURDIR)/debian/ardour/usr/share/icons/hicolor/48x48/apps
  44. mv tmp/Ardour_*-*/lib/LV2/*.lv2 $(CURDIR)/debian/ardour/usr/lib/lv2/
  45. rm -rf tmp/Ardour_*-*/lib/LV2
  46. cp debian/app*16px.png $(CURDIR)/debian/ardour/usr/share/icons/hicolor/16x16/apps/application-x-ardour.png
  47. cp debian/app*22px.png $(CURDIR)/debian/ardour/usr/share/icons/hicolor/22x22/apps/application-x-ardour.png
  48. cp debian/app*32px.png $(CURDIR)/debian/ardour/usr/share/icons/hicolor/32x32/apps/application-x-ardour.png
  49. cp debian/app*48px.png $(CURDIR)/debian/ardour/usr/share/icons/hicolor/48x48/apps/application-x-ardour.png
  50. override_dh_auto_clean:
  51. chmod -x $(ARDOUR_FILE) || true
  52. rm -rf ./tmp
  53. override_dh_strip:
  54. dh_strip --dbg-package=ardour-dbg
  55. override_dh_shlibdeps:
  56. env LD_LIBRARY_PATH=$(CURDIR)/debian/ardour/opt/ardour/lib:$(LD_LIBRARY_PATH) dh_shlibdeps
  57. %:
  58. dh $@