File: rules

package info (click to toggle)
alure 1.2-7
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 868 kB
  • sloc: cpp: 4,333; ansic: 629; javascript: 535; makefile: 41; sh: 35
file content (57 lines) | stat: -rwxr-xr-x 1,422 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
#!/usr/bin/make -f

# Pass -Wall and some other compiler options we wish to use.
CFLAGS = -Wall $(shell dpkg-buildflags --get CFLAGS 2>/dev/null | sed -e 's/-g\|-O2//g')
CXXFLAGS = -Wall $(shell dpkg-buildflags --get CXXFLAGS 2>/dev/null | sed -e 's/-g\|-O2//g')

# nostrip option implies noopt
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
   TYPE=Release
else
   TYPE=Debug
endif

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

# Use this variable to allow options passed to cmake to be overridable
DEB_CMAKE_OPTIONS ?= -DCMAKE_VERBOSE_MAKEFILE=ON \
		-DDYNLOAD=OFF \
		-DMODPLUG=ON \
		-DCMAKE_BUILD_TYPE=$(TYPE) \
		-DCMAKE_INSTALL_PREFIX="/usr" \
		-DCMAKE_C_FLAGS="$(CFLAGS)" \
		-DCMAKE_CXX_FLAGS="$(CXXFLAGS)" \
		-DCMAKE_CXX_COMPILER="g++" \
		-DLIB_SUFFIX="/$(DEB_HOST_MULTIARCH)"

%:
	dh $@ --parallel

override_dh_auto_clean:
	rm -rf build/*

override_dh_auto_configure:
	cd build && cmake $(DEB_CMAKE_OPTIONS) ..

override_dh_auto_build:
	$(MAKE) --directory=build

override_dh_auto_install:
	$(MAKE) --directory=build install DESTDIR=$(CURDIR)/debian/tmp

override_dh_shlibdeps: debian/tmp/alure-dummy.so
	dh_shlibdeps -O--parallel

debian/tmp/alure-dummy.so:
	mkdir -p debian/tmp
	cc -xc -shared -Wl,--no-as-needed -o $@ /dev/null \
		-lsndfile \
		-lvorbisfile \
		-lFLAC \
		-lmpg123 \
		-ldumb \
		-lmodplug \
		-lfluidsynth

get-orig-source:
	$(dir $_)alure-get-orig-source