File: rules

package info (click to toggle)
juce 8.0.10%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 78,768 kB
  • sloc: cpp: 526,464; ansic: 159,952; java: 3,038; javascript: 847; xml: 269; python: 224; sh: 167; makefile: 84
file content (112 lines) | stat: -rwxr-xr-x 4,285 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
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
103
104
105
106
107
108
109
110
111
112
#!/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

# PowerPC by default uses a weird ibm128 'long double'
ifneq ($(strip $(filter $(DEB_HOST_ARCH), ppc64el)),)
	DEB_CPPFLAGS_MAINT_APPEND += -mabi=ieeelongdouble
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
	mkdir -p $(DEBIAN_BUILD_ARTIFACTS)
	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/
ifeq (,$(findstring nodoc,$(DEB_BUILD_OPTIONS)))
	make -C docs/doxygen
endif

execute_after_dh_install-arch:
	-find $(CURDIR)/debian/juce-modules-source/ \
		-type f -name "*_HELPER*.cmake" -exec \
		sed \
			-e 's,"[^"]*/\(juce_\(lv2\|vst3\)_helper\)","/usr/lib/@DEB_HOST_MULTIARCH@/juce/\1",' \
			-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

ifneq (,$(findstring nodoc,$(DEB_BUILD_OPTIONS)))
override_dh_doxygen:
endif

override_dh_installchangelogs:
	dh_installchangelogs CHANGE_LIST.md

#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