File: rules

package info (click to toggle)
iem-plugin-suite 1.11.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 10,756 kB
  • sloc: cpp: 124,611; makefile: 170; sh: 111
file content (78 lines) | stat: -rwxr-xr-x 2,704 bytes parent folder | download
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
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1

# see FEATURE AREAS in dpkg-buildflags(1)
export DEB_BUILD_MAINT_OPTIONS = hardening=+all


# iem-plugin-suite 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, and sh4
# see also:
# - https://gcc.gnu.org/wiki/Atomic
# - https://gcc.gnu.org/wiki/Atomic/GCCMM/LIbrary
# - the 'clasp' packaging
noatomicarch = $(shell dpkg-architecture -qDEB_HOST_ARCH | egrep -x "(armel|powerpc|powerpcspe|m68k|mips|mipsel|sh4)")

export MAKEFLAGS = V=1 CONFIG=Release TARGET_ARCH=-DDEBIAN_BUILD=1

PCDEPS=fftw3f

# see ENVIRONMENT in dpkg-buildflags(1)
export DEB_CPPFLAGS_MAINT_APPEND  = -DJUCE_JACK=1
# package maintainers to append CFLAGS
export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic \
	$(shell pkg-config --cflags $(PCDEPS))
# package maintainers to append LDFLAGS
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed \
	$(shell pkg-config --libs $(PCDEPS))

# link with libatomic on architectures without built-in atomic
ifeq ($(if $(noatomicarch),atomic), atomic)
	DEB_LDFLAGS_MAINT_APPEND += -latomic
endif

JUCE_VERSION := $(shell dpkg-query --show --showformat='$${source:Version}' juce-modules-source)

%:
	dh $@

override_dh_auto_build:
	xvfb-run -a dh_auto_build --no-parallel
override_dh_install:
	for d in _man _vst _bin; do rm -rf $(CURDIR)/$$d; mkdir -p $(CURDIR)/$$d; done
	# install the VST plugins and the standalong applications
	find $(CURDIR) -mindepth 1 -maxdepth 2 -type f -name "*.jucer" -not -name "_*" -not -name "*/_*" -print0 \
		| LC_COLLATED=C sort -z \
		| xargs -r0 $(CURDIR)/debian/install.sh
	
	dh_install

	# create symlinks to the various VST search paths
	mkdir -p $(CURDIR)/debian/tmp/usr/lib/lxvst/ $(CURDIR)/debian/tmp/usr/lib/vst/
	mkdir -p $(CURDIR)/debian/tmp/usr/lib/lxvst/ $(CURDIR)/debian/tmp/usr/lib/vst/
	## ardour
	ln -s /usr/lib/$(DEB_HOST_MULTIARCH)/iem-plugin-suite/vst $(CURDIR)/debian/tmp/usr/lib/lxvst/iem.at
	## carla
	ln -s /usr/lib/$(DEB_HOST_MULTIARCH)/iem-plugin-suite/vst $(CURDIR)/debian/tmp/usr/lib/vst/iem.at

override_dh_installchangelogs:
	dh_installchangelogs ChangeLog.md


override_dh_gencontrol:
	dh_gencontrol -- \
                -Vjuce:BuiltUsing="juce ( = $(JUCE_VERSION) )"


override_dh_auto_clean:
	rm -rf $(patsubst %/, %/JuceLibraryCode, $(dir $(wildcard */*.jucer)))
	rm -rf $(patsubst %/, %/Builds, $(dir $(wildcard */*.jucer)))
	rm -rf _man _vst _bin

licensecheck:
	licensecheck --deb-machine -r * \
		> debian/copyright_newhints
	cmp debian/copyright_hints debian/copyright_newhints \
		&& rm debian/copyright_newhints