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
|