File: rules

package info (click to toggle)
sonic-pi 2.10.0~repack-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 34,952 kB
  • ctags: 3,436
  • sloc: ruby: 22,828; cpp: 6,154; sh: 80; makefile: 41
file content (49 lines) | stat: -rwxr-xr-x 1,607 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/usr/bin/make -f

DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
include /usr/share/dpkg/buildflags.mk
export QT_SELECT = qt5

%:
	dh $@ --parallel --buildsystem=qmake --sourcedirectory=app/gui/qt --builddirectory=app/gui/qt

# This is based on upstream's Raspbian builder script app/gui/qt/rp-build-app

override_dh_auto_configure:
	chmod 755 app/server/bin/sonic-pi-server.rb
	cd app/server/vendor/ruby-beautify/lib && \
	  cp    ruby-beautify.rb ruby-beautify-legacy.rb && \
	  cp -r ruby-beautify    ruby-beautify-legacy && \
	  chmod 644 ruby-beautify-legacy.rb ruby-beautify-legacy/*.rb ruby-beautify-legacy/config/*.rb
	cd app/gui/qt && \
	  cp -f ruby_help.tmpl ruby_help.h && \
	  ../../server/bin/qt-doc.rb -o ruby_help.h
	cd app/gui/qt && \
	  lrelease SonicPi.pro
	dh_auto_configure

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	cd app/server/sonicpi/test ; \
	  ruby -e 'require "ruby_debian_dev"; include RubyDebianDev; SUPPORTED_RUBY_VERSIONS.each { |v, b| system("#{b} /usr/bin/rake test") or raise "test failed for #{v}" }'
	dh_auto_test
endif

override_dh_clean:
	if [ -e app/gui/qt/Makefile ]; then \
	    make -C app/gui/qt/Makefile clean; \
	  fi ;
	rm -rf \
	  app/server/vendor/ruby-beautify/lib/ruby-beautify-legacy.rb \
	  app/server/vendor/ruby-beautify/lib/ruby-beautify-legacy \
	  app/gui/qt/sonic-pi \
	  app/gui/qt/Makefile \
	  app/gui/qt/ruby_help.h \
	  app/gui/qt/help_files.qrc \
	  app/gui/qt/lang/*.qm \
	  app/gui/qt/book/ \
	  app/gui/qt/help/ \
	  app/gui/qt/info/
	dh_clean