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.

64 lines
2.1KB

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