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 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
|
#!/usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-
DPKG_EXPORT_BUILDFLAGS = 1
DEB_CPPFLAGS_MAINT_APPEND = -I/usr/include/rtmidi -I/usr/include/rtaudio
include /usr/share/dpkg/default.mk
CONFIGURE_FLAGS =
ifeq ($(DEB_HOST_ARCH_OS),linux)
CONFIGURE_FLAGS += --with-jack --with-alsa --with-oss
STK_REALTIME = yes
else
CONFIGURE_FLAGS += --disable-realtime
STK_REALTIME =no
endif
export STK_REALTIME
RAWWAVE_PATH = /usr/share/stk/rawwaves/
CONFIGURE_FLAGS += RAWWAVE_PATH=$(RAWWAVE_PATH) --enable-shared --disable-static
MOVE_FILES = include/RtAudio.h include/RtMidi.h include/RtError.h \
projects/examples/libMakefile
move_file = [ ! -f $(1) ] || mv $(1) $(2)
%:
dh $@
override_dh_auto_configure-arch:
for file in $(MOVE_FILES); do \
$(call move_file , $${file}, $${file}.bak); \
done
dh_auto_configure -- $(CONFIGURE_FLAGS)
mkdir -p src/Release
mkdir -p projects/demo/Release
override_dh_auto_configure-indep:
override_dh_auto_build-arch:
dh_auto_build
override_dh_auto_build-indep:
cd doc/doxygen && doxygen
# Cleanup realtime-related files
ifeq ($(STK_REALTIME),no)
execute_after_dh_link:
rm -rf debian/stk/usr/share/menu
rm -rf debian/stk/usr/share/man
endif
override_dh_installchangelogs:
dh_installchangelogs doc/ReleaseNotes.txt
execute_after_dh_auto_clean:
for file in $(MOVE_FILES); do \
$(call move_file, $${file}.bak, $${file}); \
done
rm -rf doc/html
rm -rf projects/demo/Release/ projects/examples/libMakefile src/Release/
DEB_COPYRIGHT_CHECK_IGNORE_REGEX = \
debian/.*|.*\.raw|.*\.bmp|.*\.mid
# licensecheck v1
.PHONY: licensecheck
licensecheck:
LANG=C.UTF-8 licensecheck \
-i "^($(DEB_COPYRIGHT_CHECK_IGNORE_REGEX))$$" \
--check '.*' --recursive --deb-machine --lines 0 * \
> debian/copyright_newhints
cmp debian/copyright_hints debian/copyright_newhints \
&& rm debian/copyright_newhints
|