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 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
|
#!/usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-
# Copyright © 2015-2021 IOhannes m zmölnig <umlaeute@debian.org>
# Description: Main Debian packaging script for JUCE
export DH_VERBOSE = 1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CPPFLAGS_MAINT_APPEND =
export DEB_CXXFLAGS_MAINT_APPEND =
export DEB_LDFLAGS_MAINT_APPEND =
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk
include /usr/share/dpkg/buildtools.mk
include /usr/share/dpkg/architecture.mk
DEBIAN_BUILD_ARTIFACTS = debian/artifacts
# JUCE uses some c++11 features requiring atomic_store_8 and
# atomic_load_8, so we need to link with libatomic on
# armel, powerpc, powerpcspe, m68k, mips, mipsel, sh4, ...
# see also:
# - https://gcc.gnu.org/wiki/Atomic
# - https://gcc.gnu.org/wiki/Atomic/GCCMM/LIbrary
# - the 'clasp' packaging
# link with libatomic on architectures without built-in atomic
ifneq ($(strip $(filter $(DEB_HOST_ARCH), armel powerpc powerpcspe m68k mips mipsel sh4 riscv64)),)
DEB_CPPFLAGS_MAINT_APPEND += -DDEBIAN_JUCERPROJECT_LIBS='"atomic"'
DEB_LDFLAGS_MAINT_APPEND += -latomic
endif
# we got too many symbols for MIPS, so we need to enablea workaround...
ifneq ($(strip $(filter $(DEB_HOST_ARCH), mipsel mips64el)),)
DEB_CXXFLAGS_MAINT_APPEND += -mxgot
endif
# Debian's Projucer is GPL
DEB_CPPFLAGS_MAINT_APPEND += -DJUCER_ENABLE_GPL_MODE=1
%:
dh $@ $(BUILD_PACKAGES)
override_dh_auto_configure:
dh_auto_configure -- \
-DJUCE_BUILD_EXTRAS=ON \
-DJUCE_TOOL_INSTALL_DIR=bin \
-DJUCE_MODULE_PATH=share/juce/modules \
$(empty)
override_dh_auto_build-arch:
dh_auto_build -- Projucer juce_lv2_helper
cp $(CURDIR)/examples/Assets/juce_icon.png \
$(DEBIAN_BUILD_ARTIFACTS)/juce.png
override_dh_auto_build-indep:
dh_auto_build -- juce_lv2_helper
mkdir -p docs/doxygen/build
cp docs/JUCE*.md docs/CMake*.md docs/doxygen/build/
make -C docs/doxygen
execute_after_dh_install-arch:
-find $(CURDIR)/debian/juce-modules-source/ \
-type f -name "LV2_HELPER*.cmake" -exec \
sed -e 's|"[^"]*/juce_lv2_helper"|"/usr/lib/@DEB_HOST_MULTIARCH@/juce/juce_lv2_helper"|' -e "s|@DEB_HOST_MULTIARCH@|$(DEB_HOST_MULTIARCH)|" -i {} +
-find $(CURDIR)/debian/juce-modules-source/ \
-type f -name "JUCEConfig.cmake" -exec \
sed -e 's|"[^"]*/bin/juceaide"|"/usr/lib/@DEB_HOST_MULTIARCH@/juce/juceaide"|' -e "s|@DEB_HOST_MULTIARCH@|$(DEB_HOST_MULTIARCH)|" -i {} +
override_dh_install-indep:
dh_install --indep -X.tag
-find $(CURDIR)/debian/juce-modules-source-data/usr/share/juce \
-type f -executable \
'(' -name "*.h" -or -name "*.cpp" ')' \
-exec chmod -c 0644 {} +
override_dh_installdocs-indep:
dh_installdocs -plibjuce-doc --doc-main-package=juce-modules-source
dh_installdocs --remaining-packages
dh_doxygen --indep
override_dh_installchangelogs:
dh_installchangelogs ChangeList.txt
execute_after_dh_clean:
make -C docs/doxygen/ clean
rm -f $(DEBIAN_BUILD_ARTIFACTS)/*
#DEB_COPYRIGHT_CHECK_IGNORE_REGEX = \
#^((.*\.jpg)|(.*\.JPG)|(.*\.gif)|(.*\.png)|(.*\.ico)|(.*\.icns)|(gradle-wrapper\.jar)|(.*\.mp3)|(.*\.caf)|(.*\.nib)|examples/InAppPurchase/Signing/InAppPurchase\.keystore|examples/(InAppPurchase/BinaryData/(Robot|Ed|Jules|JB|Fabian|Lukasz)[012]\.ogg|AUv3Synth|PlugInSamples/MultiOutSynth)/Source/BinaryData/singing\.ogg|examples/Demo/Resources/cello\.wav|examples/Demo/Resources/icons\.zip|modules/juce_audio_plugin_client/RTAS/juce_RTAS_WinResources\.rsr|examples/ComponentTutorialExample/Introduction to Components - Part 1\.pdf|debian/(changelog|copyright(|_hints|_newhints)))$
DEB_COPYRIGHT_CHECK_IGNORE_REGEX = \
debian/.*|.*\.gif|.*\.jpg|.*\.JPG|.*\.png|.*\.ico|.*\.icns|.*\.wav|.*\.caf|.*\.ogg|.*\.mp3|.*\.pdf|.*\.keystore|.*\.nib|.*/gradle-wrapper\.jar|.*\.zip
# 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
|