File: rules

package info (click to toggle)
audacity 3.7.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 125,252 kB
  • sloc: cpp: 358,238; ansic: 75,458; lisp: 7,761; sh: 3,410; python: 1,503; xml: 1,385; perl: 854; makefile: 122
file content (70 lines) | stat: -rwxr-xr-x 2,080 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
#!/usr/bin/make -f

include /usr/share/dpkg/architecture.mk
include /usr/share/dpkg/pkg-info.mk

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

CMAKE_FLAGS = \
	-DCMAKE_BUILD_TYPE=RelWithDebInfo \
	-DCMAKE_INSTALL_LIBDIR=lib \
	-Daudacity_conan_enabled=Off \
	-Daudacity_has_networking=Off \
	-Daudacity_has_vst3=Off \
	-Daudacity_lib_preference=system \
	-Daudacity_use_ffmpeg=loaded \
	-DwxBUILD_TOOLKIT=gtk3 \
	$(NULL)

ifeq (,$(findstring ~,$(DEB_VERSION_UPSTREAM)))
# No ~ in upstream version. Assuming release version (i.e. not alhpa or beta version)
CMAKE_FLAGS += -DAUDACITY_BUILD_LEVEL=2
endif

ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
CROSS_CMAKE_FLAGS = -DIMAGE_COMPILER_EXECUTABLE=$(CURDIR)/obj-$(DEB_BUILD_GNU_TYPE)/utils/image-compiler
endif

ifeq ($(DEB_HOST_ARCH),i386)
 export DEB_CFLAGS_MAINT_APPEND = -mfpmath=sse -msse2
 export DEB_CXXFLAGS_MAINT_APPEND = -mfpmath=sse -msse2
endif

DISABLE_LIBRARIES = \
	-Daudacity_use_libflac=off \
	-Daudacity_use_libid3tag=off \
	-Daudacity_use_libmad=off \
	-Daudacity_use_libmpg123=off \
	-Daudacity_use_libogg=off \
	-Daudacity_use_libopus=off \
	-Daudacity_use_libvorbis=off \
	-Daudacity_use_lv2=off \
	-Daudacity_use_midi=off \
	-Daudacity_use_portsmf=off \
	-Daudacity_use_sbsms=off \
	-Daudacity_use_soundtouch=off \
	-Daudacity_use_twolame=off \
	-Daudacity_use_vamp=off \
	-Daudacity_use_wavpack=off \
	$(NULL)

%:
	dh $@

override_dh_auto_clean:
	dh_auto_clean
ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
	rm -rf obj-$(DEB_BUILD_GNU_TYPE)
endif
	dh_clean libraries/lib-theme-resources/*Code.h

override_dh_auto_configure:
ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
	cmake -B obj-$(DEB_BUILD_GNU_TYPE) -DCMAKE_VERBOSE_MAKEFILE=ON $(CMAKE_FLAGS) $(DISABLE_LIBRARIES)
	cmake --build obj-$(DEB_BUILD_GNU_TYPE) --target image-compiler
endif
	WX_CONFIG=/usr/lib/$(DEB_HOST_GNU_TYPE)/wx/config/gtk3-unicode-3.2 dh_auto_configure -- $(CMAKE_FLAGS) $(CROSS_CMAKE_FLAGS)

execute_after_dh_auto_install:
	# Don't package unnecessary copy of GPL
	rm debian/tmp/usr/share/doc/audacity/LICENSE.txt